Repository navigation
fix: preserve tool output when execution fails - #1
Conversation
|
Thanks for the focused fix. I independently confirmed that the new regression test fails against the original I’m not merging over a red check. The latest Ubuntu attempt (#3) fails again in the unchanged The code review is otherwise complete; this PR remains open pending a trustworthy Linux CI result. |
|
Thanks. The failure mode is real and worth fixing: The table-driven coverage is the right shape — it checks both the next request and the persisted transcript, with and without output. One nit: the two parts are joined with a newline, so an output that already ends in a newline produces a blank line before |
When a tool returns both diagnostic output and an error, the agent currently replaces the output with the error message. For example, a failing test command loses its failure details before the next model request and in the saved session, leaving only the exit-status error.
Preserve the tool output and append the error message. Add offline, table-driven coverage that checks both the next model request and the persisted transcript for failed tools with and without output, successful tools, and empty results.
Validation:
go fmt ./...go test ./...go vet ./...git diff --check