fix: clarify exec tool failure warnings#97511
Conversation
|
Codex review: needs maintainer review before merge. Reviewed June 28, 2026, 2:25 PM ET / 18:25 UTC. Summary PR surface: Source +287, Tests +543. Total +830 across 4 files. Reproducibility: yes. source-reproducible: origin/main still builds warnings as Review metrics: none identified. Stored data model Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Next step before merge
Security Review detailsBest possible solution: Land this shared payload-warning fix or an equivalent maintainer-approved version, then close #97319 and supersede the narrower overlapping PRs if this one merges first. Do we have a high-confidence way to reproduce the issue? Yes, source-reproducible: origin/main still builds warnings as Is this the best way to solve the issue? Yes: fixing the shared payload-warning boundary covers both chat and cron consumers, while the narrower overlapping PRs only adjust parts of exec display metadata and do not cover the same raw-mode warning surface. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against e5205a4cef0e. Label changesLabel justifications:
Evidence reviewedPR surface: Source +287, Tests +543. Total +830 across 4 files. View PR surface stats
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
|
I think the shared presentation-layer direction is right for #97319, but this still needs a raw-progress regression before I would call it the best fix. LOC: +164/-11 (2 files). Best-fix verdict: right layer, incomplete coverage for the documented raw detail mode.
So a raw-mode meta shape like: would be treated as one subject instead of extracting the trailing raw command first. That can put the display summary plus the raw suffix inside the failure command text, which reintroduces the same “display text looks like the command” ambiguity for users who enabled raw progress specifically to debug commands. The small fix is probably to split/extract a trailing |
|
Updated in @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Updated in @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Updated in Added direct payload regressions plus production handler-to-payload coverage for raw path cwd and compact repo cwd. Refreshed evidence in the PR body includes the full focused Vitest matrix, formatter check, @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9d95598860
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
Follow-up for the Root cause: the new handler-level payload assertions passed Fix pushed in Evidence:
|
|
Addressed the ClawSweeper P2 about raw exec commands containing backticks in commit cb8abf3. What changed:
Verification:
@clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
|
Pushed |
* clarify exec failure warnings * fix exec failure raw command labels * preserve node context in exec failure warnings * fix exec raw context warnings * fix exec payload test metadata types * fix raw exec command backtick parsing * chore: retrigger ci after security-fast outage --------- Co-authored-by: aditya-vithaldas <[email protected]>
* clarify exec failure warnings * fix exec failure raw command labels * preserve node context in exec failure warnings * fix exec raw context warnings * fix exec payload test metadata types * fix raw exec command backtick parsing * chore: retrigger ci after security-fast outage --------- Co-authored-by: aditya-vithaldas <[email protected]>
* clarify exec failure warnings * fix exec failure raw command labels * preserve node context in exec failure warnings * fix exec raw context warnings * fix exec payload test metadata types * fix raw exec command backtick parsing * chore: retrigger ci after security-fast outage --------- Co-authored-by: aditya-vithaldas <[email protected]>
* clarify exec failure warnings * fix exec failure raw command labels * preserve node context in exec failure warnings * fix exec raw context warnings * fix exec payload test metadata types * fix raw exec command backtick parsing * chore: retrigger ci after security-fast outage --------- Co-authored-by: aditya-vithaldas <[email protected]>
Closes #97319
AI-assisted by Codex.
What Problem This Solves
Fixes an issue where users debugging failed exec/bash tool calls could see the framework-generated action summary rendered like a literal command, for example a Python script failure appearing as if the agent typed
run python3 ....This affected chat/tool-failure cards and cron run diagnostics that reuse the embedded-runner payload warning text.
Why This Change Was Made
Exec-like tool failures now render the tool label and failure state separately from the command subject, using forms like
Exec failed: <command>instead of wrapping the whole summary before appendingfailed.When the stored exec summary has a raw trailing inline command, the warning prefers that literal command. Known literal
run <tool> <arg>summaries render without the frameworkrunlabel, while semantic summaries such as package scripts, inline scripts, cwd/repo labels, node context, and pipeline summaries keep the useful display context. Non-verbose exec failures also include a concise(exit N)suffix when the error text exposes an exit code.The raw metadata parser preserves explicit
node: <name>context plus cwd labels such as(in /tmp/build)and(repo), while avoiding duplicate/false cwd suffixes when the literal raw command itself contains parenthesized text.User Impact
Users get clearer failure messages when debugging failed scripts or shell commands, including which node and working directory context applied to a failed exec. The change is presentation-only; it does not change tool execution, retry policy, cron behavior, or verbose error-detail rules.
Evidence
f89d605c,aed96cde, and9d955988after review feedback.node scripts/run-vitest.mjs src/agents/embedded-agent-runner/run/payloads.errors.test.ts src/agents/embedded-agent-subscribe.handlers.tools.test.ts src/cron/run-diagnostics.test.ts src/cron/isolated-agent.helpers.test.ts src/agents/tool-display.test.ts ui/src/ui/chat/tool-cards.test.tsnode node_modules/oxfmt/bin/oxfmt --check --threads=1 src/agents/embedded-agent-runner/run/payloads.ts src/agents/embedded-agent-runner/run/payloads.errors.test.ts src/agents/embedded-agent-subscribe.handlers.tools.test.tsgit diff --check.agents/skills/autoreview/scripts/autoreview --mode local --codex-bin /tmp/codex-fast-wrapperreported clean after the raw-detail, semantic-summary, node-context, cwd-context, compact-label, and false-positive review findings were fixed.handleToolExecutionStart->handleToolExecutionEnd->buildEmbeddedRunPayloadsfor raw command, node context, path cwd context, and compact repo cwd context.buildEmbeddedRunPayloadswith static command metadata: