Repository navigation
Description
Summary
When an exec tool call fails, the cron run history and chat surface render the failure as:
⚠️ 🛠️ `run python3 /path/to/script.py` failed
The leading verb run is inside the backticks adjacent to the actual command. This looks indistinguishable from an agent that literally typed run python3 /path/to/script.py (i.e., prepended the word run to a Python invocation).
It is in fact a framework display label for the exec tool call, not part of the command.
Environment
- OpenClaw
2026.6.10 - Surfaces: cron run history (
cron action=runs→lastError), and the chat tool-failure card
Real debugging cost
Debugging a daily-cost-audit cron failure today, this misled diagnosis for ~45 minutes:
- The error read
⚠️ 🛠️ \run python3 /path/to/daily-cost-audit.py` failed` - I initially concluded the agent was prepending the word
runto its command and rewrote the cron prompt twice with explicit "do not prependrun" forbiddens - Neither rewrite helped because the agent was never prepending anything
- The actual cause was unrelated — the
exectool was raising on the script's exit code1
Only re-running the actual command in a shell exposed the false signal.
Suggested fix
Change the display format so the framework verb is clearly outside the literal command, e.g.:
- Current:
⚠️ 🛠️ `run python3 /path/to/script.py` failed - Proposed (any of):
⚠️ exec failed: `python3 /path/to/script.py` (exit 1)⚠️ tool exec call failed: `python3 /path/to/script.py`⚠️ exec call `python3 /path/to/script.py` failed
Including the exit code in the message, when available, would also help.
Severity
Low — debugging quality-of-life, no functional impact. Pairs with the exec nonzero-exit issue being filed separately; together they made a real failure hard to diagnose.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
redasadki commentedon Jun 27, 2026
Related: #97318 (exec nonzero-exit semantics — the underlying cause of the failure this message described) and #97317 (cron defaults — the context in which both surfaced).
clawsweeper commentedon Jun 27, 2026
Codex review: keeping this open for maintainer follow-up; there is still a little grit to resolve. Reviewed June 27, 2026, 4:28 PM ET / 20:28 UTC.
Summary
Keep open: current main and v2026.6.10 still compose exec/bash failure warnings by wrapping a command-like framework summary in markdown and appending
failed, so the reported cron/chat ambiguity remains a focused presentation bug.Reproducibility: yes. at source level: current main still builds warning text as
⚠️ ${toolSummary} failed, and exec/bash summaries can contain markdown-wrappedrun python3 ...text. I did not execute a live cron/chat run in this read-only review.Root-cause cluster
Relationship:
canonicalCanonical: #97319
Summary: This issue is canonical for the narrow exec failure-text ambiguity; the linked exec nonzero-exit and cron-defaults reports are adjacent context with distinct fixes.
Members:
adjacent_distinct: [Bug]: exec tool treats subprocess nonzero exit codes as tool failures, masking stdout and exit-code semantics #97318 - It shares the same production incident and cron error text, but it asks to change exec nonzero-exit semantics rather than presentation wording.adjacent_distinct: [Bug]: Isolated cron defaults inherit full toolbox + full project context — 60–100K tokens/run, –80/day silent waste #97317 - It shares the cron context from the same audit, but it concerns isolated cron defaults and token cost rather than exec failure-message formatting.partial_overlap: Tool error messages surfaced to chat should include failure reason and retry confirmation #46548 - It covers broader chat-visible tool failure reasons and retry confirmation policy; this issue is a narrower wording ambiguity that can be fixed without deciding the broader security/product policy.Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything.
Next step
This is a narrow existing presentation bug with source-reproducible paths and focused regression tests; no new API, config, or product policy is required.
Review details
Best possible solution:
Update the shared tool-failure presentation path so exec/bash warnings name the tool failure separately while rendering only the literal command as command text, with focused tests for payload warnings, cron diagnostics, and any affected chat display.
Do we have a high-confidence way to reproduce the issue?
Yes, at source level: current main still builds warning text as
⚠️ ${toolSummary} failed, and exec/bash summaries can contain markdown-wrappedrun python3 ...text. I did not execute a live cron/chat run in this read-only review.Is this the best way to solve the issue?
Yes: a shared presentation-layer fix is the narrowest maintainable solution, while the linked exec nonzero-exit semantics report should remain separate.
AGENTS.md: found and applied where relevant.
Remaining risk / open question:
Codex review notes: model internal, reasoning high; reviewed against c29e1fe764f3.
Label changes
Label changes:
maturity:stable: The issue affects gateway-runtime diagnostic behavior, and the maturity helper lists Gateway runtime as M4 Stable.Label justifications:
P3: The report describes low-severity diagnostic confusion without data loss, security, availability, or message-delivery failure in the item itself.impact:other: The affected area is user-facing cron/chat diagnostics and debugging clarity, which is maintainer-visible but outside the more specific owned impact categories.maturity:stable: The issue affects gateway-runtime diagnostic behavior, and the maturity helper lists Gateway runtime as M4 Stable.Evidence reviewed
Acceptance criteria:
What I checked:
AGENTS.md:1, c29e1fe764f3)⚠️ 🛠️run python3 ...failedwas read as a literal agent command, and links separate reports for exec nonzero-exit semantics and cron defaults as adjacent context.⚠️ ${toolSummary} failed, so the shared tool summary determines whether the command-likerun ...text is visually separate from the failure label. (src/agents/embedded-agent-runner/run/payloads.ts:553, c29e1fe764f3)Exec failed: <command>. (src/auto-reply/tool-meta.ts:19, c29e1fe764f3)run ${bin} ${script}, so a command likepython3 /path/to/script.pybecomes framework wording that can be mistaken for the literal command when backticked. (src/agents/tool-display-exec.ts:240, c29e1fe764f3)⚠️ 🛠️ ...payloads as tool warnings and can carry the last error payload text into summary/output/error state, matching the reported cronlastErrorsurface. (src/cron/isolated-agent/helpers.ts:216, c29e1fe764f3)Likely related people:
src/agents/tool-display-exec.ts, the file that turns Python exec commands into therun python3 ...display summary involved here. (role: recent exec-display contributor; confidence: high; commits: 4d9cd7d22755; files:src/agents/tool-display-exec.ts)src/agents/tool-display-exec.ts,src/auto-reply/tool-meta.ts)src/agents/embedded-agent-runner/run/payloads.ts, the surface that appendsfailedto the formatted tool summary. (role: recent payload-warning contributor; confidence: medium; commits: e6f391234791; files:src/agents/embedded-agent-runner/run/payloads.ts)src/agents/embedded-agent-runner/run/payloads.ts,src/agents/tool-display-exec.ts,src/auto-reply/tool-meta.ts)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.test(exec): align heartbeat payload title with stripped display verb (o…
fix(exec): narrow stripLeadingExecDisplayVerb to run-prefix-only (issue
fix(exec): rename shadowing local and preserve show verb in warning
fix(exec): strip run prefix consistently via semantic-word denylist
fix(exec): preserve single-token run summaries to keep package-script…
fix(exec): strip run prefix from exec failure warnings for multi-toke…