Skip to content

fix(codex): recover tool summaries after unfinished earlier work - #181718

Merged
obviyus merged 6 commits into
openclaw:mainfrom
indra622:fix/settled-recovery-prior-context-20261023
Oct 26, 2026
Merged

obviyus merged 6 commits into
openclaw:mainfrom
indra622:fix/settled-recovery-prior-context-20261023

Conversation

@indra622

@indra622 indra622 commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Related: #128916

What Problem This Solves

Fixes missing Codex summaries when a completed tool turn follows an unfinished tool exchange in earlier conversation history.

User Impact

A turn with complete current evidence can recover its final answer without rerunning completed actions. Recovery may omit earlier conversation and reports that omission; persisted history stays intact.

Why This Change Was Made

At the verified current-turn boundary, an unfinished prior exchange makes the earlier replay prefix unusable. Omit that prefix as a whole and reuse the existing bounded omission notice. User steering within a completed exchange stays atomic. Current-turn pairing, provenance, call-ID uniqueness, content validation, and recovery eligibility keep their existing guards.

This addresses one recovery failure contributing to #128916; it does not claim to solve that issue in full or explain why a native model/server originally returned an empty final.

Latest integration

Head 293edef0c945e0745aca3e778404d5ee2dd8b3b9 merges current main. The prior-context test conflict retains upstream’s consolidated layout, adds the pending-prior call-ID reuse row, and removes only the obsolete expectation that unfinished earlier context must reject the verified current turn. Production projector bytes are unchanged from proven d7501c4cae3f9eb0d7905ee899d14e9a972b508a, so the linked public-CLI A/B proof carries without a new behavior claim.

Fresh frozen install, changed-test format check, and both focused prior-context/native-finalizer files pass: 18/18 tests, including ordinary and oversized unfinished-prior native scenarios. Simplification retains the existing projector and omission owner, with no new seam: production +10/-1, tests +71/-16, docs +4/-1 against integrated main. No broader issue-closure claim.

Evidence

Fresh exact-head native CLI A/B proof: main 32276e16fb7807083d4452f2a9ec50084f6c95ae twice and candidate d7501c4cae3f9eb0d7905ee899d14e9a972b508a twice. Fresh container builds passed. Shipped CLI launches real bundled Codex app-server 0.164.0 with a local Responses fixture. Main rejects the complete current exchange due to unfinished prior history; candidate persists the recovered summary. Each physical action occurs exactly once; prior transcript-event bytes remain identical after shutdown. No external-model or channel-delivery claim.

  • Two new scenarios in the existing native finalizer fixture fail on the base with missing settled-tool evidence and pass with the patch: ordinary unfinished prior work and an oversized omitted prior exchange that still has a pending call.
  • The fixture uses the real native process, SQLite transcript reader, context capture, and private finalizer against scripted local provider responses. It verifies the recovered summary is persisted, the original transcript remains unchanged, and the completed action runs once. No real external model or Discord delivery is claimed.
  • Six focused files: 88 tests pass. Runner wall time: 32.3 seconds. The changed native file's tests took about 8.1 seconds; it covers native process/auth/persistence boundaries that a projector-only test would miss. The prior-context file's tests took milliseconds. CI seconds are not yet available.
  • Existing cases cover current incomplete pairs, provenance drift, duplicate identities/IDs, unsupported content, bounded contiguous history, steering across a completed tool exchange, cancellation, and isolated finalization.
  • Full Codex extension attempt: the final shard reports 5,239 tests passed, 2 failed, and 17 skipped (20.2 minutes wall time). Both failures are unchanged transport-startup.test.ts descendant-containment cases with ProcessInspectionError (reason: permission) on macOS. Both exact failures also reproduce on the clean pinned base with an independent frozen install and the same test wrapper: 2 failed, 2 deselected, exit1 in 31.6 seconds. They are baseline-host permission failures; no permission/config changes or unrelated fixes were made. The two new native regressions passed in this run.
  • Independent final-candidate rerun of the 88 focused tests: exit 0 in 41.7 seconds.
  • Production and test source typechecks, targeted type-aware lint, formatting, and the changed document MDX check pass. Author simplification is complete; final canonical autoreview is scoped-clean through P0–P2. CI seconds are not yet available.

Validation gaps: no live external provider/channel run or deployment. The first package-boundary typecheck lacked SDK declarations; the documented source typechecks subsequently passed. A missing required fixture option was corrected and the final candidate was reviewed again. The Codex extension lane is not green on this host: both process-inspection failures reproduce without this patch on the pinned base. No live containment claim is made from these failing tests; their finally blocks perform ownership-bound cleanup, but no separate post-hoc descendant-liveness receipt was retained.

Public CLI boundary proof (2026-10-23)

Addressing the requested entry-point proof on the reviewed head c7d1b85cefaf230bf5b487ceb3102778ab898173. Separate normal pnpm build:runtime builds of candidate and pinned base 3e4251331e83d844498fc66f70675f97f98616e5 were exercised through node openclaw.mjs agent --local, with the real pinned Codex CLI 0.162.1. The parent independently reran both and inspected the persisted SQLite finalizer record and physical action-count file. The source checkout remains clean at the reviewed head; no code changes were needed.

Scope and fault injection: a deterministic local HTTP Responses server supplies model responses; this is not real external-model, Gateway, channel-delivery, npm-installation, or deployment proof. The public CLI first creates isolated state, then a preparation utility seeds a synthetic unanswered earlier tool call through the public transcript SDK. The current turn uses the advertised openclaw_direct.exec tool to append one line to a task-owned file. Only after observing its completed tool output and physical count 1 does the provider inject one empty completion. The unmodified native launcher, product CLI, recovery owners, and persistence decide the outcome; no private finalizer is directly invoked for the current turn.

Candidate: CLI exit 0, one recovery request, final answer persisted. Base negative control: CLI exit 1, incomplete_pairing / context_unavailable, no recovery request or persisted answer. Both perform the action exactly once and preserve the prior event prefix byte-for-byte. Hashes below cover the exact previously stored event text/blob prefix, not the mutable whole database; independent synthetic sessions have different hashes. Observed task-owned processes exit and proof ports close.

Redacted terminal output and read-only persistence measurements from the independent reruns:

BASELINE 3e4251331e83d844498fc66f70675f97f98616e5
CLI exit: 1
Action count: 1
Recovery provider requests: 0
Persisted final answer: false
Earlier event prefix SHA-256 before: 76541000cfbc9eef927ea7cf8c8b060f314bd4df70c870cfe7662fdf8c02cec6
Earlier event prefix SHA-256 after:  76541000cfbc9eef927ea7cf8c8b060f314bd4df70c870cfe7662fdf8c02cec6
Observed owned processes remaining: 0; proof provider port closed
[agent/embedded] codex settled-turn finalization context capture failed reason=incomplete_pairing
[agent/embedded] settled post-tool turn lacked a final answer: runId=<synthetic-id> sessionId=<synthetic-id> provider=openai/gpt-5.6-sol — running isolated finalization

CANDIDATE c7d1b85cefaf230bf5b487ceb3102778ab898173
CLI exit: 0
Action count: 1
Recovery provider requests: 1
Persisted final answer: true
Earlier event prefix SHA-256 before: f437fe1f6788cfdd48b109a1ec5a79716ae3edc20cf0645a7f2cf33aa41d5527
Earlier event prefix SHA-256 after:  f437fe1f6788cfdd48b109a1ec5a79716ae3edc20cf0645a7f2cf33aa41d5527
Observed owned processes remaining: 0; proof provider port closed
[agent/embedded] settled post-tool turn lacked a final answer: runId=<synthetic-id> sessionId=<synthetic-id> provider=openai/gpt-5.6-sol — running isolated finalization

Persisted candidate answer: Recovered summary: the current action completed once; earlier context was omitted.

Public entry command shape (synthetic identifiers and prompt redacted):

node openclaw.mjs agent --local --agent main \
  --session-key '<synthetic-key>' --session-id '<synthetic-id>' \
  --message '<synthetic-current-task>' --thinking off --timeout 120 --json

Entry SHA-256: 17aef9acdbe968fc07fa80685319c6fe974e019a89e0d657042b10129bc7ea51. Frozen task-local harness SHA-256: 10cf2ef6dd9ddabf8d96f3b02a2576117f9f6fffb3b709e14b1728cb330e8fef. This extends the existing private-fixture evidence to the public CLI boundary; it does not establish natural empty-response causation or real-model tool selection. Maintainer review determines whether this satisfies the proof gate.

Main integration (2026-10-25)

Updated head: dbfed01061169f356193502f1371aa074e7cda8c, a non-force merge of main 730a97454673f6382d960102f6a06ecf4869ff81 into the existing PR branch. The single native-test scenario-list conflict retains both the unfinished-prior regressions and upstream prompt-less stranded-reply retry scenarios. The production change, prior-context test, and documentation are unchanged from the previously reviewed head; only the original four files differ from integrated main.

Fresh integration checks: 97 focused tests across six files passed, including native finalizer and prompt-prefix stability coverage. An independent rerun of the prior-context and native-finalizer files passed all 22 tests. Four-file formatting, targeted type-aware lint, targeted typecheck, and the PR diff whitespace check passed. The worktree-local frozen install did not change the lockfile. Earlier public-CLI proof above remains evidence for its explicitly pinned earlier head; it was not rerun for this mechanical integration. New-head GitHub CI is tracked separately.

Follow-up main integration (2026-10-25)

Current head: 0e5e483b3dc0462df28fe4d8bc3e7a220266ff74, including fetched main 40b3e0552180f0ba2416d6d6576579c50af8f69e. The renewed native-fixture conflict retains both unfinished-prior assertions and upstream same-run transient-retry assertions, including the upstream hidden-or-continuation condition. Production code, prior-context tests and docs remain unchanged from the original reviewed PR; the delta against integrated main remains the original four files. The local frozen install follows upstream's Codex 0.164.0 pin without changing dependency declarations or the lockfile.

Focused verification: 99 tests across six files pass; formatting, targeted type-aware lint, typecheck and PR-diff whitespace checks pass. The last main-integration step adds only an unrelated upstream benchmark change, with affected source, tests, dependency files and the scoped PR delta verified unchanged. An independent exact-final-head rerun of prior-context and native-finalizer tests passed all 23 tests. Earlier CLI proof retains its explicitly stated earlier head and synthetic-provider scope; no new live-provider, Gateway or broad-suite claim is made. New-head GitHub CI is tracked separately.

Main integration and test consolidation (2026-10-26)

Current head: d7501c4cae3f9eb0d7905ee899d14e9a972b508a, an ordinary merge of pinned main 65112cda4acb357a13cd772641ed88acd9bb5759. The native-fixture conflict is resolved without restoring tests or fixtures retired by upstream's consolidation. Both unfinished-history regressions and their omission assertions remain, together with upstream prompt-less retry and same-run continuation coverage. Production code, prior-context tests and recovery documentation remain byte-identical to the original reviewed PR. The delta against integrated main remains four files (78 additions / 13 deletions); the import adjustment is needed because upstream removed its earlier transcript-append usage.

Fresh verification: all 94 tests across six focused files pass, plus formatting, targeted type-aware lint, typecheck and PR-diff whitespace checks. The lower count reflects upstream's native-test consolidation, not removal of either PR regression. An independent exact-head rerun of prior-context and native-finalizer passed all 18 tests. The frozen worktree-local install preserves main's dependency declarations and lockfile. A separate merge-tree check against later live main a14fa613c67820dd4b7884ee3ae661f3f942655c exited 0 without additional synchronization. Earlier CLI proof remains explicitly scoped to its earlier reviewed head and synthetic provider; no new live-model/Gateway proof is claimed. New-head hosted CI is tracked separately.

Not fixed here

The original cause of empty native-model completions, all other #128916 cases, historical unfinished actions, and external-provider/channel delivery are not fixed or proven here. This repair only allows a verified complete current exchange to finalize when earlier unfinished context cannot form a replayable suffix.

Merge danger

Two-way door: revert restores earlier prior-context rejection; no schema/config migration. Blast radius is isolated Codex post-tool finalization when its earlier replay context contains an unfinished exchange. Existing current-turn validation and once-only execution remain intact.

@clawsweeper

clawsweeper Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@indra622
indra622 marked this pull request as ready for review October 23, 2026 15:17
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation extensions: codex size: S labels Oct 23, 2026
@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P2 Normal backlog priority with limited blast radius. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 23, 2026
@clawsweeper

clawsweeper Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge.

What this changes

Allow Codex to recover a final summary from complete current-turn evidence when earlier history contains unfinished tool work.

Example: Earlier history contains unanswered tool call unfinished-prior-call; the current action completes once but returns no final text.

  • Before: Recovery rejects the history with incomplete_pairing and persists no summary.
  • After: Recovery omits earlier context, preserves the completed action, and persists a final summary.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) A small, well-supported repair with no findings; its contribution remains a partial fix for the broader linked issue, and required CI is pending.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (terminal): The supplied isolated public CLI runs use the real bundled Codex process and controlled Responses endpoint: candidate recovery persists a summary, preserves prior event bytes, and executes the action once; base runs fail, and the reviewed production projector and finalizer match the proven candidate.
Patch quality 🦞 diamond lobster (5/6) No actionable review findings were identified.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Partial
User problem: Completed Codex work can lose its final summary because an earlier tool exchange never finished.
Reason: The focused repair restores useful summaries without replaying actions; Related correctly preserves the broader linked issue's separate delivery and observability work.

Merge readiness

✅ Ready for maintainer review

Keep open: this PR provides a focused recovery fix that current main still needs, with no actionable introduced defects found.

Priority: P2
Reviewed head: 293edef0c945e0745aca3e778404d5ee2dd8b3b9

Before merge

None.

Findings

None.

Agent review details

How this fits together

The Codex plugin projects verified transcript evidence into bounded history for an isolated, tool-free finalization turn, whose answer is persisted through the existing transcript owner.

flowchart TD
  A[Stored conversation] --> B[Current-turn evidence verifier]
  B --> C[Prior-context projector]
  C --> D[Bounded recovery history]
  D --> E[Isolated Codex finalizer]
  E --> F[Persisted final summary]
Loading

Technical review

Best possible solution:

Land this focused omission repair through the existing recovery owner once required CI passes, while retaining the broader failure-delivery issue.

Do we have a high-confidence way to reproduce the issue?

Current-main source deterministically rejects an unfinished prior tool exchange at prependTo; the supplied native CLI A/B evidence confirms that failure and recovery without replaying the action.

Is this the best way to solve the issue?

The existing prior-context projector is the correct owner: omit its unusable replay prefix only after current evidence is verified, preserving pairing, provenance, uniqueness, and budget checks.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against dea6ff0cd0a3.

Provenance checked

  • Prior-history completion requirement changes intended behavior with a stated reason (bceb739: Retain only whole earlier exchanges, validate omitted history, and reserve recovery limits for complete current evidence.)
  • Consolidated native and prior-context tests keeps the original intent (test(core,plugins): remove low-value tests (batch d600) #184375: Reduce duplicated fixtures while retaining owner-boundary checks; the integration extends the consolidated layout and removes only the expectation intentionally changed by this fix.)
  • Recovery documentation keeps the original intent (e157c6b: Split the Codex runtime guide by reader task while preserving its recovery contract.)

Testing

Proof path: shipped entry point.

Security

None.

Evidence

What I checked:

Likely related people:

  • Baris Albayrak: Raw commit bceb739 adds extensions/codex/src/app-server/settled-turn-projection.ts:374 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: bceb73905bf3; files: extensions/codex/src/app-server/settled-turn-projection.ts)
  • Peter Steinberger: Raw commit b080dd1 adds extensions/codex/src/app-server/settled-turn-projection.ts:3 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: b080dd1e765a; files: extensions/codex/src/app-server/settled-turn-projection.ts)
  • joshavant: Raw commit 60f49dc adds extensions/codex/src/app-server/settled-turn-projection.ts:5 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: 60f49dcc0423; files: extensions/codex/src/app-server/settled-turn-projection.ts)

PR surface

Source +9, Tests +55, Docs +3. Total +67 across 4 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 10 1 +9
Tests 2 71 16 +55
Docs 1 4 1 +3
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 4 85 18 +67

Labels

Label changes:

No label changes.

Label justifications:

  • P2: Repairs a bounded Codex final-summary recovery failure after completed tool work, without changing normal execution or delivery policy.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦞 diamond lobster and patch quality is 🦞 diamond lobster.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.
  • proof: sufficient: Contributor real behavior proof is sufficient.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (3 earlier review cycles)
  • reviewed 2026-10-23T15:35:27.441Z sha c7d1b85 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-23T16:25:52.020Z sha c7d1b85 :: needs maintainer review before merge. :: none
  • reviewed 2026-10-26T15:57:58.163Z sha d7501c4 :: needs maintainer review before merge. :: none

Reviewed October 26, 2026, 12:11 PM ET / 16:11 UTC (Revision 4).

@indra622

Copy link
Copy Markdown
Contributor Author

Added public-CLI boundary evidence to the PR body for the unchanged reviewed head c7d1b85cefaf230bf5b487ceb3102778ab898173, including redacted terminal output from independently rerun candidate/base builds. Candidate persists the recovered answer; base rejects with incomplete_pairing. Both preserve prior stored event bytes and execute the completed action once. The body explicitly discloses synthetic prior state and deterministic provider fault injection; no live external-model/Gateway/channel claim is made.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 23, 2026
@obviyus

obviyus commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Fresh exact-head native Codex CLI A/B proof

Candidate d7501c4cae3f9eb0d7905ee899d14e9a972b508a versus main 32276e16fb7807083d4452f2a9ec50084f6c95ae, each twice in fresh isolated profiles. Both node:24.22.1 container pnpm build runs passed. Shipped node openclaw.mjs --profile <isolated> agent --local launched the bundled Codex app-server 0.164.0 against a deterministic local HTTP Responses fixture. No external model/account, API key, Gateway, or channel-delivery claim.

The CLI first initializes the real native session. A preparation utility then appends one synthetic unanswered earlier tool call using the shipped public transcript SDK (runtime config prepared, normal append ownership; no raw DB writes). The current native turn invokes the advertised openclaw_direct namespace exec function once to append a marker line. Only after the provider sees the tool output and independently observes one physical marker line does it inject an empty completion. The unmodified product recovery/finalization/persistence owners determine the outcome; no private finalizer invocation.

main, repetition 1

{
  "exitCode": 1,
  "actionCount": 1,
  "recoveryRequests": 0,
  "persisted": false,
  "prefixBeforeSha256": "602de726c2d04478dcc4099c5c1bdebba39adf852c1fed072af8598eae93fce9",
  "prefixAfterSha256": "602de726c2d04478dcc4099c5c1bdebba39adf852c1fed072af8598eae93fce9",
  "runtime": "codex",
  "finalAnswer": []
}

main, repetition 2

{
  "exitCode": 1,
  "actionCount": 1,
  "recoveryRequests": 0,
  "persisted": false,
  "prefixBeforeSha256": "d108d4576d8ede07a6692c8b7a527b10c5e3896d8f2210d136c1c186d73eb84a",
  "prefixAfterSha256": "d108d4576d8ede07a6692c8b7a527b10c5e3896d8f2210d136c1c186d73eb84a",
  "runtime": "codex",
  "finalAnswer": []
}

candidate, repetition 1

{
  "exitCode": 0,
  "actionCount": 1,
  "recoveryRequests": 1,
  "persisted": true,
  "prefixBeforeSha256": "e63756b4992cc5eb712e56f12e6d7f1cda84c72e57b9aaab0849eb04434510c0",
  "prefixAfterSha256": "e63756b4992cc5eb712e56f12e6d7f1cda84c72e57b9aaab0849eb04434510c0",
  "runtime": "codex",
  "finalAnswer": [
    "Recovered summary: the current action completed once; earlier context was omitted."
  ]
}

candidate, repetition 2

{
  "exitCode": 0,
  "actionCount": 1,
  "recoveryRequests": 1,
  "persisted": true,
  "prefixBeforeSha256": "903f7f6c6b51c02ac9c016b05b66463585e8e7a068a13c29fc4fd0e3162fc10a",
  "prefixAfterSha256": "903f7f6c6b51c02ac9c016b05b66463585e8e7a068a13c29fc4fd0e3162fc10a",
  "runtime": "codex",
  "finalAnswer": [
    "Recovered summary: the current action completed once; earlier context was omitted."
  ]
}

Both main runs reject recovery with incomplete_pairing / context_unavailable, CLI exit 1, no recovery provider request or persisted summary. Both candidate runs make one text-only recovery request and persist the returned summary, CLI exit 0. In all four runs the completed action happens once and the exact earlier transcript-event prefix stays byte-identical (SHA-256 receipts above; read after CLI shutdown). No provider retry or action replay is used to obtain success.

Not fixed here: this does not explain or prevent an original empty native-model completion, solve all of #128916, repair historical unfinished actions, or prove external-model/channel delivery. It fixes only finalization after a verified complete current exchange when the prior replay suffix is unfinished. No source edits/pushes in this proof pass.

@obviyus

obviyus commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

…prior-context-20261023

# Conflicts:
#	extensions/codex/src/app-server/settled-turn-prior-context.test.ts
@obviyus

obviyus commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
Exact review queued.

Re-review progress:

@obviyus
obviyus merged commit c12e36d into openclaw:main Oct 26, 2026
101 of 102 checks passed
@obviyus

obviyus commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Landed in c12e36d. Thanks @indra622. Codex tool-summary recovery now handles the current exchange despite older unfinished items.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Oct 27, 2026
…nclaw#181718)

fix(codex): judge tool-summary recovery on the current exchange, not earlier unfinished items

Codex tool-summary recovery rejected a valid current exchange when earlier, unfinished prior-context items were present, so no summary was saved. Recovery now judges the current exchange on its own; earlier history is left untouched.

Evidence: shipped `agent --local` on the real Codex 0.164.0 runtime with a local Responses fixture. On main recovery rejected the exchange as an incomplete pairing and saved no summary (twice); with this change it saved the summary with one action (twice), and the earlier event history was byte-identical in all four runs. The production files are unchanged by the later merge with main. Details: openclaw#181718 (comment). Items under "Not fixed here" in the body are not addressed.

Thanks @indra622.

Co-authored-by: Ayaan Zaidi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation extensions: codex P2 Normal backlog priority with limited blast radius. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants