mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4751] [Engine] Tool calls emitted as text / rejected, breaking agent processing #2181
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#2181
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 @FraYoshi on GitHub (Oct 30, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4751
Follow-up to #4427. That issue was closed, and couldn't reopen it, so this is filed as a new issue.
The problem
In PTC mode (Deepseek Harness) but not only limited to this harness, tool calls can come back to the agent as plain text instead of being executed. The agent run never completes, and the conversation is broken in an irreparable way most of the time. This still happens in the current build.
Last known working was version
0.1.45, unsure about more recent builds.Steps to reproduce
Build Strata and run with
./run-<model>.shSet PTC mode (Deepseek Harness, DSH) in a new conversation.
Run the agent through a long agentic Blender task with a prompt like this:
I have added inside the
measurementsdirectory inangle-piecethe measurements for the 3D model you have to make in Blender. The scope is 3D printing, and the 3D printed piece needs to lock on the angle by having a vertical piece on the bottom to not move, and a flat piece on the top to ultimately lock. Recreate the measured piece for reference, and as a separate object the one that will be printed. Do not recreate everything, only the angle of interest. The scope of the 3D piece to print is to not break the clothes when hurting the angleAfter a long multi-step session (1 turn, 22 steps, 710K tok), at some point instead of executing the tool, the model writes the tool call as literal text in the response:
[strata] 1 <tool_call> block(s) in the answer did not read as a call of a declared tool and went back as text (a name the request did not declare, or a form the template does not use); the names the model wrote: tools.write; the response carries them as strata_rejected_tool_calls, /metrics counts themExpected vs actual
Other cases from the mother issue
Another user reports the tool call appearing in the response without the tool being called, in two shapes copied from the response body in llama-swap chat format: a call with the wrong parameter name (
<parameter=input>onrun_command), and a call prefixed with trailing text (Response <tool_call>...).Environment
strata 0.2.8 (build 0.1.54; python 3.14.8 at /usr/bin/python3)DSHversion0.2.1-rc.2,PTC mode@github-actions[bot] commented on GitHub (Oct 30, 2026):
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
@github-actions[bot] commented on GitHub (Oct 30, 2026):
Thanks, this follows the format now.
@miscdebris commented on GitHub (Oct 31, 2026):
Environment
I had a prompt running with dozens of tool calls, and initially it look good, but at the end tool calls ended up again in response:
@miscdebris commented on GitHub (Nov 4, 2026):
Environment
At first I thought it is fixed, since there I had chats with dozens and dozens of tools calls, all no problem. Then basically right at start of a chat the tools calls again made it into the response.
@Niko1221 commented on GitHub (Nov 6, 2026):
Strata 0.2.11 fixes the forms in this report: a call written as
tools.write,functions.writeordefault_api.writenow runs your declaredwritetool. The space form (tools write) and a baretoolsare tracked in #5409. Could you try your setup on 0.2.11 and say whether it works? I'll close this once it does.@FraYoshi commented on GitHub (Nov 7, 2026):
Thanks for the attempt @Niko1221 , unfortunately the problem persists.
Here my report (with the 3 full sessions attached in the zip file)
261107-dsh-sessions.zip
Strata version
0.2.11, testing with Qwen3.8-flash-nextiq4_xsby Unsloth.Tests are made using
dshinPTC mode, medium reasoningconfig:
prompt:
1st test (1.5 engine - DFlash2)
session:
session-7e7c90c7-9cf8-4f97-aedf-daae5bb44699Conversation stopped with this ending:
</parameter> </function> </tool_call>after 1 turn, 2 steps, 47.3K tokens
from the command line log:
2nd test (mainline engine - DFlash2)
session:
session-5f990bb9-a6f5-4ab0-8135-caeceb05e262Conversation stopped with this ending:
</parameter> </function> </tool_call>after 1 turn, 5 steps, 173K tokens
from the command line logs:
3rd test (mainline engine - MTP)
session:
session-24e80725-6b40-458f-b206-8161a7d46c86At turn 1, step 4, conversation answered with
<tool_call> <function=read> <parameter=file_path> /redacted/path/tmp_probe_api.py </parameter> </function> </tool_call>but did not stop.from the command line log:
At turn 1, step 7, 257K tokens, conversation stopped with
</parameter> </function> </tool_call>from the command line log: