continuedev / continuedev/continue
edit_existing_file tool is unusable and crash VSCode.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 36k
- Forks
- 5.4k
- PR merge metrics
- No merged PRs in 30d
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
- 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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the edit_existing_file tool from its invocation through the VSCode file-application path; the issue does not name specific source files or tests. Reproduce the provided three-line edit on a 1,600-line file, then verify that unchanged content is preserved, indentation remains intact, and VSCode does not become unstable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100