Skip to content

fix(server): a tool call with a parameter named -i is no longer dropped - #837

Merged
davide221 merged 1 commit into
mainfrom
fix/tool-param-dash-names
Oct 11, 2026
Merged

davide221 merged 1 commit into
mainfrom
fix/tool-param-dash-names

Conversation

@davide221

@davide221 davide221 commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Claude Code's Grep tool names its flags -i, -n, -A, -B and -C. When DeepSeek V4.1 Flash passed one of them, the DSML parameter pattern did not match the name, the call body had text left over, and the parser dropped the whole call. Claude Code then got a reply with one sentence and no tool use, and ended the task.

Change

Parameter names in the DSML and XML attribute patterns may start with -. Tool names are unchanged.

Measured

DeepSeek V4.1 Flash (ds41-gorgon, R9700 + Strix Halo, 192 GB), Claude Code 2.1.296 on a clean config (22 tools), asked to explain the prefix cache's eviction policy in this repository:

main (0fe1fdc) This PR
First reply one sentence, end_turn: the model's Grep call with -i was dropped two Grep calls with -i, tool_use
Task ends after 1 turn, no answer answered in 6 turns, 47 s

Tests

Test Result
test_server_unit 660 passed
New: a DSML Grep call with -i and -n passes; fails on main

Built for gfx1151 + gfx1201.

🤖 Generated with Claude Code

View guided diff

Claude Code's Grep names its flags -i, -n, -A, -B and -C. The DSML and
XML parameter patterns took names that start with a letter or underscore,
so a DeepSeek call passing one of those flags left text the parser could
not account for, and the whole call was dropped: Claude Code ended the
task after one sentence. Parameter names may now start with '-'.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@davide221 davide221 left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review

No issues found. Checked for bugs and logic errors in the changed code.

Reviewed 50aa0d05 · 0 candidate issues checked, kept at ≥70% confidence · add the code-review label to review again

@davide221
davide221 merged commit 5740ef0 into main Oct 11, 2026
11 checks passed
@davide221
davide221 deleted the fix/tool-param-dash-names branch October 12, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant