You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Folder doesn't follow a chat isolated in a multi-chat session after the agent host restarts #349954
In an editor window with chat.editorWindow.enableWorktree on, the window's folder follows the shown chat into the worktree that chat works in. When one chat of a session with several chats is isolated into a new worktree (for example with the agent's isolate_session tool), the folder follows it and the worktree is listed under Folder Location > Worktrees. This relies on the session summary's vscode.isolatedChatWorktrees_meta entry, which the agent host publishes as it isolates or restores such a chat.
After the agent host restarts, this no longer works for such a chat until the session's marker reaches the window again:
Steps:
In a folder window with chat.editorWindow.enableWorktree on, start an agent host chat, add a second chat to its session, and isolate the first chat into a new worktree. The folder follows it.
Quit and relaunch VS Code, so that the agent host restarts.
Open the isolated chat again.
Expected: the folder moves to that chat's worktree, and the worktree is listed under Folder Location > Worktrees.
Actual: the folder stays where it is, and the worktree is not listed.
Cause: the session list the window holds is the agent host catalog's summary, which the host rebuilds from persisted session values after a restart. The vscode.isolatedChatWorktrees marker is published only on the live session state and isn't persisted, so the catalog summary doesn't carry it, and the provider doesn't offer the worktree.
Proposed fix: persist the marker as a central session value (agentHostSessionStateMirror) and project it into the catalog summary on listing, with restart and older-build coverage.
Activity