Skip to content

[Engine] Tool calls emitted as text / rejected, breaking agent processing #4751

Open

Description

@FraYoshi

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

  1. Build Strata and run with ./run-<model>.sh

  2. Set PTC mode (Deepseek Harness, DSH) in a new conversation.

  3. Run the agent through a long agentic Blender task with a prompt like this:

    I have added inside the measurements directory in angle-piece the 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 angle

  4. After 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:

        <tool_call>
          <function=tools.write>
            <parameter=file_path>/home/user/workspaces/blender/angle-piece-build/scratch/annot2.py</parameter>
            <parameter=content> ... python code ... </parameter>
          </function>
        </tool_call>
  1. The strata terminal logs the block as rejected instead of executed:
    [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 them

Expected vs actual

  • Expected: the tool call is executed, or at least the run stays recoverable.
  • Actual: the call is returned as text, the response never arrives, and the conversation is irreparably broken most of the time.

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> on run_command), and a call prefixed with trailing text (Response <tool_call>...).

Environment

  • Strata version: strata 0.2.8 (build 0.1.54; python 3.14.8 at /usr/bin/python3)
  • DSH version 0.2.1-rc.2, PTC mode
  • Graphic card: RTX 3060 (12 GB VRAM), RAM 128 GB, Operating System: Arch Linux

Activity

  1. github-actions commented on Oct 30, 2026

    @github-actions

    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:

    • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".

    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

  2. changed the title [-]Tool calls emitted as text / rejected, breaking agent processing[/-] [+][Engine] Tool calls emitted as text / rejected, breaking agent processing[/+] on Oct 30, 2026
  3. github-actions commented on Oct 30, 2026

    @github-actions

    Thanks, this follows the format now.

  4. miscdebris commented on Oct 31, 2026

    @miscdebris

    Environment

    • Strata version: strata 0.2.9 (build 0.1.55; docker cuda 13), qwen3.8-flash-next-iq3_s
    • OpenWebUI 0.12.5
    • NVIDIA GeForce RTX 3090 + NVIDIA GeForce RTX 3090, 48 GB

    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:

    Actually, let me do parallel: get emails 3889, 6872, 7328, and search for pptx.
    
    Then download attachments.
    
    Let me do that.
    
    Response
    
    Ich habe die Kernfäden identifiziert. Jetzt hole ich die restlichen Details und lade die Anhänge herunter.<tool_call>
    <function=run_command>
    <parameter=command>
    ls -la /home/user/ 2>&1 | head -30; echo "---"; ls -la /home/user/imap-attachments/ 2>&1 | head -20
    </parameter>
    </function>
    </tool_call>
    
    Let me also verify the folder.
    
    Response
    
    <tool_call>
    <function=run_command>
    <parameter=command>
    ls -la /home/user/imap-attachments/
    </parameter>
    </function>
    </tool_call>
    
    Let me verify the download folder and download the eml attachments.
    
    Response
    
    <tool_call>
    <function=run_command>
    <parameter=command>
    ls -la /home/user/imap-attachments/ 2>&1
    </parameter>
    </function>
    </tool_call>
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions