Repository navigation
fix(claude): a background Bash keeps the session in Implementing - #283
Merged
Merged
Conversation
Claude re-invokes the model when a run_in_background Bash ends, but the roster named it a plain `command`, which upstream treats as a dev server left running. The session then looked finished (Ready, no badge) while the agent was still waiting. Mark Claude background commands `wakesAgent`, and let such a command hold completion like a monitor. Codex commands do not change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Problem
A Claude session that waits on a
run_in_backgroundBash shows under Ready with no badge. Example: "Start Sessions from Today's To-Do" waited on "Wait for the Automations deploy run to finish". The Claude adapter names that taskcommand. The upstream rule (backgroundWorkHoldsCompletion, pingdotgg#2829) does not hold forcommand, because it assumes a dev server that the agent left running. But the Claude CLI starts the model again when a background Bash ends, so the agent is not done.Fix
commandroster task gets an optionalwakesAgentfield. This is additive, so old rosters still decode.wakesAgent: trueon background Bash tasks. This is a two-line wrapper with a marker.backgroundWorkHoldsCompletionholds for acommandwhenwakesAgentis true.Result: the row goes to Implementing with the "Monitoring" badge, the same as for a
Monitorcall. Auto-settle and the "done" alert also wait until the shell ends. Codex commands and other providers do not change.Trade-off: if a Claude agent starts a dev server in the background and leaves it, the row stays in Implementing until the server stops.
Evidence
orchestrationV2PendingBackgroundWork.expbkt3.test.ts.wakesAgent: true.🤖 Generated with Claude Code