Skip to content

Build git worktree isolation manager for parallel agent sessions #3

@frankxai

Description

@frankxai

Context

Parallel agent sessions (like ComposioHQ/agent-orchestrator) need git worktree isolation so agents don't conflict on file operations.

Requirements

  • WorktreeManager class: create, list, cleanup worktrees
  • Auto-create worktree per agent session with unique branch
  • Auto-cleanup on session end (merge or discard)
  • Lock file management to prevent concurrent worktree access
  • Integration with Guardian routing (each Guardian gets isolated worktree)
  • CLI commands: arcanea-code worktree create|list|cleanup|merge

Architecture

arcanea-code worktree create --session agent-123 --base dev
  → Creates .git/worktrees/agent-123/
  → Checks out branch worktree/agent-123
  → Returns path for agent to work in

arcanea-code worktree merge --session agent-123
  → Merges worktree/agent-123 → dev
  → Cleans up worktree

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-systemGuardian/Luminor agent infrastructurepriority:highImportant, address soonworktreeGit worktree isolation

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions