Skip to content

context-bar redraws the new window after /clear - #160

Merged
hamzafer merged 3 commits into
mainfrom
context-bar-after-clear
Oct 29, 2026
Merged

hamzafer merged 3 commits into
mainfrom
context-bar-after-clear

Conversation

@hamzafer

Copy link
Copy Markdown
Owner

What changed

After /clear the context bar went blank until the first turn of the new session finished. A /clear fires session.end with reason: 'clear' and no session.start, so nothing asked for the new window.

  • context-bar hooks session.end: on a clear, it reads the window again once the end step's time bound has passed (a read inside it would be aborted).
  • New test: a clear refreshes, an exit doesn't.
  • context-bar 0.1.4 → 0.1.5.

Reproduced on Claude Code 2.1.312

  • context-bar: before, the bar is gone after /clear until a turn completes. After, it shows the fresh window within the time bound (84k → 55k, messages 30k → 1.3k).
  • agent-radar: no change needed. The engine already resets its state on /clear, and its clock and poll keep running (a background shell started after the clear ticks and is marked done).
  • The stale-state symptom in the issue no longer happens on this build: $.state starts empty after a clear.

Fixes #159

Checklist

  • claude plugin validate mods/context-bar passes
  • claude plugin test mods/context-bar passes (24)
  • node --test test/*.test.mjs and cd cli && node --test pass
  • Version bumped in plugin.json, .claude-plugin/marketplace.json and the site page (chip and JSON-LD)

A /clear ends the session with no session.start after it, so the bar stayed
empty until the first turn. It now reads the window once session.end's time
bound has passed. Fixes #159.
On a clear it drops the old reading and takes the hidden choice from the store,
as a session start does. The test also pins the read to after the time bound.
@hamzafer
hamzafer merged commit 172abf0 into main Oct 29, 2026
2 checks passed
@hamzafer
hamzafer deleted the context-bar-after-clear branch October 29, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

context-bar and agent-radar keep the previous session's state after /clear

1 participant