Found the bug. Let me examine the write tool case in detail and compare with how edit handles errors:
Root Cause Analysis:
In tool-execution.ts, the formatToolExecution() method handles different built-in tools. Looking at the write case (lines 430-453):
Compare this to the edit case (lines 455-482) which properly handles errors:
The write tool case:
- Only renders the content from
args (what's being written)
- Never checks
this.result?.isError
- Never calls
this.getTextOutput() to display error messages
Other tools (bash, read, ls, find, grep) all display output from this.getTextOutput() which includes error text. Only write is missing this.
Proposed Fix:
Add error handling to the write case in formatToolExecution():
Affected File:
packages/coding-agent/src/modes/interactive/components/tool-execution.ts (lines ~430-453)