Refresh Workspace Changes on agent disk writes - #18
Merged
Conversation
Terminal agents edit files directly on disk, which fires no onDidSaveTextDocument event, so Workspace Changes stayed stale until the 10s poll. Add a general workspace watcher that routes through the cheap git-only refreshChanges path on a 250ms debounce and invalidates verification evidence like the save handler does. Worktrees outside the workspace still rely on the poll. Document the contributor Node version in .nvmrc instead of engines.node, which would ship a false runtime claim in the extension manifest. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Terminal agents write files straight to disk, which fires no
onDidSaveTextDocumentevent and matches neither the image nor the plan watcher. Workspace Changes therefore only self-corrected on the 10-second poll, so an agent's edits looked stale in Review for up to 10s.Change
**/*workspace watcher inReviewTreeProvider. Disk-write events route through the cheap git-onlyrefreshChanges()path on their own 250ms debounce — not the fullfindFilesrefresh — since a source edit can only move git state. Plans/docs and images keep their dedicated watchers.node_modules,.git,out,dist), mirroring thefindFilesexcludes, so agent write bursts don't pin the refresh pipeline..nvmrc(Node 24) to document the contributor toolchain — deliberately notengines.node, which would ship a false runtime claim in the extension manifest (the extension host runs Node ~20 at VS Code 1.96, and the notify hook helper only needsnode:http).Testing
npm run check— lint clean, 220/220 unit tests pass.🤖 Generated with Claude Code