VS Code save events not triggered on Claude Code file edits
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
When Claude Code writes or edits files from within the VS Code extension, changes are written directly to disk without going through VS Code's editor buffer. As a result, onDidSaveTextDocument is never fired, silently breaking any extension or workflow that depends on VS Code's save lifecycle.
This is a silent failure — no error is shown, but save-triggered workflows stop working entirely when Claude Code is in use. Affected workflows include:
- Salesforce DX auto-deploy — relies on
onDidSaveTextDocumentto push changes to a scratch org on save; Claude Code edits completely bypass this, breaking the deploy pipeline - Prettier / ESLint format-on-save — never triggered, leaving files unformatted after Claude Code edits
- Any extension using
workspace.onDidSaveTextDocumentoronWillSaveTextDocument
Proposed Solution
Route file writes/edits through the VS Code editor buffer using workspace.openTextDocument + TextEditor.edit (or equivalent), then call document.save() or trigger a save via the VS Code API. This would cause onDidSaveTextDocument to fire correctly, making Claude Code edits behave identically to a manual user save.
Cursor handles this correctly by routing edits through the editor buffer and triggering a save through the VS Code API.
Alternative Solutions
No viable workaround exists for users whose workflows depend on onDidSaveTextDocument. The event simply never fires when Claude Code makes edits, and there is no way to intercept or re-trigger it from the extension side.
Priority
Medium - Would be very helpful
Feature Category
File operations
Use Case Example
_No response_
Additional Context
This was surfaced via the /feedback command inside Claude Code.
Related to #14183 (closed as stale) — reopening as the issue is still present and affects additional use cases beyond formatting, including Salesforce DX deployment pipelines.
- Claude Code VS Code Extension
VS Code Detail:
Version: 1.121.0 (user setup)
Commit: f6cfa2ea2403534de03f069bdf160d06451ed282
Date: 2026-05-19T11:51:53+02:00
Electron: 39.8.8
ElectronBuildId: 13870025
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26100
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗