Repository navigation
fix: let agents repair config when the setup helper cannot run - #200809
Conversation
Run exact config commands through the existing approval and write owners without requiring helper inference. Preserve verified inference for conversational and model-produced work, and document bounded local file recovery for explicitly requested ordinary repairs. Co-authored-by: Beru <[email protected]>
Keep the TUI binding required rather than inheriting the conversational engine option becoming optional. This preserves the existing terminal startup and wizard handoff contract. Co-authored-by: Beru <[email protected]>
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: ready, awaiting a maintainer decision. What this changesThis PR lets exact config commands reach existing approval and write owners without helper inference and documents bounded local file recovery. Example: An agent requests
Review scores
ProductKind: Bug fix · Worth it: Needs a maintainer decision · Fix scope: Complete Merge readiness⏳ Ready, awaiting maintainer decision Keep open: this PR addresses a verified recovery dead end without an identified correctness defect, but its recovery contract still needs an area-owner decision. Priority: P2 Decision needed
Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe regular agent delegates to openclaw.chat, whose system-agent engine parses commands, obtains exact approval, invokes the existing configuration writer, and returns the recorded outcome. flowchart TD
A[Regular agent] --> B[openclaw chat]
B --> C[Existing command parser]
C --> D[Exact approval owner]
D --> E[Configuration writer]
E --> F[Validation and outcome]
B --> G[Helper inference for conversation]
Technical reviewBest possible solution: Use inference-independent exact approval through the existing config writer with an owner-approved, bounded local-recovery contract. Do we have a high-confidence way to reproduce the issue? Current-main source shows helper failure preceding exact-command approval, and the supplied live baseline reproduces that failure with HTTP 503; this review executed no target code. Is this the best way to solve the issue? The deterministic path is a focused repair using existing parser, approval, and writer owners; the ordinary local-file exception is a separate policy choice rather than a demonstrated new filesystem safeguard. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b1ec28178e0e. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
Likely related people:
PR surfaceSource +162, Tests +322, Docs +17. Total +501 across 18 files. Added test files: 2. View PR surface stats
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. LabelsLabel changes:
Label justifications:
Rating scale6/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. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReviewed November 17, 2026, 7:25 PM ET / November 18, 2026, 00:25 UTC (Revision 3). |
Regenerate the Telegram base and Discord delta through prompt:snapshots:gen. The snapshot check failed before regeneration and now passes for all six outputs. Runtime and generator source are unchanged. Co-authored-by: Beru <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Co-authored-by: VACInc <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Closes #200779
What Problem This Solves
An agent can have working inference and permission to repair configuration while the separate setup helper's model is unavailable. Requiring that model before even presenting an exact change for approval leaves recovery stuck. The helper-only routing instruction also leaves explicitly requested ordinary local-file repair ambiguous when configuration or setup tooling is broken.
User Impact
User impact: exact config commands can reach the existing approval and configuration writer without helper inference. Explicitly requested ordinary local repairs have documented file/exec recovery guidance when the normal route is operationally unavailable.
Existing runtime approval checks still govern exact tool operations. The file-recovery guidance prohibits overriding denials or changing access, approval or ownership policies; it does not add a filesystem authorization boundary to broadly permitted file/exec tools. Existing readonly, containment and tool restrictions remain in force. No migration or new setting is required.
Why This Change Was Made
The existing command grammar and executor already provide deterministic operations. Verified inference is now prepared only when conversational work needs it; exact-command provenance stays with the existing approval owner. Model-generated proposals retain their inference checks. A helper outage does not grant authority.
The prompt explicitly describes ordinary local recovery: inspect, preserve a rollback copy, make the narrow repair, validate and read back. One model finding a way through ambiguous wording does not excuse another refusing the same authorized repair.
This is a concrete proposal for the recovery contract requested in the issue review, not a claim that the product/security decision is already approved.
Evidence
Live before/after: an isolated built Gateway and a real native Codex parent, with only the configured helper provider fault-injected to return HTTP 503. The natural-language helper control actually reached that endpoint and failed.
Each parent phase had native thread/model lifecycle, matching provider/model transcript metadata and positive usage. Approval decisions used the real operator
approval.resolvepath, not mocked decisions. This was an isolated Gateway test, not a Discord UI replay. The denied file-fallback observation proves that interaction, not universal filesystem enforcement.Counterevidence retained: ordinary direct-file repair already succeeded on the baseline, including an exact backup and valid result. Its original harness failed on an incorrect expectation of universal blockage; that run was not relabeled passed. The prompt change clarifies the recovery contract rather than claiming direct repair never worked before.
Snapshot follow-up
7e83c107e368: regenerated the Telegram base prompt and Discord delta withpnpm prompt:snapshots:gen.pnpm prompt:snapshots:checkreproduced both stale outputs before the fix and now passes for all six generated files. Independent diff checks confirm only the existing recovery paragraph and derived counters, hashes and offsets changed. Runtime and generator source are unchanged from live-tested8a13db0c9c37, so its live/build evidence is reused, not claimed as a new run.Additional verification:
8a13db0c9c37. Clean source, current build/runtime input signatures, Codex compiler inputs and all 188 recorded Codex output hashes were verified. Native Codex version: 0.164.0; Node: 26.13.1.Failed attempts and remaining verification limits
Failed live setup attempts are retained: an unsupported baseline preload; a candidate client missing the approval-event capability; and an incorrect fixture capability import. The latter two were corrected only in the private harness, with actual import validation before the successful run. The five candidate assertions were not weakened and the reviewed candidate source stayed unchanged.
Extra E2E preparation failed in declaration generation without recoverable compiler diagnostics. The normal test wrapper's subprocess compiler then exited 137 before collection; standalone Node execution hit the Linux source-loader ownership restriction before Gateway startup. These are not passing runs or proven inherited defects. The subsequently executed pinned-Bun standalone E2E passed.
CI success, stable-version upgrade proof and exhaustive file/exec enforcement are not claimed. See the current PR checks for CI status. Production configuration and the deployed Gateway were not modified.