Disable sessions when isolated worktree creation fails
- 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

Contributor guide
Assessment
This issue has not been assessed yet.