microsoft / microsoft/vscode

Agents Window stays at “Worktree · Creating...” while session runs with unknown branch

Open
#336,353 0 comments 0 reactions 1 assignee Claimed by @osortega View on GitHub
agent-host
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

## Description

In the Agents Window, a session requested with worktree isolation can begin executing while its worktree status remains stuck at **Creating...**. The session continues reading and editing files, but the UI does not reveal which working directory or branch is actually being used.

This leaves the user unable to tell whether the agent is operating in the requested isolated worktree, a partially created worktree, or the original checkout.

This was observed on Windows. Other operating systems have not yet been verified.

## Steps to reproduce

1. Open a Git repository in the Agents Window on Windows.
2. Start a session that requests a new worktree.
3. Let the session begin working.
4. Hover the session in the session list and inspect its workspace information.

## Actual behavior

- The session actively runs tools and continues making progress.
- The session details remain at `Worktree · Creating...`.
- No effective worktree path or branch is shown.
- There is no indication whether creation succeeded, failed, or fell back to the original checkout.

## Expected behavior

The agent should not begin operating until worktree resolution reaches a known state. Once it runs, the Agents Window should show the effective working directory and branch.

If worktree creation fails, the UI should leave the pending state, surface the failure, and state explicitly whether the session stopped or fell back to the original checkout.

## Related issues

- #328652 addressed surfacing worktree creation failures that fall back to the original repository.
- #335776 tracks a Windows worktree creation failure caused by long paths.

This report is specifically about the UI remaining indefinitely in the pending `Creating...` state while the session is already running, with no way to identify its effective worktree or branch.

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.