Skip to content

Keep native completion receipts through child recovery - #130347

Merged
pash-openai merged 1 commit into
mainfrom
pash/native-completion-recovery-receipts
Aug 26, 2026
Merged

pash-openai merged 1 commit into
mainfrom
pash/native-completion-recovery-receipts

Conversation

@pash-openai

Copy link
Copy Markdown
Contributor

Follow up on #130311: native completion input can reach a parent while OpenClaw is still recovering its child mapping from app-server history. Discarding that receipt makes the later recovery announce a result the parent has already used, recreating the duplicate turn that can hide its answer.

Keep the receipt with the parent run and its in-flight recovery, then match it against the child's authoritative lineage and agent path. A later parent run gets a fresh receipt set; another turn or another parent cannot acknowledge the recovered result. Native delivery still does not determine task success, and detached completions still use the existing delivery path.

This closes the history-read race identified in #130328 (comment). It changes no configuration, dependencies, or final-answer selection.

@clawsweeper

clawsweeper Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Codex Review Summary

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-08-26T20:05:19.582241Z b29816d PR opened
ℹ️ 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.

@pash-openai

Copy link
Copy Markdown
Contributor Author

The task-row race reproduces on the pre-fix main tree in both orderings: history returns before the parent releases, or after it releases. Each incorrectly invokes synthetic completion delivery once. Both now acknowledge the recorded native input without invoking that delivery path. Foreign turns, different authoritative parent lineage, and a later run reusing the same agent path remain unable to acknowledge the result.

At b29816d, 267 monitor/notification/task-mirror/projector/client tests and 179 run-attempt/steering/native-hook tests pass on Node 24.19.0. The commands were node scripts/run-vitest.mjs with those nine focused test files; focused oxlint --type-aware, oxfmt, and git diff --check also pass. CI: https://github.com/openclaw/openclaw/actions/runs/33008408762.

The dependency contract was checked directly in public Codex: codex-rs/core/src/session/mod.rs records inter-agent input before sending its raw-response event, codex-rs/protocol/src/protocol.rs defines the author/recipient input envelope, and codex-rs/core/src/session/handlers.rs owns mailbox delivery. This change retains that observed receipt while asynchronous OpenClaw history recovery establishes the child mapping; it does not infer success from it or change final-answer selection. The additional production state is run-scoped and retained only by already outstanding recovery candidates, with no persistence or new configuration.

@pash-openai
pash-openai merged commit a021f79 into main Aug 26, 2026
113 checks passed
@pash-openai
pash-openai deleted the pash/native-completion-recovery-receipts branch August 26, 2026 20:10
pash-openai added a commit that referenced this pull request Aug 26, 2026
pash-openai added a commit that referenced this pull request Aug 26, 2026
* Fix missing replies after native Codex subagents finish (#130311)

* Fix missing replies after native Codex subagents finish

* Fence subagent completion during parent startup

(cherry picked from commit 8e9db5e)

* Keep test teardown compatible with the release lint rules

* Keep native completion receipts through child recovery (#130347)

(cherry picked from commit a021f79)
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant