[BUG] Statusline does not refresh after shell escape (!) commands
Resolved 💬 4 comments Opened Nov 27, 2025 by arevlo Closed Feb 28, 2026
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?
[UX Bug] When using the ! prefix to run bash commands directly (e.g., ! git checkout -b new-branch), the custom statusline does not refresh to reflect changes. The statusline continues showing the old git branch until Claude Code is restarted.
<img src="https://github.com/user-attachments/assets/c26e205b-2214-4dc8-94c5-fae57157b2b2" width="50%">
What Should Happen?
The statusline should refresh after shell escape commands complete, especially for commands that affect displayed information like git branch changes.
Steps to Reproduce
- Configure a custom statusline that displays the current git branch
- Start Claude Code in a git repository on
mainbranch - Observe statusline shows
main - Run:
! git checkout -b test-branch - Command output confirms branch switch
- BUG: Statusline still shows
maininstead oftest-branch - Close/reopen Claude Code - now correctly shows
test-branch
Claude Model
Opus
Is this a regression?
No, this never worked
Claude Code Version
2.0.55 (Claude Code)
Platform
Anthropic API
Operating System
macOS
Terminal/Shell
Other: Ghostty
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗