Agent Window: constant errors from old sessions
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- git, typescript, vscode
- Domain
- devtools
Research direction
Start at ChatSessionWorktreeService._getWorktreeChanges and GitServiceImpl.exec, using the logged worktree path and git diff command as entry points. Reproduce the repeated errors after sessions are marked done or their branches are deleted; done means stale sessions no longer spam the log with worktree or revision errors.
Written by the indexing model from the issue text.
Description
- Copilot Chat Extension Version:
- VS Code Version: 1.123.0 (Universal)
- OS Version: Darwin arm64 25.5.0
- Feature (e.g. agent/edit/ask mode): N/A
- Selected model (e.g. GPT 4.1, Claude 3.7 Sonnet): N/A
- Logs:
2026-06-08 09:28:05.199 [warning] [ChatSessionWorktreeService][_getWorktreeChanges] Unable to open worktree repository for session 9d923807-9e37-48d0-9b1a-669ad5697f2a at path /XXX/YYYY.worktrees/agents-....
2026-06-08 09:28:05.248 [error] [GitServiceImpl][exec] git diff --cached --raw --numstat --diff-filter=ADMR -z --merge-base main -- [8ms] Error: Command failed: /opt/homebrew/bin/git diff --cached --raw --numstat --diff-filter=ADMR -z --merge-base main --
fatal: bad revision 'main'
Steps to Reproduce:
- Seems to be triggered after marking sessions as done.
The listed sessions don't exist in the sessions menu any more, so I can't see a way of fixing the issue, I have three with the work tree error and one with the revision error, that branch was deleted long time ago, all are constantly spamming the log every few seconds.
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.9k
- PR merge metrics
- PR metrics pending
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.
More from microsoft/vscode
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
new release
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
testplan-item
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
All issues in microsoft/vscode
Similar issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Difficulty 1/5 Under an hour Newbie friendliness 76/100
-
code-quality refactoring
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
github/gh-aw-firewall#8816 ·
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
vercel/react-tweet#225 ·