Skip to content

fix(lastcode): await wrappers at the end of shell chains - #836

Merged
lastobelus merged 1 commit into
lastcode/mainfrom
lastcode/background-wait-shell-chains
Nov 23, 2026
Merged

lastobelus merged 1 commit into
lastcode/mainfrom
lastcode/background-wait-shell-chains

Conversation

@lastobelus

@lastobelus lastobelus commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

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 fix(codex): deliver early background command results #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.

Agents sometimes precede the wrapper with shell checks. Mark simple chains that end in one wrapper invocation so their result is retained even when an earlier step fails.

Implemented with GPT-6.2 Sol in Codex.

Carry-Group: incubator
Carry-Fix: #824
Carry-Observation: LastCode command wrapper
@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-23T19:39:28.573533Z d942a65 Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: d942a65896

ℹ️ 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".

@lastobelus
lastobelus merged commit 2d2b415 into lastcode/main Nov 23, 2026
23 checks passed
@lastobelus
lastobelus deleted the lastcode/background-wait-shell-chains branch November 23, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant