Repository navigation
fix(codex): explain when a resumed worker has a different parent - #206114
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: passed. What this changesTranslate a resumed worker’s parent-lineage mismatch into a specific tool denial instead of a generic relay-unavailable error. Example: A parent resumes worker 00000000-0000-4000-8000-000000000042 whose saved metadata names old-parent, then calls send_input.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this PR fixes a misleading diagnostic while preserving the existing worker ownership check; no actionable code defect was found. Reviewed head: Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Codex plugin’s native hook relay asks the subagent monitor to prepare worker input, then returns an admission result that Codex consumes before executing the tool. flowchart TD
A[Parent send_input] --> B[Native hook relay]
B --> C[Subagent monitor]
C --> D[Worker lineage check]
D --> E[Shared lineage error]
E --> F[PreToolUse denial]
F --> G[Codex blocks worker input]
Technical reviewBest possible solution: Retain the existing lineage rejection and report its specific cause through the relay’s established denial response. Do we have a high-confidence way to reproduce the issue? Source shows the saved-worker lineage exception escaping relay admission, and the PR reports a matching Gateway reproduction; no target code was executed during this read-only review. Is this the best way to solve the issue? The change is appropriately narrow: the monitor still owns admission, the relay translates one typed failure, and the existing build-state helper preserves error identity across duplicate plugin modules. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 279aeec1529f. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +17, Tests +18. Total +35 across 3 files. Added test files: 0. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment Reviewed November 26, 2026, 2:18 PM ET / 19:18 UTC. |
|
Redacted Gateway/Codex output for
{"build":"before","parentChanged":true,"resume":"accepted","send":"untyped-output","transportRefusal":true,"ownershipRefusal":false,"afterUnknown":{"count":2,"current":true}}
{"build":"after","parentChanged":true,"resume":"accepted","send":"untyped-output","transportRefusal":false,"ownershipRefusal":true,"afterUnknown":{"count":2,"current":true}}The harness labels a send without a submission ID The hosted extension job passed in 361 seconds for the whole job. |
|
Merged via squash.
|
What Problem This Solves
After Codex opens a different native parent thread,
resume_agentcan find a saved worker butsend_inputcannot use it. The parent sees “Native hook relay unavailable” even when the relay is healthy. That gives a running Goal the wrong reason to retry.User Impact
The parent sees “Cannot verify this worker belongs to the current parent. Check the original task before assigning new work.” The worker receives no input. A successful resume alone does not authorize a follow-up.
Why This Change Was Made
Keep the rejection at the monitor's existing parent check. Share its error type across copies of the same plugin build and translate only that error into a PreToolUse denial. Recheck admission before returning the reason. Other errors propagate as before. No permission, persistence, or configuration changes.
Evidence
Isolated Linux Gateway and Codex 0.164.0 with synthetic inference. Two runs started from the same saved chat, goal, two completed worker turns and history. Both changed the synthetic connection credential. The second build added this patch to the first build on 82b682c with goal-handling fixes backported.
With a stable parent, the original worker answered a third task, automatic pursuit used its answer, and the goal completed. After a cold return the worker answered a fourth. The test matched the tool catalog across both builds. This diagnostic does not restore authority when a parent changes.
The registered relay regression failed on the original lineage exception. Both focused suites passed (25 tests, 69.62 s with one worker). The changed case took 140 ms. With the relay importing a second copy of the input module, the six relay tests passed again (164.58 s including a cold build). Formatting, diff checks and type-aware lint against SDK source passed. The isolated checkout reused older dependencies. Package-boundary lint reported the same four unresolved SDK type errors on both revisions.