Repository navigation
Deepseek Tool Mangling #13442
Description
Before submitting your bug report
- I've tried finding an answer on the Continue docs site
- I'm not able to find an open issue that reports the same bug
- I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: Windows: 11
- Continue version: 2.0.0
- IDE version: {
Version: 1.131.0 (system setup)
Commit: e4c7e7b1d6d060162f4aa7f8225271b67ce1df75
Date: 2026-07-28T10:51:25Z
Electron: 42.7.0
ElectronBuildId: 14710161
Chromium: 148.0.7778.280
Node.js: 24.18.0
V8: 14.8.178.38-electron.0
OS: Windows_NT x64 10.0.26200
}
- Model: Deepseek
- config:
name: Main Config
version: 1.0.0
schema: v1
disableAutocomplete: true
models:
- name: DeepSeek Coder
provider: deepseek
model: deepseek-coder
apiKey:
contextLength: 128000
shell: powershell.exe
OR link to agent in Continue hub:Description
Intermittently, when the agent emits tool calls, the arguments arrive corrupted in transit with no user input at all (no typing, no editor interaction). Required fields arrive empty (filepath, old_string, new_string), field values from sibling calls get interleaved/swapped, and the JSON is truncated mid-value. In the worst case an edit reports success but writes garbled or truncated content to disk (e.g. #pragma once → #pragma o sha; a header truncated mid-line), silently breaking source files. Failures surface inconsistently as ... argument is required or Cannot read properties of undefined (reading 'trim'). Markedly worse when multiple tool calls are batched in a single turn, pointing to a stream/serialization problem in argument generation or parsing.
To reproduce
Tool-call argument corruption
Conditions that make it reliable:
Agent is asked to perform a task that produces multiple tool calls in a single turn (e.g., "read these 3 files", or a multi-part edit touching several files).
Target files exist and the IDE editor panel is open (typing is not required).
Steps:
Give the agent a task that naturally emits ≥2 tool calls in one turn (e.g., "open A.cpp, B.cpp, and C.cpp and summarize each", or "add this same change to these 3 files").
Do not type or click in the editor while the turn streams.
Observe the tools: one or more calls fail with a missing/invalid argument — e.g. filepath argument is required, string old_string is required, string new_string is required, or Cannot read properties of undefined (reading 'trim').
In some runs, observe sibling-field contamination: an old_string/new_string containing text belonging to the other call, or filepath appearing inside changes.
In the worst case, an edit tool reports success but the file on disk is corrupted — truncated mid-line or with characters swapped (e.g. #pragma once → #pragma o sha, or a header ending abruptly at // Latest detected regions (image pixel).
Expected: each tool call receives exactly the arguments the agent emitted; edits either fully succeed with correct content or fail cleanly. Actual: arguments are empty/swapped/truncated and/or files are silently written corrupt.
Confirm it is not user-input related: keep hands completely off the keyboard/mouse for the whole turn; the corruption still occurs.
Activity
Judah-Faison commentedon Oct 30, 2026
I forgot to add, the ide is VSCode, sorry