Skip to content

[Bug] /compact command does not trigger statusline refresh #57541

@JVenberg

Description

@JVenberg

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

[]

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:statuslinebugSomething isn't workinghas reproHas detailed reproduction stepsplatform:macosIssue specifically occurs on macOS

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions