[BUG] The custom statusLine command loses the branch indicator in ongoing sessions.
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
The custom statusLine command loses the branch indicator in ongoing sessions. It works correctly when a new session is opened, but disappears once the session has been running for a while. Multiple people on our team can reproduce this. workspace.project_dir (or at least one of the workspace path fields) should remain populated throughout the session lifetime, not become null mid-session.
Open a new Claude Code session → branch indicator shows ✅
Continue the session, send several messages → branch indicator disappears ❌
What Should Happen?
Branch indicator should remain populated throughout the session lifetime, not become null mid-session.
Error Messages/Logs
Steps to Reproduce
To reproduce
Configure a statusLine command in ~/.claude/settings.json that reads branch from workspace.project_dir (or current_dir / cwd) and runs git rev-parse --abbrev-ref HEAD
Open a new Claude Code session → branch indicator shows ✅
Continue the session, send several messages → branch indicator disappears ❌
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
_No response_
Claude Code Version
Sonnet 4.6 and Opus 4.8
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Terminal.app (macOS)
Additional Information
_No response_
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗