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

Merged
DA
3d ago
+50-9

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 (0fe1fdcc)This PR
First replyone sentence, end_turn: the model's Grep call with -i was droppedtwo Grep calls with -i, tool_use
Taskends after 1 turn, no answeranswered in 6 turns, 47 s

Tests

TestResult
test_server_unit660 passed
New: a DSML Grep call with -i and -npasses; fails on main

Built for gfx1151 + gfx1201.

🤖 Generated with Claude Code