[BUG] Write tool shows "Error writing file" with relative paths but files are written successfully
Resolved 💬 2 comments Opened Mar 1, 2026 by ArtemYurov Closed Mar 29, 2026
Bug description
Write tool reports "Error writing file" when relative paths are used, but the files are actually created correctly on disk. The UI shows red "Error writing file" for each file, which is confusing since there's no actual error.
Steps to reproduce
- Agent uses Write tool with a relative path (e.g.
app/Mcp/Tools/GetMyTasksTool.php) instead of an absolute path - File is written successfully to disk
- UI shows "Error writing file" in red for every file
Screenshot
Multiple files written in a batch all show the error:
● Write(app/Mcp/Tools/GetMyTasksTool.php)
⎿ Error writing file
● Write(app/Mcp/Tools/GetTaskByIdTool.php)
⎿ Error writing file
● Write(app/Mcp/Tools/CreateTaskTool.php)
⎿ Error writing file
All files were created correctly on disk with the expected content.
Expected behavior
- Either: no error (resolve relative path to absolute automatically)
- Or: a clear warning/message explaining that absolute paths are required, without actually failing
Actual behavior
"Error writing file" shown in red, but the file is written successfully. This is confusing — it looks like something went wrong when it didn't.
Environment
- Claude Code version: 2.1.63
- OS: macOS (Darwin 24.6.0)
- Shell: zsh
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗