Repository navigation
Backport native Codex completion delivery fix - #130328
pash-openai merged 3 commits into
Conversation
* Fix missing replies after native Codex subagents finish * Fence subagent completion during parent startup (cherry picked from commit 8e9db5e)
|
🦞👀 Pull request received. I will update this pull request when review starts. |
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: 5eccdb7527
ℹ️ 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".
| const childThreadId = this.childThreadIdsByAgentPath.get( | ||
| buildParentAgentPathKey(state.parentThreadId, agentPath), | ||
| ); | ||
| const child = childThreadId ? this.childStates.get(childThreadId) : undefined; | ||
| if (!child || child.parentThreadId !== state.parentThreadId) { | ||
| continue; |
There was a problem hiding this comment.
Buffer receipts while task-row recovery registers children
When a monitor is recreated with an existing native-child task row, reconcileTaskRowsForParent waits asynchronously for thread/read; a native completion receipt can arrive during that wait, before registerChildThread populates this map. This branch silently discards the receipt, so later recovery marks the child pending and unregister() injects the completion again—the same extra turn that can replace the parent's answer with NO_REPLY. Retain requester/turn-scoped receipts until reconciliation finishes, then match them when the child is registered.
AGENTS.md reference: AGENTS.md:L30-L32
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Confirmed with two failing regressions: the history read can finish either before or after parent release, and both injected the result twice. Fixed on main in #130347 (a021f79) and backported here. Receipts stay scoped to the owning parent run and its already outstanding recovery candidates; authoritative history restores the child agent path before matching. Tests also cover foreign turns, different parent lineage, and stale receipts in a later run. Native receipt acknowledgement still does not determine task success.
|
This backport contains mainline carriers 8e9db5e and a021f79, adapted only to the release branch's existing reference-counted parent ownership. The turn-start binding is its existing caller's only additional integration change. No newer main subscription/hook machinery is included. Exact head cf11a7c passes 351 focused tests with The release dependency audit and aggregate gate remain red on the four existing brace-expansion, fast-uri, nanoid, and undici advisories. The package manifests and lockfile are byte-identical to base 9e0ff43. I am landing this bounded delivery repair with that known existing audit exception, not claiming full green CI or changing the audit to hide it. Dependency remediation remains separate release maintenance. The recovery review is addressed in the upstream follow-up and here. Public Codex input delivery was checked directly in |
Backports the native Codex completion fix and its history-recovery follow-up onto this release branch. A child result already consumed by Codex must not be injected a second time after the parent writes its answer: that extra turn can replace the answer with
NO_REPLYand leave the user with nothing.The backport preserves this branch's existing monitor and reference-counted owners. It adds the small turn-binding hook needed to recognize native delivery, including results that arrive during startup. It does not pull in main's newer child-subscription and hook-retention changes. Detached children still wake their parent, and intentional silence remains unchanged.
The same ordering, startup, history-recovery, and trust-boundary regressions run here alongside this branch's existing monitor, projector, client, and task-mirroring tests. There are no dependency, configuration, model, prompt, or persisted-state changes.