Skip to content

fix(code-mode): resume after read-only reconciliation - #132583

Merged
obviyus merged 3 commits into
openclaw:mainfrom
Marvinthebored:fix/code-mode-resume-after-reconciliation-v2
Aug 30, 2026
Merged

obviyus merged 3 commits into
openclaw:mainfrom
Marvinthebored:fix/code-mode-resume-after-reconciliation-v2

Conversation

@Marvinthebored

@Marvinthebored Marvinthebored commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Related: #128028

What Problem This Solves

When a Code Mode program changed state and then failed, OpenClaw ran one read-only reconciliation attempt and treated the inspection report as the final answer. The agent could tell the operator what remained, but it could not finish the task.

Root cause

The embedded-run retry owner had a safe transition into inspection but no bounded transition back to the normal tool loop. Replaying the failed Code Mode program was unsafe because an earlier nested call could already have committed.

Fix

  • Keep read-only reconciliation as the first recovery step.
  • Replace the proposal and frozen-plan protocol with one closed idle | inspect | resume state.
  • Disable Code Mode during resume and restore the normal direct-tool or Tool Search surface with real names and schemas.
  • Carry host-owned nested-call effect receipts into resume.
  • Block an exact name plus canonical-arguments repeat when its earlier effect was committed or uncertain.
  • Reserve one mutation attempt during preparation, consume it at implementation start, and return it when a prepared call never starts.
  • Return blocked or invalid calls as ordinary tool results so the model can inspect and adapt.
  • Keep reads and schema discovery available after the mutation attempt.

No model-authored transaction plan remains. There is no empty-plan continuation turn.

Safety

  • Missing nested-call provenance permits inspection only; it cannot authorize resume.
  • The replay fence survives ordinary attempt retries.
  • Tool Search preserves the fence for hidden core, client, MCP, and LSP targets.
  • A failed recovery mutation prevents later mutation work from running blindly, while readback remains available.
  • Plugin-owned harness transports remain outside this host-owned recovery path.

Evidence

The same direct-message task ran through Telegram's Test Server, the embedded OpenClaw runner, QuickJS-WASI Code Mode, and real openai/gpt-5.6-sol requests. A disposable file started with alpha=old and beta=old. One nested shell call changed alpha, then the Code Mode guest threw.

Revision Telegram result Independent file assertion
Current main 1e2408cd92f The bot reported alpha=applied, beta=old, and that beta still required work. Failed: the requested final bytes were absent.
Head 4593445efa8 The bot exposed Recovery Resume, made one edit, read the file, and replied with alpha=applied and beta=completed. Passed: the final bytes matched exactly.

Main completed three real OpenAI Responses requests. Head completed six. Both Telegram runners released their credential lease and removed disposable runtime state.

Validation

  • Focused recovery, runner, Tool Search, nested lifecycle, session wiring, bundle, harness, and Plugin SDK tests pass.
  • The changed-scope format, dependency, dead-export, type, lint, architecture, and database guards pass on the dependency-ready proof host.
  • Exact head 4593445efa8 completes the full repository build.
  • git diff --check passes.

Shape and production size

  • Shape: two reconciliation booleans become one closed recovery state. The recovery uses the existing dispatcher instead of a second plan executor.
  • Production: +648/-198, net +450. The growth adds the approved recovery capability, exact effect journal, replay fence, and one focused nested-lifecycle owner. The repair removes the contributor branch's proposal tool, generic validator, frozen plan, ordered-plan executor, and empty-plan turn.
  • Tests and test support: net +544.
  • Docs: net +9.

Dependency contract

OpenAI Codex records a tool call before dispatch and converts non-fatal tool failures into function-call outputs for the model in openai/codex@63d2138 codex-rs/core/src/tools/parallel.rs:74-90,219-243. It then marks a tool call as needing a follow-up model step in codex-rs/core/src/stream_events_utils.rs:298-328. This repair follows that normal error-result loop and adds OpenClaw's stronger effect and replay fence.

AI-assisted: yes. Codex assisted with implementation, review, tests, and sanitized live proof. A transcript is not attached because the repair session includes private Test Server identities, host details, and credential operations; the committed tests and public proof summary contain the reviewable contract.

@clawsweeper

clawsweeper Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

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

@openclaw-barnacle openclaw-barnacle Bot added agents Agent runtime and tooling size: M labels Aug 29, 2026
@clawsweeper clawsweeper Bot added P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 29, 2026
@Marvinthebored
Marvinthebored force-pushed the fix/code-mode-resume-after-reconciliation-v2 branch from 3e3b07a to 09c4699 Compare August 29, 2026 12:34
@clawsweeper

clawsweeper Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Codex review: needs maintainer review before merge. Reviewed August 30, 2026, 1:44 AM ET / 05:44 UTC.

ClawSweeper review

What this changes

This PR lets an embedded Code Mode run inspect a possible partial mutation, then make one replay-fenced direct-tool recovery attempt instead of ending after the inspection.

Merge readiness

⚠️ Ready for maintainer review - 5 items remain

The branch appears to repair the missing same-turn continuation after a partial Code Mode mutation, and no introduced correctness defect was found. Keep it open for a maintainer safety-boundary decision because it changes a formerly terminal failure into a constrained mutation path, while the explicitly cited Codex runtime contract could not be directly inspected in this read-only environment.

Priority: P1
Reviewed head: 4593445efa8c91777b30c73ea333e02faea608c6
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🐚 platinum hermit (4/6) The patch has concrete behavior evidence and coherent owner-boundary tests, with an owner decision still needed for its post-failure mutation semantics.
Proof confidence 🦞 diamond lobster (5/6) Sufficient (live_output): The PR body supplies an exact-head Telegram Test Server red/green run through the embedded OpenClaw runner and Code Mode: a partial nested mutation is inspected, one replay-fenced direct recovery completes the remaining edit, and an independent file assertion observes the improved result.
Patch quality 🐚 platinum hermit (4/6) No actionable review findings were identified.

Verification

Check Result Evidence
Real behavior Verified Sufficient (live_output): The PR body supplies an exact-head Telegram Test Server red/green run through the embedded OpenClaw runner and Code Mode: a partial nested mutation is inspected, one replay-fenced direct recovery completes the remaining edit, and an independent file assertion observes the improved result.
Evidence reviewed 6 items Current main stops at inspection: The fetched-main implementation transitions eligible failures into one read-only reconciliation attempt only; it contains no resume state or recovery mutation path.
Branch recovery boundary: The introduced closed recovery state requires a quiescent result, a successful read, and an explicit resume request before restoring tools; resumed mutations are replay-fenced and limited to one attempt.
Host-owned effect facts: Nested execution records normalized arguments and effect receipts against the exact recorded nested activity before it is considered for recovery, and missing facts prevent resume.
Findings None None.
Security None None.

How this fits together

The embedded agent runner converts an incoming chat task into model-directed tools and a final reply. Code Mode executes nested tools; their outcomes feed retry handling, which this PR extends with a read-only inspection followed by a bounded recovery surface.

flowchart LR
  A[Incoming task] --> B[Embedded agent runner]
  B --> C[Code Mode program]
  C --> D[Partial or failed nested tool]
  D --> E[Read-only inspection]
  E --> F{Work remains?}
  F -->|No| G[Final status reply]
  F -->|Yes| H[Replay-fenced recovery]
  H --> G
Loading

Decision needed

Question Recommendation
Should OpenClaw permit one host-fenced direct mutation after successful inspection of a potentially partial Code Mode mutation, rather than retain inspection-only termination? Approve the guarded recovery: Validate the cited upstream contract and land the closed-state, replay-fenced recovery path once exact-head checks are green.

Why: This is a deliberate post-failure side-effect boundary, not a mechanical test or formatting decision; the cited comparison contract also needs direct owner verification.

Before merge

  • Resolve merge risk (P1) - Merging changes a formerly terminal partial-mutation failure into a path that may perform one further mutation; its intended safety boundary needs owner acceptance.
  • Resolve merge risk (P1) - The cited Codex tool-loop contract could not be directly inspected from source in this review environment.
  • Resolve merge risk (P1) - The patch adds 451 net production lines to a bug-fix path, increasing the maintenance surface of retry and lifecycle behavior.
  • Complete next step (P2) - The remaining blocker is maintainer acceptance of the post-failure mutation boundary, not a narrow automated repair.
Agent review details

Security

None.

PR surface

Source +564, Tests +431, Docs +9, Other 0. Total +1004 across 42 files.

View PR surface stats
Area Files Added Removed Net
Source 29 772 208 +564
Tests 11 539 108 +431
Docs 1 18 9 +9
Config 0 0 0 0
Generated 0 0 0 0
Other 1 1 1 0
Total 42 1330 326 +1004

Review metrics

Metric Value Why it matters
Production versus test delta production +649/-198; tests and test support +662/-118; docs +18/-9 The bug fix introduces a substantial new lifecycle and recovery state surface, so its safety rationale merits explicit owner review.

Stored data model

Persistent data-model change detected: unknown-data-model-change: src/agents/embedded-agent-runner/run/attempt-session-prepare.ts, vector/embedding metadata: src/agents/tool-search-catalog.ts. Confirm migration or upgrade compatibility proof before merge.

Merge-risk options

Maintainer options:

  1. Validate the recovery boundary (recommended)
    Have the responsible owner verify the cited runtime contract and accept the one-mutation recovery semantics before merge.
  2. Pause at inspection-only behavior
    Do not merge this path if same-turn recovery mutations are outside the intended Code Mode safety model.

Technical review

Best possible solution:

Keep recovery private to the embedded runner and land only after the safety owner validates the constrained direct-tool design and the cited upstream contract against the exact head.

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

Yes, the supplied exact-head Telegram Test Server red/green scenario is concrete and maps to the changed owner path, but it was not independently executed in this read-only external-branch review.

Is this the best way to solve the issue?

Unclear until the safety boundary is accepted: the implementation uses a closed state and the existing dispatcher rather than a parallel executor, but allowing one post-failure mutation requires maintainer intent.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against b5ae14d758c7.

Labels

Label justifications:

  • P1: The PR addresses a high-impact interruption in an active Code Mode workflow after a possible partial mutation.
  • merge-risk: 🚨 availability: The new retry transition controls whether an agent can safely continue or terminate after a failed tool program.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🦞 diamond lobster and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Sufficient (live_output): The PR body supplies an exact-head Telegram Test Server red/green run through the embedded OpenClaw runner and Code Mode: a partial nested mutation is inspected, one replay-fenced direct recovery completes the remaining edit, and an independent file assertion observes the improved result.
  • proof: sufficient: Contributor real behavior proof is sufficient. The PR body supplies an exact-head Telegram Test Server red/green run through the embedded OpenClaw runner and Code Mode: a partial nested mutation is inspected, one replay-fenced direct recovery completes the remaining edit, and an independent file assertion observes the improved result.
  • proof: telegram-e2e: This PR needs Telegram Test Server proof with the repository E2E skill. The changed same-turn recovery is visible through Telegram direct-message task completion and should retain its Telegram Test Server proof.

Evidence

What I checked:

  • Current main stops at inspection: The fetched-main implementation transitions eligible failures into one read-only reconciliation attempt only; it contains no resume state or recovery mutation path. (src/agents/embedded-agent-runner/run/code-mode-reconciliation.ts:42, b5ae14d758c7)
  • Branch recovery boundary: The introduced closed recovery state requires a quiescent result, a successful read, and an explicit resume request before restoring tools; resumed mutations are replay-fenced and limited to one attempt. (src/agents/embedded-agent-runner/run/code-mode-reconciliation.ts:294, 4593445efa8c)
  • Host-owned effect facts: Nested execution records normalized arguments and effect receipts against the exact recorded nested activity before it is considered for recovery, and missing facts prevent resume. (src/agents/embedded-agent-runner/run/attempt-stream-prepare.ts:384, 4593445efa8c)
  • Surface and sibling-boundary coverage: The focused integration test exercises inspection, Tool Search recovery, an exact replay rejection, one different mutation, and subsequent readback; source also strips recovery state before plugin-harness handoff. (src/agents/embedded-agent-runner/run/attempt.code-mode-reconciliation.test.ts:90, 4593445efa8c)
  • Contributor real-behavior evidence: The PR body provides exact-head Telegram Test Server red/green results: main left beta unfinished after a partial mutation, while this head completed one bounded recovery and an independent final-byte assertion. (4593445efa8c)
  • Cited Codex contract unavailable for direct inspection: The PR explicitly cites Codex Rust tool-dispatch and follow-up behavior, but the required sibling Codex source files were not present and the permitted environment could not resolve the remote source; this is a reviewer limitation rather than missing contributor proof.

Likely related people:

  • Peter Steinberger: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Have the Code Mode safety owner verify the cited Codex source contract before merge.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (8 earlier review cycles)
  • reviewed 2026-08-29T12:33:09.517Z sha 3e3b07a46a5d54450e194131cd52a4f89563e3d2 :: needs real behavior proof before merge. :: none
  • reviewed 2026-08-29T12:43:19.144Z sha 09c46991a7f6088efb3eee6719aacb02a7164adc :: needs real behavior proof before merge. :: [P1] Do not re-enable arbitrary direct tools without a replay fence
  • reviewed 2026-08-29T13:00:04.573Z sha 09c46991a7f6088efb3eee6719aacb02a7164adc :: found issues before merge. :: [P1] Enforce the no-replay boundary for resumed direct tools
  • reviewed 2026-08-29T17:12:22.813Z sha ddf14ebf1dbeeef7a85b1b199d341d6cfca97a9b :: needs maintainer review before merge. :: none
  • reviewed 2026-08-29T19:20:59.403Z sha ddf14ebf1dbeeef7a85b1b199d341d6cfca97a9b :: needs changes before merge. :: [P1] Keep MCP runtime creation out of read-only reconciliation | [P1] Do not spawn configured LSP servers during reconciliation capture
  • reviewed 2026-08-30T02:03:23.100Z sha 3ebf836560de71aebbb150219e98faa927a92b94 :: needs changes before merge. :: [P1] Return recovery-plan rejections as tool results
  • reviewed 2026-08-30T02:23:19.063Z sha b168fe2b7cf708d408ba0663044aa39f60bab85f :: needs maintainer review before merge. :: none
  • reviewed 2026-08-30T05:22:01.605Z sha 4228d5e :: needs maintainer review before merge. :: none

@Marvinthebored

Copy link
Copy Markdown
Contributor Author

@clawsweeper re-review — the Evidence section now includes a redacted real built-in openclaw runtime trace covering partial nested mutation, read-only reconciliation, direct-tool continuation, final verification, and non-replay.

@clawsweeper

clawsweeper Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. and removed P2 Normal backlog priority with limited blast radius. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Aug 29, 2026
@Marvinthebored
Marvinthebored force-pushed the fix/code-mode-resume-after-reconciliation-v2 branch from 09c4699 to 166c205 Compare August 29, 2026 16:55
@Marvinthebored

Copy link
Copy Markdown
Contributor Author

Rebased onto current main and force-pushed 166c205de91.

The recovery protocol now validates the complete ordered plan against target schemas before storing it, accepts a corrected proposal after an invalid one, consumes each call at implementation start using policy-normalized arguments, and keeps the plan out of public harness/SDK types.

Post-rebase validation: 509 tests across 16 touched test files, core TypeScript, full core lint, targeted formatting/lint, and diff checks all pass. The updated PR body includes the built-in runtime proof and build caveat.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@Marvinthebored
Marvinthebored force-pushed the fix/code-mode-resume-after-reconciliation-v2 branch from 166c205 to ddf14eb Compare August 29, 2026 17:05
@Marvinthebored

Copy link
Copy Markdown
Contributor Author

CI exposed three mechanical omissions on the prior head; fixed in ddf14ebf1db:

  • moved the recovery-plan contract to break the Madge cycle;
  • removed/documented the two new type assertions for the assertion-safety ratchet; and
  • typed the test preparer callback for the test-only TypeScript shard.

Exact local checks now pass: Madge reports 0 cycles, the assertion-safety ratchet passes, 85 focused tests pass, core TypeScript passes, and formatting/lint/diff checks pass.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 29, 2026
@Marvinthebored
Marvinthebored force-pushed the fix/code-mode-resume-after-reconciliation-v2 branch from ddf14eb to 3ebf836 Compare August 30, 2026 01:56
@Marvinthebored

Copy link
Copy Markdown
Contributor Author

Addressed both P1 findings in 3ebf836560d: an active reconciliation plan now prevents MCP session creation/materialization and LSP runtime creation for both capture and continuation. Provided client definitions remain available because inspecting them is side-effect-free; exact-plan validation and ordered consumption are unchanged.

Direct regression coverage asserts all three external-runtime constructors stay uncalled in both phases. Local evidence: 86 focused tests pass, LSP runtime suite passes, both import-cycle checks report 0 cycles, and targeted format/lint plus git diff --check pass.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@clawsweeper clawsweeper Bot added rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. and removed rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. labels Aug 30, 2026
@Marvinthebored
Marvinthebored force-pushed the fix/code-mode-resume-after-reconciliation-v2 branch from 3ebf836 to b168fe2 Compare August 30, 2026 02:14
@Marvinthebored

Copy link
Copy Markdown
Contributor Author

Addressed the remaining P1 in b168fe2b7cf: recovery pre-read and exact-plan validation failures now return a non-terminal internal batch rejection. Agent-core emits ordinary error tool results for the rejected batch, starts no tool implementation, preserves the exact ordered no-replay fence, and continues to a corrective model turn without consuming the critical-loop recovery budget.

Acceptance evidence: all 108 tests pass across the three requested suites (tool-loop-recovery, code-mode-reconciliation, and agent-loop). Core type-check, focused lint/format, both import-cycle checks, and git diff --check also pass.

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 30, 2026
@obviyus
obviyus force-pushed the fix/code-mode-resume-after-reconciliation-v2 branch from b168fe2 to 4228d5e Compare August 30, 2026 05:13
@openclaw-barnacle openclaw-barnacle Bot added docs Improvements or additions to documentation triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. labels Aug 30, 2026
@clawsweeper clawsweeper Bot added the proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. label Aug 30, 2026
@openclaw-barnacle openclaw-barnacle Bot removed the triage: needs-pr-context Candidate: external PR body lacks required problem context or evidence. label Aug 30, 2026
@obviyus

obviyus commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

The recovery protocol was replaced with the maintainer-approved direct-tool design, and the exact head now has real Telegram Test Server red/green proof.

@clawsweeper

clawsweeper Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

🦞🧹
ClawSweeper re-review requested.

I asked ClawSweeper to review this item again.
Action: item re-review queued (workflow sweep.yml, event exact_review_queue).
Result: when the review finishes, ClawSweeper will create the durable review comment if needed or update the existing comment in place.

Re-review progress:

@obviyus

obviyus commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Maintainer decision: approved.

  • I approve one host-fenced mutation attempt after successful read-only inspection.
  • The boundary is closed: Code Mode stays disabled, exact committed or uncertain repeats are blocked, and reads remain available after the one mutation attempt.
  • I inspected openai/codex@63d2138 directly. codex-rs/core/src/tools/parallel.rs:74-90,219-243 converts non-fatal failures into tool results. codex-rs/core/src/stream_events_utils.rs:298-328 returns those results to a follow-up model step.
  • The production growth is justified by the approved capability, effect journal, replay fence, and lifecycle owner. The repair removed the proposal tool, generic plan validator, frozen plan executor, and empty-plan turn.
  • There is no stored data-model change. Recovery state and journal facts are attempt-local memory only. tool-search-catalog.ts changes wrapper composition, not vector or embedding metadata.

The latest Rank-up move is complete. Exact-head CI, local ClawSweeper, build, and Telegram Test Server proof are green.

@obviyus

obviyus commented Aug 30, 2026

Copy link
Copy Markdown
Collaborator

Thanks @Marvinthebored!

Proof: On Telegram's Test Server with real openai/gpt-5.6-sol, a Code Mode call changed one file line and then failed. Current main inspected the file and stopped with the second line unfinished. This head resumed once, completed the second line, read the file back, and passed an independent exact-byte assertion.

  • Bug: Read-only reconciliation ended the run with a plan instead of finishing safe remaining work.
  • Fix: The runner now resumes through the normal tool loop with Code Mode disabled, one mutation attempt, and an exact replay fence from host-owned effect facts.

Example

Before After
alpha=applied, beta=old; bot says beta still needs work alpha=applied, beta=completed; bot verifies the final file

@obviyus
obviyus merged commit a7a1d05 into openclaw:main Aug 30, 2026
261 checks passed
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Aug 31, 2026
Resume interrupted Code Mode work through one bounded normal-tool recovery after read-only inspection.

Preserve host-owned effect facts, block exact unsafe repeats, and keep later mutations fenced after the one allowed attempt.

Co-authored-by: Marvinthebored <[email protected]>
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

agents Agent runtime and tooling docs Improvements or additions to documentation merge-risk: 🚨 availability 🚨 May cause crashes, hangs, restart loops, stalls, or process outages. P1 High-priority user-facing bug, regression, or broken workflow. proof: sufficient ClawSweeper judged the real behavior proof convincing. proof: telegram-e2e This PR needs Telegram Test Server proof with the repository E2E skill. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. size: XL 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.

3 participants