continuedev / continuedev/continue
edit_existing_file fails silently in VS Code integration, despite chat confirming success
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 using the "Ask AI" feature on the Continue docs site to see if the docs have an answer
- I'm not able to find a related conversation on GitHub discussions that reports the same bug
- 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:
- 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
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 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