[BUG] Statusline not appearing when using command-line flags with Claude Code
Status Fixed / completed
Maintainer reply None cached
Activity 12 comments · opened Aug 15, 2025 · closed Dec 9, 2025
[BUG] Statusline not appearing when using command-line flags with Claude Code
Environment
- Platform (select one):
- [x] Anthropic API (login MAX plan)
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [ ] Other: <!-- specify -->
- Claude CLI version: 1.0.81 (Claude Code)
- Operating System: macOS (Darwin 24.6.0)
- Terminal: iTerm2
Bug Description
The statusline does not appear when starting Claude Code with command-line flags, but works correctly when starting with just claude.
Steps to Reproduce
- Configure a statusline script at
~/.claude/statusline.shwith proper executable permissions - Start Claude Code using
claude --add-dir ~/claude-workspace --continue - Observe that no statusline appears at the bottom of the interface
- Exit and restart using just
claude - Observe that the statusline now appears correctly
Expected Behavior
The statusline should appear consistently regardless of which command-line flags are used to start Claude Code.
Actual Behavior
- Statusline appears when starting with
claude - Statusline does not appear when starting with
claude --add-dir ~/claude-workspace --continue
Additional Context
- The statusline script is properly configured and executable
- Settings.json is configured correctly with the statusline path
- The issue appears to be related to how the statusline is initialized when additional flags are passed during startup
- This affects users who regularly use workspace directories or session continuation flags
12 Comments
statusline only appearing when I start claude from home directory: ~/ but not when entering in a new git directory
@claude can you fix it?
it doesnt even work at all for me...
Confirm the bug!
Confirmed in Windows with or without parameters
Confirmed the status line doesn't show for me in Windows 11 with or without flags @claude
It found a solution which works for me.
First, I created a file -
C:\Users\YOUR-USER-FOLDER\.claude\claude-status.ps1and added the following code in it.Then added the following to -
C:\Users\YOUR-USER-FOLDER\.claude\settings.jsonSo, my full settings file looks below.
Now, the status line works and shows User | Branch | Mode
Note:
Main issue with AbhishekDas solution is that it doesn't allow you to use your settings file on machines where you have different usernames. (i.e, work, personal)
it is also not cross platform, using ~\\.claude\\claude-status.ps1 does not function.
But his solution will support using the stdin if you use this:
So it appear that the statusline command is using cmd.exe which doesn't support variable interpolation. Since the system can clearly use bash I'm not sure why they elected to spawn a process using the platform specific cmd shell here???
anyway, the settings config below solves the issue with getting the stdin string data and allows things to at least work with different usernames across windows machines:
settings.json
My full claude-status.ps1 file if anyone want to steal it and make it their own:
Also this issue was used to close #6526 as a duplicate of this issue, but this ticket is marked as macos, which the OP was using, but if its going to be used to track the issue across both platforms the tags should be updated to reflect this.
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.