fix(codex): interactions no longer revive idle sub-agents - #5718
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough
ChangesCodex activity status handling
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
ApprovabilityVerdict: Approved 0ce04fe Straightforward bug fix that removes incorrect status transitions for sub-agent 'interacted' events. The change is limited to a single case in an event mapper function and includes comprehensive test coverage verifying the expected behavior. You can customize Macroscope's approvability policy. Learn more. |
Problem
Codex emits
interactedactivity when the parent communicates with a child agent. T3 treated every interaction as proof that the child was running, so a message arriving after turn completion could revive an idle task row and leave the UI showing stale work.Fix
interactedactivity liveness-neutral at the Codex adapter boundary.collabAgent/turnStartedas the signal that a child resumed execution.Validation
vp test run apps/server/src/provider/Layers/CodexAdapter.test.ts— 26 passedvp run --filter t3 typecheckModel: GPT-5.6 Sol; harness: Codex in T3 Code.
Note
Fix
collabAgent/activityinteractions to no longer revive idle sub-agentsIn
mapCollabAgentEvent,collabAgent/activityevents withactivityKind: 'interacted'previously emitted atask.updatedevent with statusrunning, which caused idle sub-agents to appear active again. These events now return an empty array sinceinteractedsignals communication, not execution — onlycollabAgent/turnStartedtriggers the running state. A test is added to assert the correctrunning → idle → interruptedsequence.Macroscope summarized 0ce04fe.
Note
Low Risk
Narrow event-mapping fix in the Codex adapter with a focused regression test; no auth, data, or API surface changes.
Overview
Fixes sub-agent task rows flipping back to running when Codex sends
collabAgent/activitywithactivityKind: 'interacted'after a child turn has already completed.In
mapCollabAgentEvent,interactedno longer emits atask.updatedwith statusrunning; it returns no events because it signals parent–child communication, not execution.collabAgent/turnStartedremains the signal that a child resumed work.A lifecycle regression test asserts the adapter stream stays
running → idle → interruptedwheninteractedarrives between turn completion and agent close.Reviewed by Cursor Bugbot for commit 0ce04fe. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit
Bug Fixes
Tests