Before submitting your bug report
Relevant environment info
- OS: Windows
- Continue version:2.0.0
- IDE version: VSCode 1.131
- Model: qwen/qwen3.6-27b, google/gemma-4-26b-a4b, google/gemma-4-31b, qwen/qwen3.6-35b-a3b, qwen/qwen3-coder-30b
- config:
name: Main Config
version: 1.0.0
schema: v1
models:
- name: Autodetect
provider: lmstudio
model: AUTODETECT
apiBase: http://localhost:1234/v1/
defaultCompletionOptions:
maxTokens: 25000
OR link to agent in Continue hub:
Description
I tried to let my agent use tool edit_existing_file but no matter what I do It fails this simple task..
It calls tool:
Tool call: {
"id": "WaewWSJHduJOgQPvMM9ZmZpzLXWsZ8OQ",
"type": "function",
"function": {
"name": "edit_existing_file",
"arguments": ""
}
}
Tool call: {
"type": "function",
"function": {
"arguments": "{\"filepath\":\"index.html\",\"changes\":\" // ... existing code ...\\n let moveSpeed = player.running ? 350 : 500;\\n let accel = 1800;\\n let friction = player.onGround ? 1500 : 600;\\n // ... existing code ...\"}"
}
}
But instead applying the changes. It request next agent to "copy" a hole file...:
PROMPT:
... CODE ...
SUGGESTED EDIT:
// ... existing code ...
let moveSpeed = player.running ? 350 : 500;
let accel = 1800;
let friction = player.onGround ? 1500 : 600;
// ... existing code ...
Apply the SUGGESTED EDIT to the ORIGINAL CODE. Output the complete modified file.
- Output ONLY code. Do NOT explain, summarize, or describe changes.
- Leave existing comments in place unless changes require modifying them.
- Preserve all unchanged code exactly as-is.<|im_end|>
<|im_start|>assistant
Options
{
"maxTokens": 25000,
"model": "qwen/qwen3.6-27b",
"raw": true,
"reasoning": false
}
It is super broken.. Especially because you ask LLM to rewrite file with applied changes, but you forgot that AI can start to hallucinate in the middle of rewrite...
At the end when the agent finish it works. The applayer freak out and removes everything and leave only some code random five lines in 1600+ lines of code... Other lines have 2 spaces... VSCode start to lagging and everything crash... Sometime only VSCode sometime a hole PC..
To reproduce
- Prompt (without attached filles):
Change:
let moveSpeed = player.running ? 350 : 200;
let accel = 1800;
let friction = player.onGround ? 1500 : 400;
to:
let moveSpeed = player.running ? 350 : 500;
let accel = 1800;
let friction = player.onGround ? 1500 : 600;
YOU HAVE TO USE TOOL: edit_existing_file.
Log output
Before submitting your bug report
Relevant environment info
Description
I tried to let my agent use tool edit_existing_file but no matter what I do It fails this simple task..
It calls tool:
But instead applying the changes. It request next agent to "copy" a hole file...:
PROMPT:
It is super broken.. Especially because you ask LLM to rewrite file with applied changes, but you forgot that AI can start to hallucinate in the middle of rewrite...
At the end when the agent finish it works. The applayer freak out and removes everything and leave only some code random five lines in 1600+ lines of code... Other lines have 2 spaces... VSCode start to lagging and everything crash... Sometime only VSCode sometime a hole PC..
To reproduce
Log output