fix(exec): keep framework verb out of backtick-wrapped failure message (#97319)#97359
fix(exec): keep framework verb out of backtick-wrapped failure message (#97319)#97359ly-wang19 wants to merge 1 commit into
Conversation
|
Codex review: needs real behavior proof before merge. Reviewed June 28, 2026, 12:31 AM ET / 04:31 UTC. Summary PR surface: Source +59, Tests +28. Total +87 across 4 files. Reproducibility: yes. Source inspection shows current main appends Review metrics: none identified. 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:
Proof guidance:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Revise the failure-warning presentation so the tool failure label is separate from exec metadata while preserving meaningful summaries and raw-command details, then add redacted real behavior proof. Do we have a high-confidence way to reproduce the issue? Yes. Source inspection shows current main appends Is this the best way to solve the issue? No. The PR fixes one ambiguity by deleting leading words, but that is too broad for summaries where the first word is meaningful; preserving the summary and changing the failure rendering is the safer shape. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 07b934901a32. Label changesLabel changes:
Label justifications:
Evidence reviewedPR surface: Source +59, Tests +28. Total +87 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
|
|
Closing this PR because the author has more than 20 active PRs in this repo. Please reduce the active PR queue and reopen or resubmit once it is back under the limit. You can close your own PRs to get back under the limit. |
What Problem This Solves
When an
exec/bashtool call fails, the chat and cron run history currently render the failure as:The framework display verb
runsits inside the backticks, adjacent to the actual command. Users debugging failures read this as "the agent typedrun python3 /path" — the bug reporter burned ~45 minutes concluding the agent was prependingrunto its commands when in fact the cause was anexecexit-code failure (issue #97319).Why This Change Was Made
formatToolAggregatebacktick-wraps the entire meta string for exec/bash tools. The meta string is the display label produced bysummarizeKnownExec(src/agents/tool-display-exec.ts), which always starts with a known action verb (run,check,view,show,list, …). The wrapping has no concept of "this leading word is a framework label, not part of the literal command".This PR adds
stripLeadingExecDisplayVerband uses it in the failure-warning builder (payloads.ts) so only the subject of the action is backtick-wrapped:⚠️ 🛠️ \run python3 /path` failed`⚠️ 🛠️ \python3 /path` failed`⚠️ 🛠️ \show some-file (workspace)` failed`⚠️ 🛠️ \some-file (workspace)` failed`Scope is the failure-warning path only. Tool progress, streaming, and other
formatToolAggregatecallers are unchanged.User Impact
lastErrorlines now backtick-wrap exactly what was run. The framework action verb no longer leaks into the literal command.cd ~/dir && ls,git status,npm install) pass through unchanged — the strip helper only fires on labels emitted bysummarizeKnownExec.Evidence
src/agents/tool-display.test.ts→stripLeadingExecDisplayVerbcovers (a) known verbs (run,check,show,find), (b) non-verb first tokens (cd,git,npm), (c) single-token / empty input.src/agents/embedded-agent-runner/run/payloads.errors.test.ts— the markdown mutation-warning case now expects the verb-stripped shape.npx vitest run src/agents/tool-display.test.ts→ 45/45 pass.npx vitest run src/agents/embedded-agent-runner/run/payloads.errors.test.ts→ 54/54 pass.npx vitest run src/auto-reply/tool-meta.test.ts src/cron/isolated-agent/→ 406/406 pass.Closes #97319.