microsoft / microsoft/vscode

Agent Host should coordinate overlapping sessions

Open
#330,292 0 comments 0 reactions 1 assignee Claimed by @meganrogge View on GitHub
Dominant language
TypeScript
Stars
193k
Forks
42.4k
PR merge metrics
PR metrics pending

Description

### Agent sessions should coordinate work across worktrees

Agent Host sessions can operate in separate worktrees of the same repository. As a result, multiple active sessions may be working on overlapping feature areas even when they have different working directories.

Today, an agent with session-management tools does not consistently check for overlapping work before beginning code changes or creating another session. This can lead to duplicated effort or concurrent edits to the same files.

Before beginning code changes or creating a new session, the agent should use `list_sessions` to check for relevant active work in the same project or repository, including sessions in other worktrees. If another session may overlap based on its activity, branch, pull request, or changes, the agent should use `get_session_context` to understand that work and `send_message` to coordinate when appropriate.

The agent should prefer reusing, coordinating with, or waiting for existing work rather than starting duplicate or conflicting work.

Codex already appears to perform this coordination automatically. Agent Host has the necessary session-management capabilities, so we should provide similar behavior.

Proposed implementation: #330289

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.