continuedev / continuedev/continue

edit_existing_file fails silently in VS Code integration, despite chat confirming success

Open
#12,317 5 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area:edit ide:vscode kind:bug stale
Dominant language
TypeScript
Stars
36k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

Before submitting your bug report
Relevant environment info
- OS:
- Continue version:
- IDE version:
- Model:
- config:
  

  
  OR link to agent in Continue hub:
Description

Problem: When using the edit_existing_file tool in VS Code, changes are sometimes not applied to the file, even though the chat interface reports success (e.g., "File edited successfully"). This leads to confusion and requires manual verification.

Reproduktionsschritte:

Open a file in VS Code (e.g., scaffolder_analyse.html).
Use edit_existing_file in the Continue chat to modify the file.
The chat confirms the edit, but the file content remains unchanged.
Manual verification (e.g., cat command or reopening the file) shows no changes.

Erwartetes Verhalten:

The file should be updated as confirmed by the chat.
If the operation fails, a clear error message should be shown (e.g., "File is locked by VS Code" or "Permission denied").

Aktuelles Verhalten:

Chat claims success, but no changes are applied.
No error feedback is provided.
Technische Details:

VS Code Version: [Deine Version, z. B., 1.85.1]
Continue Version: [Deine Version, z. B., 0.1.123]
Betriebssystem: [Dein OS, z. B., Windows 11]
Dateityp: HTML, Python, etc. (betrifft alle Dateitypen).

Mögliche Ursachen:

VS Code File Locking: VS Code may lock files during editing, preventing Continue from writing.
Race Conditions: Concurrent file operations (e.g., auto-save in VS Code) might interfere.
Tool Implementation: edit_existing_file may lack proper error handling or retries.
Vorgeschlagene Lösungen:

Retry-Mechanismus:
Implement a retry logic (e.g., 3 attempts with 1s delay) before failing.
Pre-Check:
Verify file writability before attempting edits (e.g., fs.access in Node.js).
Fallback:
If edit_existing_file fails, automatically use create_new_file + delete old file.
User Feedback:
Show a warning if the file is open in VS Code:
"Warning: The file is open in VS Code. Close it or save changes manually before editing."

Workarounds:

Manually close the file in VS Code before using edit_existing_file.
Use create_new_file + manual deletion as a temporary solution.
Logs/Beispiele:

Plaintext

Apply
User: "edit_existing_file" mit Änderungen an scaffolder_analyse.html.
Continue: "File edited successfully."
Reality: Keine Änderungen in der Datei.

To reproduce

No response

Log output

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the edit_existing_file operation in the VS Code integration using the reported scaffolder_analyse.html example, then inspect the tool's write and success-reporting path. Compare the chat confirmation with the file on disk and determine what evidence is available when the write does not take effect. Done means failed edits are not reported as successful and the user receives clear error feedback.

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
Active
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.