Skip to content

ceedaragents/claude-code-exploring

Repository files navigation

atcyrus.com | GitHub: ceedaragents/cyrus

Want access to an advanced Claude Code agent built into Linear that you can run anywhere? Try Cyrus.


Claude Code Teammate/Swarm Feature Analysis

This folder contains comprehensive documentation of the Claude Code Teammate/Swarm multi-agent coordination feature discovered in the Claude Agent SDK v0.1.72.

Overview

The Teammate tool is a partially implemented feature in the Claude Agent SDK that would enable multi-agent coordination through:

  • Spawning multiple AI teammates in separate tmux panes
  • Team-based task distribution and coordination
  • Inter-agent messaging via a file-based mailbox system
  • Git worktree isolation for parallel development
  • Hierarchical delegation with the "delegate" permission mode

Current Status: ~60% complete - Infrastructure exists, core implementation missing.

Documentation Structure

  1. 01-permission-modes.md - All 6 permission modes including "delegate" and "dontAsk"
  2. 02-teammate-tool-schema.md - Complete tool schema with 13 operations
  3. 03-task-management.md - Task tools and enablement process
  4. 04-mailbox-system.md - Complete inter-agent messaging system
  5. 05-architecture.md - Full feature architecture and design
  6. 06-what-exists.md - Detailed component inventory
  7. 07-file-locations.md - Key code locations with line numbers
  8. 08-modifications-made.md - Changes we made to enable task tools

Source Code Reference

The source code analyzed is available at:

A copy of the relevant source sections is included in cli.js.backup in this directory.

Key Findings

What Works

  • ✅ Task management tools (TaskCreate, TaskGet, TaskUpdate, TaskList) - enabled by us
  • ✅ Complete mailbox system with file locking and message persistence
  • ✅ Team file system (~/.claude/teams/)
  • ✅ Delegate permission mode that filters to coordination tools only
  • ✅ Complete tool schema (qgZ) with 13 operations defined
  • ✅ Helper functions for team I/O operations

What's Missing

  • ❌ Teammate tool object (schema is orphaned - defined but never instantiated)
  • ❌ Spawn implementation logic
  • ❌ tmux pane creation code
  • ❌ Git worktree setup automation
  • ❌ UI for teammate count selection (removed from code)
  • ❌ Integration between schema and tool registration system

Quick Start

To enable the task management tools we activated:

  1. Edit /Users/x/.npm-global/lib/node_modules/@anthropic-ai/claude-agent-sdk/cli.js
  2. Find line 789: function nU(){return!1}
  3. Change to: function nU(){return!0}
  4. Run: claude --permission-mode delegate (requires tmux)

Note: This only enables task tools, NOT the Teammate tool (which requires additional implementation).

Investigation Timeline

This analysis was conducted through systematic code exploration:

  1. Started with permission mode investigation
  2. Discovered undocumented "delegate" mode
  3. Found Teammate tool schema and prerequisites
  4. Enabled task management system
  5. Mapped complete mailbox infrastructure
  6. Identified missing implementation components

Contributors

Analysis conducted via Claude Code deep investigation session, December 2025.

About

surfacing fun insights from the Claude Code SDK

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors