Repository navigation
feat: explain pasted errors in Ask OpenClaw - #205382
Conversation
Worked on by: - @TheAngryPit Co-authored-by: TheAngryPit <[email protected]> OpenClaw-Publication: 677a842f-76c1-44f1-9b7f-597b23655b2b
|
🦞👀 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: passed. What this changesThis PR adds local explanations for explicitly pasted errors in Ask OpenClaw, the setup TUI, and a new CLI flag. Example: With malformed config and no working model, run
Review scores
ProductKind: Feature · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep this PR open: it adds useful, maintainer-directed offline troubleshooting that current main lacks, and no blocking defect was identified. Reviewed head: Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe system agent handles setup and repair conversations; explicit error input now reaches a shared local catalog that returns fixed guidance, while chat history receives a placeholder. flowchart TD
A[Offline CLI flag] --> C[Shared error catalog]
B[TUI or Gateway chat] --> D[Chat engine]
D --> C
C --> E[Fixed guidance]
D --> F[Sanitized history]
D --> G[Existing conversation handling]
Technical reviewBest possible solution: Keep one bounded local catalog shared by the explicit CLI flag and chat prefix while preserving ordinary inference, approval, and transcript contracts. Do we have a high-confidence way to reproduce the issue? This is an additive feature; current-main source confirms the missing offline explanation path, and the PR reports concrete final-head CLI behavior. Is this the best way to solve the issue? A shared catalog of explicit error signatures fits model-free guidance, declines unknown or conflicting input, and preserves normal setup-message behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 9fe717fea3d4. Provenance checked
TestingProof path: shipped entry point. SecurityNone. EvidenceWhat I checked:
PR surfaceSource +181, Tests +126, Docs +23. Total +330 across 16 files. Added test files: 1. 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. Review metrics
LabelsLabel changes: No label 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 HistoryReview history (1 earlier review cycle)
Reviewed November 27, 2026, 5:46 PM ET / 22:46 UTC (Revision 2). |
… explicit Co-authored-by: daniel-lxs <[email protected]>
Co-authored-by: daniel-lxs <[email protected]>
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Add guidance for explicitly pasted errors in Ask OpenClaw and the setup TUI. Add an offline setup flag that explains recognized errors before reading config and keeps ordinary setup messages inference-backed. Co-authored-by: TheAngryPit <[email protected]> Co-authored-by: daniel-lxs <[email protected]> OpenClaw-Publication: 677a842f-76c1-44f1-9b7f-597b23655b2b
Related: #205372
What Problem This Solves
When an OpenClaw command fails, the error can leave you unsure what to do next. Asking a model for help is particularly difficult when model setup or the local config is what failed.
User Impact
In a ready Ask OpenClaw chat or the setup TUI, type
explain error:followed by a redacted error line. On the command line, useopenclaw setup --explain-error 'OpenClaw config is invalid'for local guidance. Add--jsonfor a singlereplyfield. This mode does not require a model or a valid config. Existing scripts usingsetup --messagekeep their inference check, exit status and JSON output.Why This Change Was Made
One catalog provides a likely cause and one safe next step for recognized errors. It does not run the suggested command. A dedicated CLI flag keeps offline help separate from inference-backed messages. In chat, the explicit prefix treats the paste as data rather than a request to execute it. The server saves a placeholder, but the client may display the original: remove private values before sending.
Evidence
5aa4b8d4d291and candidate760f11519bfdboth exited 1 forsetup --json --message 'explain error:'with identicalerror,guidance,ok: falseandstatus: "unavailable"values.58e176e006a0matched that main output. With a configured but unreachable model, ordinary and prefixed messages both exited 1 and returned identical timeout JSON. With a working loopback fixture, the prefixed message exited 0 and returned the original overview shape, not areplyobject.--messageretained its exit-1cli_error;--explain-errorexited 0 in both plain and JSON modes and suggestedopenclaw config validate. Combining the offline flag with--wizardfailed. An offline-flag spelling passed as the value of-mremained a normal message.Worked on by
Work sessions
Linked for team reference; these sessions aren’t public.
🦞 Made with OpenClaw