Repository navigation
Conversation
tianyilt
force-pushed
the
agent/fix-claude-pending-stop-state
branch
from
July 27, 2026 21:03
425446c to
dcc4867
Compare
Contributor
|
Closing as superseded by #11838, which cites this as a prior attempt and lands the background-task portion of #10997 (keep Claude If plan-mode / permission |
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 #10997.
What changed
Stopinworkingwhile ashellormonitorbackground task is still runningwaitingacrossStopfor unresolved permission requestsStoptowaitinguntil the plan is confirmeddone+interrupted)Before / after
The same sanitized Claude hook payload was posted to Orca 1.4.156 and to this branch.
The installed build returned
state: "done"while Claude reported1 shell, 1 monitor still running; this branch returnsstate: "working"for the identical payload.Why
Claude emits
Stopat a lead-turn boundary, not necessarily at true task completion. The normalizer previously mapped that event directly todone, and its background-task parser discarded non-agent task types. Permission and plan waits could likewise be overwritten by the following Stop.Verification
pnpm exec vitest run src/shared/agent-hook-listener.test.ts src/shared/claude-subagent-roster.test.ts— 155 passedpnpm run typecheck:nodeoxlinton the four changed TypeScript filespnpm run check:max-lines-ratchetpnpm run build:electron-vite