microsoft / microsoft/vscode

Disable sessions when isolated worktree creation fails

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

Description

## Problem

When isolated worktree creation fails, the session falls back to the original repository folder and remains usable. This breaks the isolation guarantee and can allow the session to modify the user's active checkout.

For example, the attached failure occurred when the repository Git LFS checkout hook could not find `git-lfs`; the session reported that it was continuing in the original folder.

## Expected behavior

If the isolated worktree cannot be created:

- Do not fall back to using the original repository folder.
- Put the session into a failed/unusable state.
- Keep the worktree creation error visible so the user knows why the session cannot continue.

## Screenshot

![Worktree creation fails but session continues in the original folder](https://github.com/user-attachments/assets/dccb5770-8af1-4131-b2a8-d56b7fec7b8d)

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.