fix(server): a tool call with a parameter named -i is no longer dropped
Merged
DA
3d ago+50+50+01234567890123456789-9-9-0123456789
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 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