Repository navigation
fix(server): Claude subagents that end between turns no longer stay Running (promote #301) - #307
Closed
bk-agent-01 wants to merge 7 commits into
Closed
bk-agent-01 wants to merge 7 commits into
bk-agent-01 wants to merge 7 commits into
Conversation
…s Running A background subagent's task_notification that arrives while the root turn is idle only went to the wake buffer, so its card completed when a continuation run drained it. A nested subagent's end never offers a continuation, and a held queue can keep the continuation from ever starting; on stage a reviewer subagent showed Running for a day after it finished. Between turns, a running registered subagent's end now completes its card at once through the turn that settled last, as its progress already does. The frame still waits in the wake buffer, so the wake label and continuation offer are unchanged; the drain skips the card update it already made, and the undrained end keeps pinning the session until then. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Stop holds every queued run, and each later queued run copied that hold. A continuation that ProviderContinuationService queues for output the Claude CLI already produced (it started a turn by itself) was held with them, so it never ran: the adapter kept that output, and every later wake on the thread, in its buffer. On stage this lost three agent replies and a subagent's completion. An adapter continuation (createdBy agent, creationSource provider) no longer copies the hold, and the queue starts the first queued run that is not held. Held user runs keep waiting for the user, in their order. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…inuations A second end that arrives behind a buffered resume must wait for the drain that re-opens the card, or the card stays Running. The queue helper's comment now says that a Codex continuation is a real prompt and also starts past a held queue. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…end-between-turns
…end-between-turns
Collaborator
Author
Collaborator
Author
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.
What this promotes
This promotes only PR #301 to
bkmain(production bkt3). It does not mergestage. The branch is cut fromorigin/bkmainand merges the #301 branch tip. The MCP work that also sits on that branch is already onbkmainthrough #306, so this diff adds only the 4 fix commits and 6 files.The fix (from #301)
The root cause, the evidence and the review answers are in #301.
How I tested
1be3edc6cand on3d2877292, the branch merged with the newerstage. One Grok replay test timed out once and passed on a rerun.c2d40cf8aat 19:04 UTC. Stage now runsf8fc0595c, which contains it.Merge impact
A merge restarts
t3-nextbkt3(bkt3 production) and ends the live sessions there. It needs the requester's explicit go.🤖 Generated with Claude Code