Agent claims an isolated worktree was created after worktree creation fails
- 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.

> Related worktree creation failure: [#335776](https://github.com/microsoft/vscode/issues/335776)
Contributor guide
Assessment
This issue has not been assessed yet.