Repository navigation
fix(codex): deliver early background command results - #833
Merged
lastobelus merged 3 commits intoNov 23, 2026
Merged
Conversation
Retain owed results when a marked terminal exits before its turn ends. Offer the wake after durable turn finalization so it carries the original delegated task and respects Stop. Keep foreground command results in their original tool response. Limit the background-wait instruction to commands that need manual registration and use the shorter lc-run launch message. Follow-up to #791, #831 and #832. The same settled-turn requirement is present in https://redirect.github.com/pingdotgg/t3code/pull/37572 at 5e048c2. Carry-Group: incubator Carry-Fix: #824
A yielded wrapper can exit while a sibling tool still runs. Codex reports usage after the entire tool batch drains, so batch timing cannot identify the launch result. Retain the exit until the turn's terminal record is saved and check its own saved tool response for the session ID. Drop foreground results that already returned through the launch. Carry-Group: incubator Carry-Fix: #824
Remove native transcript reads from Codex turn finalization. Keep exact terminal acknowledgment for result delivery and use the observed tool batch to distinguish the common yielded wrap from a foreground command. Track early exits within a still-running parallel tool batch under #824. Carry-Group: incubator Carry-Fix: #824
lastobelus
marked this pull request as ready for review
November 23, 2026 09:13
Owner
Author
|
@codex review |
Codex Review Summary: ✅ CompletedThis 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. |
|
Codex Review: Didn't find any major issues. Another round soon, please! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
This was referenced Nov 23, 2026
lastobelus
added a commit
that referenced
this pull request
Nov 23, 2026
Two Luna eval runs ended their turn on the opening hint without waiting, because the wrapper command wasn't registered. They ran `ls scripts/lc-run && ./scripts/lc-run wait-checkpoint` and `pwd && git rev-parse --short HEAD && ./scripts/lc-run ci --quick`. The old matcher rejected both chains. Part of #824. **What changed** - A supported wrapper invocation is now recognized as the final command after literal simple commands joined by `&&` or `;`. - Pipes, `||`, `&`, redirects, substitutions, subshells, duplicate wrapper invocations, and any step after the wrapper stay outside the grammar. - The server marks the command at start. If a failed `&&` step skips the wrapper, the #833 early-result handoff wakes the agent once with the chain's output and exit code. - A Codex replay with synthetic provider events covers this path. - The opening line is unchanged. The wrapper sees only the session flag and cannot tell whether the server registered the command. **Verification** - Both focused suites (68 tests), changed-file checks, and Quick CI passed on `d942a65896a71f9f1e4d1c95a52eeb1340ebade5`. - One round with GPT-6.1 Terra (xhigh) approved `d942a65896a` with no findings. - Live verification on the PR head is pending. Implemented with GPT-6.2 Sol in Codex. Carry-Source-Ref: refs/lastcode/carry-sources/pr-836/d942a65896a71f9f1e4d1c95a52eeb1340ebade5 Carry-Source-Base: de98dd4 Carry-Source-Head: d942a65
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Codex could drop the result of a command a thread was waiting on. If the command exited just before the marking turn ended, the result landed in the command item, and the thread and its delegated parent could finish before Codex saw it.
What changed
t3_background_waitmatches the command.lc-runreports a registered wake. Thelc-runlaunch line says LastCode already registered the wake and to end the turn without calling a tool. The standing instruction is 23 bytes shorter, and the wrapper prints the 316-byte launch line from the eval. The setting remains opt-in.Proof
An automatically marked wrapper can still miss its wake if it yields and exits before the other tools in the same batch finish. Track that case in the #824 soak.
Follow-up to #791, #831 and #832. Tracks #824 and convergence under #823. The same settled-turn condition is present in upstream #37572 at
5e048c23d68396b46e7a2e387755da157dd04bee.Local review: 3 rounds with GPT-6.1 Terra (xhigh) at 02b382a, approved.
Implemented with GPT-6.2 Sol in Codex. PR copy reviewed with Claude Sonnet 5.5 in Claude Code.