VS Code 1.142 Lets Agent Chats Move Into Git Worktrees

Text-free illustration on a dark navy background. Two separate sculptural file folders sit side by side. Amber edited pages remain in the stone-gray folder on the left; a single layered sequence of pale blue speech shapes sits in the blue folder on the right. The authentic blue MacDigest binocular symbol appears below.

Conceptual illustration of moving an agent chat to a new Git worktree. The conversation history is retained; by default, uncommitted edits stay in the original folder. Illustration: MacDigest.

Microsoft released VS Code 1.142 on October 14, with Apple silicon, Intel and Universal Mac downloads. An agent chat can now follow a task into a new Git worktree while retaining its conversation history. For Mac developers who investigate a problem before deciding where to implement a fix, that removes a context-rebuilding step. Existing uncommitted edits need separate attention.

Move the conversation before implementation

In the Agents window, ask the agent to continue the task in a new worktree before making changes. Review the destination and any tool-approval or Workspace Trust requests, then wait for the workspace-change notice and automatic continuation before sending another prompt. The session guide requires an Agent Host session with one chat and one local folder.

Harness support needs a careful check: the release notes name Codex, while the linked guide also lists Copilot and specifies Interactive mode for the experimental Codex Agent Host integration. The ordinary OpenAI Codex extension is editor-only. Those descriptions are not fully aligned, so check the guide against your available harness before relying on the workflow. Enterprise-managed permissions can also restrict harness availability.

Check what the new worktree contains

A new worktree requires a repository with at least one commit and starts from committed files on its base branch. Uncommitted tracked changes and untracked files stay in the original folder; ignored files, including local configuration and installed dependencies, are absent by default. Commit the changes the task needs, or keep working in the current folder when its uncommitted state matters.

Review any worktree include settings. The experimental git.worktreeIncludeFiles setting copies only files matching its patterns and listed in .gitignore. The separate experimental git.worktreeSymlinkFolders setting shares ignored folders instead: edits through those links affect the original folder too. Include only material the agent should access or change.

Moving a chat to an existing folder instead uses that destination’s files; it does not transfer the original files.

Review permissions separately

Worktree separation is not a security boundary. Microsoft’s Agents window guide says worktree sessions use Allow all without manual approval prompts. A worktree alone does not restrict commands, network access or files outside it; those restrictions require agent sandboxing.

Check permissions and sandboxing before moving the task, then review and integrate the resulting changes. MacDigest has not independently tested this workflow.

Leave a Reply

Your email address will not be published. Required fields are marked *