Skip to content

Agent Host should coordinate overlapping sessions #330292

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

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions