docs(coding-agent): clarify that tool errors must be thrown, not returned

Returning { isError: true } from a tool's execute function was silently
ignored - the agent loop only sets isError via the catch block. Fix the
with-deps example to throw instead, add a clear note in the Tool Definition
docs section, and update the Error Handling summary.

closes #1881
This commit is contained in:
Mario Zechner
2026-03-06 14:36:18 +01:00
parent e4172e68d0
commit b079003cf6
3 changed files with 15 additions and 6 deletions

View File

@@ -9,6 +9,7 @@
### Fixed
- Fixed `/new` leaving startup header content, including the changelog, visible after starting a fresh session ([#1880](https://github.com/badlogic/pi-mono/issues/1880))
- Fixed misleading docs and example implying that returning `{ isError: true }` from a tool's `execute` function marks the execution as failed; errors must be signaled by throwing ([#1881](https://github.com/badlogic/pi-mono/issues/1881))
## [0.56.2] - 2026-03-05