Repository navigation
fix(core): permission prompts and the agent indicator (#148) - #150
Merged
Merged
Conversation
) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t
… while its box shows (#148) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 10, 2026
* docs: spec and plan for permission prompts and the agent indicator (#148) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t * chore: bump core 0.28.1 and app 0.35.1 (#148) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t * test(e2e): permission prompt timelines from #148 (red) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t * fix(core): Working after a permission is granted, and a Question held while its box shows (#148) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t * docs: the permission prompt rules (#148) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
Closes #148.
Core change, so a change to Prism too. It reaches Prism with the core bump (core 0.28.0 to 0.28.1). Prism passes no
claudePluginDir, so none of its sessions is hooked and nothing it shows changes until it ships the plugin. App 0.35.0 to 0.35.1.What was measured
A real
claude.exe2.1.296 in a ConPTY pty with our plugin (report:research/prism-terminal/2026-10-10-permission-indicator.md):Two gaps: (1) after Yes no hook fires until the tool ends, and a hooked session ignored every spinner title, so the tab showed nothing for 26 s (the owner's 33 s command); (2) subagents' hooks write the same signal, so a sibling's tool call or the main turn's Stop took a pending Question down 1 to 4 s after it went up (case G2).
What changes (
core/renderer/lib)agentHookState: a newworking-titlestep. In phasequestionorstoppedit is Working and takes the Question down; inworking,done,failedor no phase it changes nothing. Never from the answer key (Enter on No is Enter on Yes; after No or Esc the title stays✳).agentHookState:hookStep(prev, ev, seen?)andscreenDecides. With a Question pending and the box still on screen (looksLikeQuestion),workingandworking-titlechange nothing, anddoneraises Finished UNDER the Question.useAgentIndicator: a hooked session's spinner title sendsworking-title; the screen is read only whenscreenDecidessays so; a spinner held by the box is read again 250 ms later, since the first spinner came 6 ms before the repaint that erased the box.hooks.jsonandhook.cmdare byte for byte the same, so Stable's copy stays valid.docs/regression-rules.md(#claude-hooks,#finished-and-question), CLAUDE.md item 9, the spec now records the owner's approval.Decisions (owner, 2026-10-10, the recommended answers)
Proof: red before, green after
e2e
agentHooks, extended with case A's and G2's byte sequences, on the code before the fix (commit43cff34):After the fix:
agentHooks 37 0.Unit:
agentHookState.timelines.test.tsreplays the measured timelines A, B, C, D, E, G2 and C3 (agentHookTimelines.ts, the box state rendered from the captured bytes). On the old rules 5 of 7 fail (A, C, D, E:expected null to be 'working'; G2:at 26167 ms: expected 'working' to be 'question'); B and C3 pass both ways, as they should. The newhookSteptests: 6 of 21 fail on the old rules. All pass after.Gates
npm run typecheck,npm run lint(0 errors),npm test(109 files, 1555 tests): green.agentHooks37/0,attention25/0,indicator12/0,indicatorStyles74/0. The attention and failed-line screenshots look unchanged.Hands-on, for the owner
gh pr mergeprompt: the blue line at once; Yes, and the working mark within about a second, held while the merge runs; Finished at the end on another tab.🤖 Generated with Claude Code
https://claude.ai/code/session_01FHHaWKR4M5QtW7Wecyuk4t