pi-mono/packages
Armin Ronacher 351efc828b
Some checks are pending
CI / build-check-test (push) Waiting to run
fix(agent): fail tool calls from length-truncated assistant messages (#6285)
* fix(ai,agent): stop salvaging malformed tool-call argument JSON

Finalized tool-call arguments must strict-parse (allowing only lossless
string-escape repair). When the streamed JSON is truncated or malformed,
the raw JSON is preserved on ToolCall.malformedArguments, arguments
become {}, and the agent loop refuses to execute the call with an error
tool result instead of running it with silently salvaged partial
arguments. Partial parsing is now only used for streaming previews.

* fix(agent): fail tool calls from length-truncated assistant messages

Reverts the malformed-arguments tracking approach in favor of handling
truncation in the agent loop: when an assistant message stops with
"length", all tool calls in it are potentially borked (streamed
arguments are salvage-parsed), so none are executed. Each gets an error
tool result telling the model to re-issue the call, and the loop
continues. No new fields on ToolCall and no provider changes.

fixes #6284
2026-07-07 14:30:31 +02:00
..
agent fix(agent): fail tool calls from length-truncated assistant messages (#6285) 2026-07-07 14:30:31 +02:00
ai fix(ai): use "(no tool output)" placeholder for empty tool results without images (#6290) 2026-07-06 21:42:56 +02:00
coding-agent Revert "fix(coding-agent): abort stuck context hooks" 2026-07-07 07:14:27 +02:00
orchestrator Add [Unreleased] section for next cycle 2026-06-30 22:29:44 +02:00
tui fix(tui): decrement paste counter on paste marker delete and terminal clear (#6397) 2026-07-07 14:29:39 +02:00