snippet-01-tool-aborted.json
snippet-02-message-finish-length.json
snippet-03-session-created.log
snippet-04-llm-model.log
snippet-05-session-cancel-1.log
snippet-06-session-cancel-2.log
Tool execution aborted when tool call is truncated (empty input)
Summary
During session "Resumen T84 antes de continuar" (ses_3b7971163ffexUgX5mjSgXDfWQ), several tool calls ended with Tool execution aborted. One concrete instance shows an edit tool call with empty input ({}) that immediately fails. The same assistant message ended with finish: "length" (output length limit), which suggests the tool call may have been truncated before arguments were fully emitted. This looks like a truncation/cancel edge case rather than an LLM transport failure.
Environment
- OpenCode version:
1.1.49
- OS: Windows
- Model:
claude-opus-4-6 (azure-anthropic)
- Session title: "Resumen T84 antes de continuar"
- Session ID:
ses_3b7971163ffexUgX5mjSgXDfWQ
Evidence (sanitized excerpts)
The following log snippets are attached in snippets/ (redacted paths):
-
snippet-01-tool-aborted.json — tool call aborted with empty input
-
snippet-02-message-finish-length.json — same message finished due to output length
-
snippet-03-session-created.log — session creation (OpenCode 1.1.49)
-
snippet-04-llm-model.log — model/provider info
-
snippet-05-session-cancel-1.log — user cancellation (expected behavior)
-
snippet-06-session-cancel-2.log — user cancellation (expected behavior)
Notes / Hypothesis
- The tool call is emitted with empty
input and immediately aborted.
- The corresponding assistant message ended with
finish: "length", which is consistent with output truncation.
- This suggests OpenCode may attempt to execute a tool call even when its arguments are incomplete due to truncation.
Expected behavior
If a tool call is truncated (missing or empty input), OpenCode should either:
- retry the model to complete the tool arguments, or
- skip tool execution with a clearer error (e.g., "tool call incomplete due to output length"), instead of
Tool execution aborted.
Questions for maintainers
- Is there a guard that detects incomplete tool call payloads before execution?
- Is there a known interaction between
finish: "length" and tool call emission that can cause empty-input tool calls?
Related issues
snippet-01-tool-aborted.json
snippet-02-message-finish-length.json
snippet-03-session-created.log
snippet-04-llm-model.log
snippet-05-session-cancel-1.log
snippet-06-session-cancel-2.log
Tool execution aborted when tool call is truncated (empty input)
Summary
During session "Resumen T84 antes de continuar" (
ses_3b7971163ffexUgX5mjSgXDfWQ), several tool calls ended withTool execution aborted. One concrete instance shows anedittool call with empty input ({}) that immediately fails. The same assistant message ended withfinish: "length"(output length limit), which suggests the tool call may have been truncated before arguments were fully emitted. This looks like a truncation/cancel edge case rather than an LLM transport failure.Environment
1.1.49claude-opus-4-6(azure-anthropic)ses_3b7971163ffexUgX5mjSgXDfWQEvidence (sanitized excerpts)
The following log snippets are attached in
snippets/(redacted paths):snippet-01-tool-aborted.json— tool call aborted with empty inputsnippet-02-message-finish-length.json— same message finished due to output lengthsnippet-03-session-created.log— session creation (OpenCode 1.1.49)snippet-04-llm-model.log— model/provider infosnippet-05-session-cancel-1.log— user cancellation (expected behavior)snippet-06-session-cancel-2.log— user cancellation (expected behavior)Notes / Hypothesis
inputand immediately aborted.finish: "length", which is consistent with output truncation.Expected behavior
If a tool call is truncated (missing or empty input), OpenCode should either:
Tool execution aborted.Questions for maintainers
finish: "length"and tool call emission that can cause empty-input tool calls?Related issues