Repository navigation
improve(config): retire messages.suppressToolErrors so tool failures never end a run silently - #137775
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: blocked before merge. Reviewed September 3, 2026, 11:55 PM ET / September 4, 2026, 03:55 UTC. ClawSweeper reviewWhat this changesThe branch retires Merge readiness⛔ Blocked before merge - 5 items remain No introduced functional or security defect was found. Current main still permits the suppression path, so this branch remains necessary rather than obsolete. Priority: P1 Review scores
Verification
How this fits togetherThe embedded agent runner collects tool outcomes and builds final channel payloads. When a failed tool would otherwise leave no user-facing reply, this path emits a fallback warning; Doctor repairs configurations that use the retired control. flowchart LR
A[Tool execution] --> B[Terminal tool outcome]
B --> C[Embedded agent runner]
C --> D{User-facing reply?}
D -->|Yes| E[No fallback warning]
D -->|No| F[Failure warning]
G[Legacy configuration] --> H[Doctor migration]
H --> I[Retired key removed]
Before merge
Agent review detailsSecurityNone. PR surfaceSource -8, Tests -129, Docs -1, Generated -1. Total -139 across 33 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the canonical no-reply warning, the Doctor migration, and the ignored deprecated SDK field through its stated removal window. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: on current main, a terminal tool failure with no user-facing reply and either suppression setting reaches the warning builder and returns no warning. Is this the best way to solve the issue? Yes: the embedded runner owns the final no-reply decision, and the branch removes the suppression there while providing the required config migration and SDK compatibility window. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 8b7a1bba2bd2. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
|
The ClawSweeper before-merge items are addressed. Commit eea6c1b addresses P1/P2 by retaining The config compatibility item is covered by the Doctor migration already in this PR: both reporting the retired key and removing it with |
|
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. Re-review progress:
|
|
The |
The tool-failure warning is the no-reply guard: when a run ends with a failed tool and no user-facing reply, one "⚠️ <tool> failed" line is delivered instead of silence. messages.suppressToolErrors could silence that guard (and hide failed tool progress), which allowed silent failures. The guard is now unconditional, the key is removed, and "openclaw doctor --fix" deletes it from existing configs with a note. The internal suppressToolErrorWarnings reply option is removed with it. Mid-turn failure visibility stays owned by channel streaming settings. Refs #39406
…no-op GetReplyOptions is exported from openclaw/plugin-sdk/reply-runtime in the v2026.8.2 and v2026.9.1 stable tags and carried this option, so removing the member would break external plugins at compile time. Keep it as an ignored, deprecated field with a named removal window (first stable release after 2026.10) and a contract test; the runtime no longer reads it.
f5101d2 to
382a940
Compare
|
Rebased onto main's advisory retry fix and dropped the duplicate CI commit |
|
Land-ready at 382a940. Native review artifacts validated with no outstanding findings; prepare-run passed without changing the head. Post-rebase local proof: The accepted evidence in the PR body includes live Doctor reporting and --fix removal of the retired config key. The terminal no-reply guard is unconditional; the shipped SDK option remains a deprecated ignored field until the first stable release after 2026.10, protected by its contract test. The branch uses main's advisory retry fix and carries no duplicate retry policy. Known proof gap: the live agent probes exercised ordinary reply and NO_REPLY paths but did not reach the thrown-tool-error warning branch; focused warning/payload tests cover that branch, as already disclosed and accepted. |
|
Merged via squash.
|
…never end a run silently (openclaw#137775) * improve(config): retire messages.suppressToolErrors The tool-failure warning is the no-reply guard: when a run ends with a failed tool and no user-facing reply, one "⚠️ <tool> failed" line is delivered instead of silence. messages.suppressToolErrors could silence that guard (and hide failed tool progress), which allowed silent failures. The guard is now unconditional, the key is removed, and "openclaw doctor --fix" deletes it from existing configs with a note. The internal suppressToolErrorWarnings reply option is removed with it. Mid-turn failure visibility stays owned by channel streaming settings. Refs openclaw#39406 * test(config): keep retired tool-error keys in the dead-key contract * fix(config): refresh baseline after retiring tool error suppression * refactor(plugin-sdk): keep suppressToolErrorWarnings as a deprecated no-op GetReplyOptions is exported from openclaw/plugin-sdk/reply-runtime in the v2026.8.2 and v2026.9.1 stable tags and carried this option, so removing the member would break external plugins at compile time. Keep it as an ignored, deprecated field with a named removal window (first stable release after 2026.10) and a contract test; the runtime no longer reads it.
Related: #39406
What Problem This Solves
Resolves a problem where operators who set
messages.suppressToolErrors: trueto quiet noisy tool-failure bubbles also switched off the one warning that protects them from silent failures: when a run ends with a failed tool and the agent produces no reply at all, the user got nothing. The option had been added in February when tool-failure warnings were still delivered after successful replies; since July that warning only fires when a run would otherwise end silently, so the option's remaining effect was to allow exactly the silent-failure case. #39406 asked for finer-grained suppression on top of it.Why This Change Was Made
The "tool error warning" is not a feature to configure, it is the no-reply guard: one
⚠️ <tool> failedline delivered only when a run ends with a tool failure and no user-facing reply. That guard is now unconditional.messages.suppressToolErrorsis removed from the config contract, andopenclaw doctor --fixdeletes it from existing configs with the noteRemoved messages.suppressToolErrors (tool failure warnings now appear only when a run ends without a reply).;openclaw doctorwithout--fixreports the retired key with the same hint. The internalsuppressToolErrorWarningsreply option (heartbeats already forced it off; only the skill-workshop review run still set it) is removed with it, together with the dispatch gate that dropped failed tool-result progress under the option. Mid-turn visibility of failed tools stays owned by the per-channel streaming settings (for Slack, recovered failures now settle asRecovered: …per #137523).User Impact
messages.suppressToolErrorsis no longer accepted. Existing configs are migrated byopenclaw doctor --fix; config validation names the retired key until then.Evidence
legacy-config-migrations.runtime.retired.test.ts): the key is flagged with the doctor hint,--fixremoves it and reports the message, configs without it are untouched.dead-config-keys.test.tsnow listsmessages.suppressToolErrorsas schema-rejected.tool-error-warning.test.ts/payloads.test.tskeep the guard firing when no reply exists and silent when a reply exists; the suppression-only cases were removed. Dispatch and heartbeat tests no longer carry the flag.pnpm check:changedpassed; Codex autoreview (branch vsorigin/main, P0/P1) scoped-clean. Production LOC net −14, tests net −136.OPENCLAW_STATE_DIR, real build of this branch):openclaw doctoron a config containingmessages.suppressToolErrors: truereports under "Legacy config keys detected":messages.suppressToolErrors is retired; tool failure warnings now appear only when a run ends without a reply. Run "openclaw doctor --fix"., and the change preview listsRemoved messages.suppressToolErrors (…).openclaw doctor --fixapplies it and the key is gone from the written config. Until then config validation reportsmessages: Unrecognized key: "suppressToolErrors".openclaw agent --local(anthropic/claude-sonnet-4-6, execfull): a turn that runs a failing tool and then repliesdonedelivers exactlydonewith no warning payload.NO_REPLYdoes not end silently: the embedded runtime's settled-turn finalization delivers its fallback reply ("The tool run finished, but no final summary was produced…"). Note for reviewers: in the embedded runtime both a nonzeroexecexit and a missing-filereadare returned as normal tool results (successfulToolNameslists them), solastToolErroris unset and the⚠️guard is not reachable from those inputs; it is the layer below finalization for thrown tool errors and aborted runs, which the unit tests intool-error-warning.test.ts/payloads.test.tscover. No live path exercised the removed suppression branch, which is the point of removing it.Also in this PR
GetReplyOptionsis exported fromopenclaw/plugin-sdk/reply-runtimein the v2026.8.2 and v2026.9.1 stable tags and carriedsuppressToolErrorWarnings, so the member stays as a@deprecated, ignored field with a named removal window (first stable release after 2026.10) and an SDK contract test; the runtime no longer reads it.security-fast) breakage: the npm bulk advisory endpoint timeouts that turned this PR red were repaired onmain(41f1b40, 3d30b3a) while this PR was open; this branch drops its own duplicate retry commit and rebases onto that fix.