Repository navigation
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
3e3b07a to
09c4699
Compare
|
Codex review: needs maintainer review before merge. Reviewed August 30, 2026, 1:44 AM ET / 05:44 UTC. ClawSweeper reviewWhat this changesThis 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 readinessThe 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 Review scores
Verification
How this fits togetherThe 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
Decision needed
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
Agent review detailsSecurityNone. PR surfaceSource +564, Tests +431, Docs +9, Other 0. Total +1004 across 42 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest 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. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (8 earlier review cycles)
|
|
@clawsweeper re-review — the Evidence section now includes a redacted real built-in |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
09c4699 to
166c205
Compare
|
Rebased onto current 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 |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
166c205 to
ddf14eb
Compare
|
CI exposed three mechanical omissions on the prior head; fixed in
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 |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
ddf14eb to
3ebf836
Compare
|
Addressed both P1 findings in 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 @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
3ebf836 to
b168fe2
Compare
|
Addressed the remaining P1 in Acceptance evidence: all 108 tests pass across the three requested suites ( @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
b168fe2 to
4228d5e
Compare
|
@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. |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
Maintainer decision: approved.
The latest Rank-up move is complete. Exact-head CI, local ClawSweeper, build, and Telegram Test Server proof are green. |
|
Thanks @Marvinthebored! Proof: On Telegram's Test Server with real
Example
|
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]>
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
idle | inspect | resumestate.No model-authored transaction plan remains. There is no empty-plan continuation turn.
Safety
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-solrequests. A disposable file started withalpha=oldandbeta=old. One nested shell call changed alpha, then the Code Mode guest threw.1e2408cd92falpha=applied,beta=old, and that beta still required work.4593445efa8alpha=appliedandbeta=completed.Main completed three real OpenAI Responses requests. Head completed six. Both Telegram runners released their credential lease and removed disposable runtime state.
Validation
4593445efa8completes the full repository build.git diff --checkpasses.Shape and production size
+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.+544.+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@63d2138codex-rs/core/src/tools/parallel.rs:74-90,219-243. It then marks a tool call as needing a follow-up model step incodex-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.