fix(client-runtime): map cancelled and interrupted subagent terminal statuses - #11608
fix(client-runtime): map cancelled and interrupted subagent terminal statuses#11608Exotic209093 wants to merge 1 commit into
Conversation
…statuses Codex subagents that complete with 'cancelled' or 'interrupted' status were falling through to 'running' because TASK_COMPLETED_STATUS only covered completed, failed, and stopped. Add both missing entries so the fold correctly marks them as terminal. Fixes pingdotgg#11164
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. |
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a focused client-runtime bug fix that maps existing cancelled and interrupted completion statuses to their corresponding terminal states. It adds targeted tests and does not affect schemas, defaults, infrastructure, security, billing, or static-analysis configuration. You can add or adjust custom eligibility rules. Learn more. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 62e0f58d2d
ℹ️ 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".
| ["cancelled", "cancelled"], | ||
| ["interrupted", "interrupted"], |
There was a problem hiding this comment.
Extend the task-completion wire contract
These branches cannot handle normal production events because TaskCompletedPayload.status in packages/contracts/src/providerRuntime.ts still permits only completed, failed, and stopped; current Codex interruption paths also emit task.updated, not task.completed. The new tests bypass that contract with a cast, so they exercise fabricated activity rows while the reported live task.completed scenario remains unsupported. Add these statuses to the contract and normalize them through the relevant adapter and ingestion paths before relying on this client mapping.
AGENTS.md reference: AGENTS.md:L71-L72
Useful? React with 👍 / 👎.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe runtime now maps ChangesSubagent terminal status mapping
Priority: ⬆️ High Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix · Severity of issue fixed: High Suggested reviewers: Merge Risk: ⚪ Minimal · up to Cancelled and interrupted subagent completions now retain their terminal states, with tests covering their results and completion timestamps. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation Issue
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Codex subagents that complete with 'cancelled' or 'interrupted' status were falling through to 'running' because TASK_COMPLETED_STATUS only covered completed, failed, and stopped. This adds both missing entries so the fold correctly marks them as terminal.
Fixes #11164
Summary by CodeRabbit