Repository navigation
Description
Bug type
Regression (worked before, now fails)
Beta release blocker
No
Summary
WebChat drops the only user-facing warning after a failed exec when the native agent otherwise completes without a visible answer.
Steps to reproduce
- Start an isolated development Gateway with the QA Lab mock OpenAI provider and coding tools, using temporary state and a free non-18789 port.
- Through the real
chat.sendRPC, have the deterministic provider call exec once withprintf SILENT_EXEC_STARTED; exit 127, then returnNO_REPLY. - Observe
agent.wait, subscribed chat events, andchat.historyafter settlement.
The probe uses the existing QA Lab createQaLiveLaneGateway and mock-provider “Tool progress QA check” scenario. The model is mocked; Gateway, exec, shell, dispatcher, and transcript persistence are real. No operator state or real credentials are used.
Expected behavior
The unrecovered tool failure has a visible warning and remains recorded. The existing warning policy in src/agents/embedded-agent-runner/run/tool-error-warning.ts emits a warning when there is no user-facing reply. Runtime completion must remain independent of warning presentation; a recovered tool error must not turn a successful run into a runtime failure.
Actual behavior
One real exec call runs. The provider receives SILENT_EXEC_STARTED\n\nCommand not found. History records the tool result with isError: true, but no final assistant warning is persisted. The only terminal chat event has no message, and agent.wait returns ok.
Controls: exit 7 plus NO_REPLY triggers the already-landed settled-turn fallback from #133520; exit 7 plus a normal final answer delivers that answer. This is not missing exec output: the failed result reached both the model and history.
OpenClaw version
Live reproduction: main 41ff392b26f834045077f7bc3cfec4bd2cedce71. Implicated code is also present in v2026.8.1; source comparison, not a claim of a full historical-build live run.
Operating system
macOS 27.0
Install method
Own isolated source worktree; frozen pnpm install and pnpm build qaRuntime; real development Gateway launched by QA Lab.
Model
Deterministic local QA mock provider, synthetic model label mock-openai/gpt-5.6-luna; no live inference.
Provider / routing chain
WebChat chat.send → native embedded runner → loopback QA mock OpenAI Responses provider → real exec tool → shell → native reply dispatcher → WebChat finalization.
Logs
exec calls: 1
exec output returned to provider: true
history toolResult.isError: true
history toolResult.text: SILENT_EXEC_STARTED\n\nCommand not found
agent.wait.status: ok
chat final: { state: "final", stopReason: "stop" } (no message)
final assistant warnings in history: 0
owned Gateway cleanup: confirmed-stopped
owned temporary state removed: true
Screenshots, recordings, and evidence
Two independently reproduced drops share the warning-delivery invariant. The upstream regression is d2d3171bb766289d7c59170a4bc3c4dd79859c38 (#111877), parent ef872829c3a420212cd8c2b93b3d50b547458804, present in v2026.8.1 and absent from v2026.7.1. Its raw patch broadens src/shared/text/assistant-visible-text.ts to remove the current Exec/Bash warning format when echoed by the model. However, buildReplyPayloads and dispatcher normalization also apply that model-trace filter to the genuine host-authored warning because both use errorContext: true. The host warning becomes empty before it reaches the Gateway. An isolated diagnostic run confirmed the runner observed the exec failure with no user-facing answer, while the Gateway received zero replies. The repair separates user-facing warning copy from reserved internal progress prefixes, records the observed warning at its producer, and leaves model-echo/private-context filters unchanged.
A separate downstream regression patch is 13186412420b6003c33a19064578dc5ebe0055f7 (#132182), parent 0757afb713b3b9f966a252de767fc77743400497, included in v2026.8.1. In src/gateway/server-methods/chat-send-agent-dispatch.ts, native recorded completed became authoritative success, and hasReturnedAgentError stopped considering delivered warning payloads in that case. That correction preserved runtime outcomes, but the native source finalizer still rejects plain error payloads, leaving the warning with no delivery owner.
The existing “recorded success with a recoverable warning” test includes a persisted Partial agent reply; it does not cover an otherwise silent warning-only turn.
Impact and severity
Affected: reproduced on WebChat/native agent runs. Severity: high; the sole failure warning disappears and the user sees the agent stop. Frequency: deterministic in the isolated failing-exec probe; real-world prevalence is not established. The tool failure itself remains recorded, but no visible final explanation is delivered.
Additional information
Credit: Discord reporter nick.sy described the 2026.8.1 change from visible exec errors to the agent stopping without an error; zeroSignal acknowledged the report. Original report, maintainer acknowledgment.
The original report does not include a failing command or run trace, so this deterministic reproduction establishes a matching regression, not proof that every reported occurrence has this cause.
Distinct from #130396 (long-running exec result attachment) and #122690 (failed Codex terminal message settling with zero payload). #133520 repairs empty completion after settled tool work, but the genuine failed-exec warning-only case above still reproduces. Existing issue/PR and current-main searches found no same-fix in-flight repair.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
jinngimk-lang commentedon Sep 1, 2026
clawsweeper commentedon Sep 1, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed September 1, 2026, 6:42 AM ET / 10:42 UTC.
Summary
Keep open: current and shipped code can sanitize the embedded runner’s only terminal-failure warning to empty text before WebChat delivery.
Reproducibility: yes. — source establishes a deterministic composition: an otherwise-silent embedded attempt with an exec or bash error creates a warning that error-context sanitization removes before the renderable-payload filter.
Regression provenance
Possible regression — probable (reproduction; reviewed change). No predecessor PR is attributed.
Next step
The defect is small and source-proven, but the item’s protected maintainer status should keep repair dispatch under human ownership.
Review details
Best possible solution:
Carry explicit host-warning provenance from its producer so final sanitization preserves that warning while continuing to remove model-generated internal traces.
Do we have a high-confidence way to reproduce the issue?
Yes — source establishes a deterministic composition: an otherwise-silent embedded attempt with an exec or bash error creates a warning that error-context sanitization removes before the renderable-payload filter.
Is this the best way to solve the issue?
Yes — preserving only a producer-marked host warning is the narrow owner-boundary repair; weakening the shared matcher would expose model-echoed internal traces.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against d394da816e24.
Label changes
Label changes:
clawsweeper:linked-pr-open: Current issue advisory state selects this label.clawsweeper:no-new-fix-pr: Current issue advisory state selects this label.Label justifications:
P1: A recoverable terminal failure can leave an active WebChat user without any reply.impact:message-loss: The pipeline suppresses its only user-facing failure warning before delivery.Evidence reviewed
Acceptance criteria:
What I checked:
src/agents/embedded-agent-runner/run/terminal-preparation.ts:190, d394da816e24)Exec|Bash failedtrace lines and returns an empty string when nothing remains. (src/auto-reply/reply/agent-runner-payloads.ts:102, d394da816e24)src/agents/embedded-agent-runner/run/payloads.test.ts:532, d394da816e24)docs/web/webchat.md. (docs/web/webchat.md:14, d394da816e24)src/shared/text/assistant-visible-text.ts:23, ea806575e645)src/shared/text/assistant-visible-text.ts:23, d469d48c4736)Likely related people:
How this review workflow works
@clawsweeper re-reviewcomments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.@clawsweeper re-reviewor@clawsweeper re-runon an open PR or issue to request a fresh review only.@clawsweeper reviewto request a fresh review only.@clawsweeper autofix,@clawsweeper automerge,@clawsweeper fix ci, or@clawsweeper address review.@clawsweeper explainto ask for more context, or@clawsweeper stopto stop active automation.steipete commentedon Sep 1, 2026
Fixed in #135119, merged as
6465153422d8b5c082eaae753847001a9c0aaa32; fetched remote main and verified merge ancestry.The warning producer no longer emits the reserved internal-trace prefix, records the observed tool warning at its owner, and native warning-only WebChat turns use the existing final delivery/persistence owner without changing completed runtime outcomes. Production delta is -20 LOC.
Proof: pre-fix regression failures; four ordered isolated real Gateway/exec cases; failed exec +
NO_REPLYnow produces and persists exactly one⚠️ Exec failedwarning whileagent.waitremainsok. Ordinary exit status and normal-reply controls remain unchanged. Focused tests and the full changed-file gate passed. Exact-head CI 33500097457 is green, and current-main CI 33500572304 passed before merge.Thanks to nick.sy for the report and zeroSignal for acknowledging it. The original Discord report lacked a command/trace, so this closes the reproduced matching regression rather than claiming every superficially similar silent turn has this cause. #130396 and #122690 remain separate concerns.
fix(agents): preserve failed-exec warnings on silent turns (openclaw#…
fix(agents): preserve failed-exec warnings on silent turns (openclaw#…