[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

  1. Configure a custom statusline that displays the current git branch
  2. Start Claude Code in a git repository on main branch
  3. Observe statusline shows main
  4. Run: ! git checkout -b test-branch
  5. Command output confirms branch switch
  6. BUG: Statusline still shows main instead of test-branch
  7. 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

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗