Repository navigation
fix(band): show the level again after /clear and /resume - #1161
Merged
DietrichGebert merged 2 commits intoOct 17, 2026
Merged
Conversation
/clear ends the session and goes on under a new session id with an empty band state, and raises no session.start, so the band showed "off" (and lost the project, the cost baseline and the task row) until the first turn ended. Run the session setup again from a command.run hook on /clear, once the command has run and the new session is in place.
/resume inside a session ends it with reason resume and goes on under the resumed session's id, again with an empty band state and no session.start. Run the setup after any command that moved the session to another id, so /clear, /resume (by id or from the picker) and a cancelled resume are all handled without a list of commands.
Owner
|
Thanks! Tested it, works great. Merged, will be in the next release. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1160
Cause:
/clearand/resumeinside a session end it (session.endwith reasonclearorresume) and go on under another session id, with an empty band state and nosession.start. So the band showedoffuntil the first turn ended. Details in #1160.Fix: the setup in the
session.starthook moves intostart($). Acommand.runhook runs it again after any command that left the session on another id, so there is no list of commands to keep up to date.Tests
after /clear …andafter /resume …intests/band.test.tsx. Each runs/helpfirst, which must not set the band up. Mutations: with the hook removed both fail; with the session-id check removed both fail on/help; aclear-only hook fails the/resumeone.claude plugin test .: 27/27.npm test: 144 + 30 pass (with pandas installed, as in CI).check-rule-copiesandcheck-versionspass.--plugin-dir, the installed plugin disabled, driven byexpect), checked against what the band draws and its state:/clear:offfor one frame, thenfull. Unpatched 5.3.2 stays onoff./resume <id>and/resumefrom the picker: the band is set up under the resumed id and showsfull. Unpatched it showedoff. With the picker,command.runsettles only after the pick./compactkeeps the session id and the band state (level, turns, cost); no change needed.claude --resume <id>raisessession.start; no change needed.Known limit: on
clear,ponytail-activate.jsresets the flag to the default level, and it can finish after this hook. If the level was switched before/clear, the band can show the old level until the first turn ends. The one later point,classic.SessionStart, is skipped for plugins in a real session (see #1160). It is marked as ashortcut:in the code. On/resumethe SessionStart hooks finish before the command does, so there is no such race.