microsoft / microsoft/vscode

Allow agents to create research sessions without a new worktree

Open
#336,665 0 comments 0 reactions 2 assignees Claimed by @meganrogge View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

When an orchestrating agent creates a session for read-only research, the session is still created with a new worktree even when the agent omits the `worktree` option. This is surprising because the agent interprets omission as opting out of worktree creation.

## Steps to reproduce

1. Ask an agent to create a child/session for a read-only research task.
2. Have the agent omit the `worktree` option because no code changes are expected.
3. Observe that the session is created in a new worktree anyway.

## Expected behavior

The session creation API should provide a clear, explicit way for an orchestrating agent to create a session in the current workspace without allocating a new worktree. The tool schema/documentation should also make the default behavior unambiguous so agents do not assume omission disables worktree creation.

## Actual behavior

Omitting `worktree` still creates a new worktree, causing unnecessary worktrees for research-only questions.

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.