[Bug] /compact command does not trigger statusline refresh

Resolved 💬 3 comments Opened May 9, 2026 by JVenberg Closed May 12, 2026

Bug Description
/compact does not trigger a statusline refresh. After /compact completes, the statusline continues to display the previous render (including the pre-compact token count) until something else forces a re-invocation, e.g. submitting a prompt or resuming the session. As a result, the displayed context size appears stale even though it's just a frozen frame from before the compact.

Repro: configure a custom statusline that shows context tokens, run /compact, observe the old token count remain on screen until the next prompt or a session resume.

Expected: the harness re-invokes the statusline command on /compact completion (alongside the existing SessionStart:compact hook) so the rendered output reflects post-compact state.

Custom statuslines that try to detect post-compact freshness by inspecting the transcript work correctly when invoked, but the harness doesn't invoke them at this moment, so there is no script-side workaround.

Environment Info

  • Platform: darwin
  • Terminal: ghostty
  • Version: 2.1.121
  • Feedback ID: 9e30e64b-dcf1-4d60-8cff-8e00dd64dd41

Errors

[]

View original on GitHub ↗

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