Fixes HIGH SEVERITY bugbot issue: "loadConfig() never sets configPath, crashing all CLI commands"
The problem:
- loadConfig() returned config without setting configPath
- Only loadConfigWithPath() set configPath, but no CLI command used it
- When CLI commands called getSessionsDir(config.configPath, ...),
it passed undefined to generateConfigHash()
- This caused realpathSync(undefined) to throw TypeError
- All CLI commands (spawn, session, status, review-check, start) crashed at runtime
The fix:
- Updated loadConfig() to set config.configPath before returning
- Now matches the behavior of loadConfigWithPath()
- All CLI commands can safely use config.configPath for hash generation
All tests pass.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>