Repository navigation
🤖 fix: fence a child's stale goal-agent refusal and fix its recovery wording - #5454
Conversation
…wording Fixes #5452. --- _Generated with `xum` • Model: `anthropic:claude-opus-5-5` • Thinking: `high`_ <!-- mux-attribution: model=anthropic:claude-opus-5-5 thinking=high -->
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 90cfb0fe30
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 57afa72d14
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…al; assert the resume race
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 200f6e9a15
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5c69b7d4f7
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Readiness record (issue coordinator lane, workspace-63):
Generated with |
Summary
Fixes #5452. A sub-agent's fail-closed goal-agent check (#5402) awaited without fencing its dispatch. A refusal that went stale during the check could show an obsolete chat error and pause a goal that a newer attempt (or a just-resumed goal) owned. The refusal text also told the user to "select an available agent", which cannot help a child: the picker does not repin its
agentType.Implementation
TaskService.sendChildGoalTurnbuilds a synchronousstillCurrent(goal)check. It holds while the captured attempt is still the task's current attempt and the goal keeps the samegoalId,statusand user-activation stamp (every user Resume restamps it).refuseUnavailableGoalTurnAgenttakes a probe (it may now be async). The probe reads the goal under the goal file lock, then appliesstillCurrent, so the attempt is checked after that await.pauseForUnavailableAgentpasses the fence to the write. A new internalSetGoalInput.stillCurrentis evaluated under the goal file lock next toexpectedGoalId, and a refusal is agoal_conflict.reserveBudgetWrapupForRedispatchtakes the same fence for a budget-limited goal.resolveAgentForStream's goal-turn refusal for a sub-agent names the pinned agent to restore or enable before reactivating the task. It no longer asks the user to select an agent. It does not promise a goal resume, because a reported child cannot resume its goal yet (🤖 Sub-agent goals: follow-ups (parent spend ceiling, UI test, deleted child agent) #5411 item (c), deferred).Validation
Test-first. Before the fix:
All three pass after the fix. A further test, "an attempt replaced just before the refusal's pause write keeps its goal", fails if the write fence is removed.
Deferred
Risks
Low. The change only drops a refusal whose dispatch is stale, and only on the child goal-turn path. The newer attempt or goal runs its own fail-closed check before any goal turn. The root goal dispatcher's synchronous probe is still evaluated in the same tick as its chat error, with no await (tested).
Generated with
xum• Model:anthropic:claude-opus-5-5• Thinking:high