mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #754] Anthropic API: tool calls intermittently emitted inside thinking and returned as end_turn #341
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#341
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @JakeCow on GitHub (Oct 4, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/754
AI disclosure: This issue was created with the assistance of AI based on captured Pi session logs and raw SSE traffic. Im not a dev :)
strata-failing-sse.txt
System
qwen3.8-flash-next-coder-iq1_m/v1/messageslow(budget_tokens: 2048)Setup
qwen3.8-flash-next-coder-iq1_m/v1/messageslow2048With thinking enabled, Strata intermittently emits a complete intended tool call inside the Anthropic
thinkingblock instead of producing a structuredtool_use.Raw SSE from a failing request:
Immediately afterwards:
There is no Anthropic
tool_usecontent block in the failed turn.Successful turns in the same session correctly produce:
Reproduction
Using the same multi-step tool workload:
Failures occurred at different context sizes (~21K–34K), so this does not appear to be a context-limit or timeout issue.
Expected
When the model transitions from reasoning to a tool call, Strata should emit a structured Anthropic
tool_useblock andstop_reason: "tool_use".Actual
The intended tool call is sometimes streamed as
thinking_delta, followed by a cleanend_turn, causing the client agent loop to stop.@Niko1221 commented on GitHub (Oct 7, 2026):
Closing as a duplicate of #804, which was fixed in 0.1.40: a tool call written inside the thinking block is now run (at a line start, outside code fences) instead of ending the turn as end_turn. 0.1.40.1 tightened it further so quoted calls stay text. Please reopen with the log if your Pi client still sees it.