microsoft / microsoft/vscode

Claude harness: files edited externally during a session are attributed to the session's edited-files list

Open
#334,815 0 comments 0 reactions 1 assignee Claimed by @aiday-mar View on GitHub
stale triage-needed
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

- Copilot Chat Extension Version: 0.41 (2026-03-25)
- VS Code Version: 1.136.1
- OS Version: macOS 26.5
- Feature (e.g. agent/edit/ask mode): Agent mode
- Selected model (e.g. GPT 4.1, Claude 3.7 Sonnet): Claude harness, any model
- Logs:

While a Claude harness session is running, **any** file modification that happens during that time window is added to the session's "edited files" list — including edits I make manually in the editor and edits made by other agents/sessions running in parallel. The list should only contain files the session itself modified via its own edit tools.

Expected behavior:
Only files edited by this session's own tool calls appear in the edited-files list.

Actual behavior:
Externally-edited files appear in the session's edited-files list, as if the agent had changed them. Diff/undo affordances are also offered for changes the agent never made.

Impact:
- Misleading attribution: hard to tell what the agent actually changed.
- Risky "undo/revert all edits" behavior — reverting the session could discard my own or another agent's unrelated work.
- Noisy review flow when running multiple agents concurrently.

Possibly caused by change tracking based on file snapshots / working-set diffing over the request's time window rather than on the edits actually produced by the agent's edit tools.

Steps to Reproduce:

1. Start a Claude harness agent-mode session with a request that takes a while to run.
2. While the request is in progress, edit an unrelated file — either manually in the editor, or via another agent/session/external process.
3. Save the file (or let autosave run).
4. When the session finishes, inspect the changed/edited files list in the chat response.
5. The externally-edited file is listed as edited by the session.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.