microsoft / microsoft/vscode

Agent claims an isolated worktree was created after worktree creation fails

Open
#335,779 0 comments 0 reactions 1 assignee Claimed by @sandy081 View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

- When isolated worktree creation fails, the agent continues as though the worktree exists and reports that the task completed in a new isolated worktree.

### Steps to reproduce

1. Open a repository where isolated worktree creation will fail.
2. Ask the agent: `start implementation in a new independent session with a new worktree`.
3. Wait for worktree creation to fail.

- **Expected:** The agent recognizes that no isolated worktree was created. It should not claim that work is running in one and should clearly report or handle the fallback to the original folder.
- **Actual:** The warning says the isolated worktree could not be created and the session is continuing in the original folder. The agent then says, “Task completed” and reports that it started the work in a new isolated worktree.

![Agent claiming it started an isolated worktree after worktree creation failed](https://github.com/user-attachments/assets/ab948d74-e327-4373-a0a0-5fbc772cb62b)

> Related worktree creation failure: [#335776](https://github.com/microsoft/vscode/issues/335776)

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.