claude-team-mcp 0.8.2__tar.gz → 0.9.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/.pebbles/events.jsonl +3 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/.pebbles/pebbles.db +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/CHANGELOG.md +27 -1
- claude_team_mcp-0.9.1/PKG-INFO +565 -0
- claude_team_mcp-0.9.1/README.md +534 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/pyproject.toml +1 -1
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/config.py +12 -3
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/config_cli.py +7 -0
- claude_team_mcp-0.9.1/src/claude_team_mcp/registry.py +817 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/server.py +75 -1
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/tools/__init__.py +2 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/tools/adopt_worker.py +4 -1
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/tools/close_workers.py +4 -1
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/tools/discover_workers.py +4 -1
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/tools/list_workers.py +34 -6
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/tools/list_worktrees.py +4 -1
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/tools/message_workers.py +6 -2
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/tools/poll_worker_changes.py +12 -2
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/tools/read_worker_logs.py +6 -2
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/tools/wait_idle_workers.py +8 -3
- claude_team_mcp-0.9.1/src/claude_team_mcp/tools/worker_events.py +279 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/test_config.py +46 -2
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/test_config_cli.py +36 -0
- claude_team_mcp-0.9.1/tests/test_poll_worker_changes.py +62 -0
- claude_team_mcp-0.9.1/tests/test_recover_from_events.py +705 -0
- claude_team_mcp-0.9.1/tests/test_recovered_session.py +313 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/test_registry.py +40 -0
- claude_team_mcp-0.9.1/tests/test_startup_recovery.py +413 -0
- claude_team_mcp-0.9.1/tests/test_worker_events.py +539 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/uv.lock +1 -1
- claude_team_mcp-0.8.2/PKG-INFO +0 -427
- claude_team_mcp-0.8.2/README.md +0 -396
- claude_team_mcp-0.8.2/src/claude_team_mcp/registry.py +0 -443
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/.claude/settings.json +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/.claude/settings.local.json +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/.claude-plugin/marketplace.json +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/.claude-plugin/plugin.json +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/.gitattributes +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/.gitignore +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/.mcp.json +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/.pebbles/.gitignore +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/.pebbles/config.json +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/AGENTS.md +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/CLAUDE.md +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/HAPPY_INTEGRATION_RESEARCH.md +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/Makefile +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/NOTES.md +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/commands/check-workers.md +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/commands/cleanup-worktrees.md +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/commands/merge-worker.md +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/commands/pr-worker.md +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/commands/spawn-workers.md +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/commands/team-summary.md +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/config/mcporter.json +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/docs/ISSUE_TRACKER_ABSTRACTION.md +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/docs/design/unified-worker-state.md +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/scripts/install-commands.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/scripts/team-status.sh +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/settings.json +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team/__init__.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team/events.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team/idle_detection.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team/poller.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/__init__.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/__main__.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/cli_backends/__init__.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/cli_backends/base.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/cli_backends/claude.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/cli_backends/codex.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/colors.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/formatting.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/idle_detection.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/issue_tracker/__init__.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/iterm_utils.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/names.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/profile.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/schemas/__init__.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/schemas/codex.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/session_state.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/subprocess_cache.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/terminal_backends/__init__.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/terminal_backends/base.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/terminal_backends/iterm.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/terminal_backends/tmux.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/tools/annotate_worker.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/tools/check_idle_workers.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/tools/examine_worker.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/tools/issue_tracker_help.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/tools/spawn_workers.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/utils/__init__.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/utils/constants.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/utils/errors.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/utils/worktree_detection.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/worker_prompt.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/src/claude_team_mcp/worktree.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/__init__.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/conftest.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/test_cli_backends.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/test_codex_schema.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/test_colors.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/test_events.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/test_formatting.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/test_idle_detection.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/test_idle_detection_module.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/test_issue_tracker.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/test_issue_tracker_integration.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/test_iterm_utils.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/test_names.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/test_poller.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/test_session_state.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/test_spawn_workers_defaults.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/test_terminal_backends.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/test_tmux_backend.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/test_worker_prompt.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/test_worktree.py +0 -0
- {claude_team_mcp-0.8.2 → claude_team_mcp-0.9.1}/tests/test_worktree_detection.py +0 -0
|
@@ -228,3 +228,6 @@
|
|
|
228
228
|
{"type":"create","timestamp":"2026-02-02T23:29:52.330658Z","issue_id":"cic-ebd","payload":{"description":"tmux_session_name_for_project() hashes the full project_path. Worktree paths produce unique hashes, creating one tmux session per worker instead of one per project. Fix: resolve worktree paths to main repo before hashing.","priority":"1","title":"tmux: worktree paths create separate sessions instead of sharing per-project session","type":"bug"}}
|
|
229
229
|
{"type":"status_update","timestamp":"2026-02-02T23:30:32.877924Z","issue_id":"cic-ebd","payload":{"status":"in_progress"}}
|
|
230
230
|
{"type":"close","timestamp":"2026-02-02T23:33:33.785116Z","issue_id":"cic-ebd","payload":{}}
|
|
231
|
+
{"type":"create","timestamp":"2026-02-04T22:18:18.544978Z","issue_id":"cic-c29","payload":{"description":"","priority":"2","title":"message_workers: wait_mode validation rejects None from MCP clients","type":"task"}}
|
|
232
|
+
{"type":"comment","timestamp":"2026-02-04T22:18:27.550553Z","issue_id":"cic-c29","payload":{"body":"When message_workers is called via MCP clients (e.g. mcporter) that send explicit null for omitted optional params, pydantic rejects it:\n\nError: Input should be a valid string [type=string_type, input_value=None, input_type=NoneType]\n\nThe type annotation is wait_mode: str = 'none' but needs to accept None.\n\nFix: Change to wait_mode: str | None = 'none' and add wait_mode = wait_mode or 'none' guard at the top of the function. Same for timeout: float = 600.0.\n\nFile: src/claude_team_mcp/tools/message_workers.py\nFunction: message_workers (line ~127)"}}
|
|
233
|
+
{"type":"update","timestamp":"2026-02-04T22:18:30.31878Z","issue_id":"cic-c29","payload":{"type":"bug"}}
|
|
Binary file
|
|
@@ -7,6 +7,26 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.9.1] - 2026-02-04
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **MCP tool optional param validation**: All 9 MCP tools now accept `null` for optional parameters with defaults. MCP clients (e.g. mcporter) that send explicit `null` for omitted params no longer trigger pydantic validation errors.
|
|
14
|
+
|
|
15
|
+
## [0.9.0] - 2026-02-03
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
- **Event log recovery**: On startup, the registry reconstructs worker state from `events.jsonl`. `list_workers` now shows all known workers (live + recovered) instead of returning empty after restart.
|
|
19
|
+
- `RecoveredSession` dataclass for restored workers (read-only, no terminal handle)
|
|
20
|
+
- `RecoveryReport` with counts of added/skipped/closed sessions
|
|
21
|
+
- Eager recovery at boot + lazy fallback in `list_workers`
|
|
22
|
+
- **`worker_events` MCP tool**: Query the event log programmatically with timestamp filters, summaries, stuck worker detection, and project filtering. Replaces shell-script parsing of `events.jsonl`.
|
|
23
|
+
- **`stale_threshold_minutes` config**: Configurable via `~/.claude-team/config.json` (`events.stale_threshold_minutes`, default: 10). `poll_worker_changes` reads from config when param not passed, tool param overrides.
|
|
24
|
+
- **`source` field in `list_workers`**: Distinguishes `"registry"` (live) vs `"event_log"` (recovered) workers.
|
|
25
|
+
- 98 new tests across 6 test files for recovery, worker_events, config, and poll_worker_changes.
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
- **README**: Comprehensive rewrite — documents tmux backend, config file, Codex support, `poll_worker_changes`, HTTP mode, correct worktree paths, updated architecture diagram.
|
|
29
|
+
|
|
10
30
|
## [0.8.2] - 2026-02-02
|
|
11
31
|
|
|
12
32
|
### Fixed
|
|
@@ -129,7 +149,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
129
149
|
- Worker monitoring and log reading
|
|
130
150
|
- Basic MCP server implementation
|
|
131
151
|
|
|
132
|
-
[Unreleased]: https://github.com/Martian-Engineering/claude-team/compare/v0.
|
|
152
|
+
[Unreleased]: https://github.com/Martian-Engineering/claude-team/compare/v0.9.0...HEAD
|
|
153
|
+
[0.9.0]: https://github.com/Martian-Engineering/claude-team/compare/v0.8.2...v0.9.0
|
|
154
|
+
[0.8.2]: https://github.com/Martian-Engineering/claude-team/compare/v0.8.0...v0.8.2
|
|
155
|
+
[0.8.0]: https://github.com/Martian-Engineering/claude-team/compare/v0.7.0...v0.8.0
|
|
156
|
+
[0.7.0]: https://github.com/Martian-Engineering/claude-team/compare/v0.6.1...v0.7.0
|
|
157
|
+
[0.6.1]: https://github.com/Martian-Engineering/claude-team/compare/v0.6.0...v0.6.1
|
|
158
|
+
[0.6.0]: https://github.com/Martian-Engineering/claude-team/compare/v0.5.0...v0.6.0
|
|
133
159
|
[0.5.0]: https://github.com/Martian-Engineering/claude-team/compare/v0.4.0...v0.5.0
|
|
134
160
|
[0.4.0]: https://github.com/Martian-Engineering/claude-team/compare/v0.3.2...v0.4.0
|
|
135
161
|
[0.3.2]: https://github.com/Martian-Engineering/claude-team/compare/v0.3.1...v0.3.2
|
|
@@ -0,0 +1,565 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: claude-team-mcp
|
|
3
|
+
Version: 0.9.1
|
|
4
|
+
Summary: MCP server for managing multiple Claude Code sessions via iTerm2
|
|
5
|
+
Project-URL: Homepage, https://github.com/Martian-Engineering/claude-team
|
|
6
|
+
Project-URL: Repository, https://github.com/Martian-Engineering/claude-team
|
|
7
|
+
Project-URL: Documentation, https://github.com/Martian-Engineering/claude-team#readme
|
|
8
|
+
Project-URL: Issues, https://github.com/Martian-Engineering/claude-team/issues
|
|
9
|
+
Project-URL: Changelog, https://github.com/Martian-Engineering/claude-team/releases
|
|
10
|
+
Author-email: Josh Lehman <josh@martianengineering.com>
|
|
11
|
+
Maintainer-email: Josh Lehman <josh@martianengineering.com>
|
|
12
|
+
License: MIT
|
|
13
|
+
Keywords: ai,anthropic,automation,claude,claude-code,iterm2,mcp,multi-agent,orchestration
|
|
14
|
+
Classifier: Development Status :: 3 - Alpha
|
|
15
|
+
Classifier: Environment :: MacOS X
|
|
16
|
+
Classifier: Intended Audience :: Developers
|
|
17
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
18
|
+
Classifier: Operating System :: MacOS
|
|
19
|
+
Classifier: Programming Language :: Python :: 3
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
+
Classifier: Topic :: System :: Distributed Computing
|
|
25
|
+
Classifier: Typing :: Typed
|
|
26
|
+
Requires-Python: >=3.11
|
|
27
|
+
Requires-Dist: iterm2>=2.7
|
|
28
|
+
Requires-Dist: mcp>=1.0.0
|
|
29
|
+
Requires-Dist: msgspec>=0.19.0
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
# Claude Team MCP Server
|
|
33
|
+
|
|
34
|
+
An MCP server that allows one Claude Code session to spawn and manage a team of other Claude Code (or Codex) sessions via terminal backends (tmux or iTerm2).
|
|
35
|
+
|
|
36
|
+
## Introduction
|
|
37
|
+
|
|
38
|
+
`claude-team` is an MCP server and a set of slash commands for allowing Claude Code to orchestrate a "team" of other Claude Code sessions. It uses terminal backends (tmux or iTerm2) to spawn new terminal sessions and run Claude Code within them.
|
|
39
|
+
|
|
40
|
+
### Why?
|
|
41
|
+
|
|
42
|
+
- **Parallelism:** Many development tasks can be logically parallelized, but managing that parallelism is difficult for humans with limited attention spans. Claude, meanwhile, is very effective at it.
|
|
43
|
+
- **Context management:** Offloading implementation to a worker gives the implementing agent a fresh context window (smarter), and keeps the manager's context free of implementation details.
|
|
44
|
+
- **Background work:** Sometimes you want to have Claude Code go research something or answer a question without blocking the main thread of work.
|
|
45
|
+
- **Visibility:** `claude-team` spawns real Claude Code sessions. You can watch them, interrupt and take control, or close them out.
|
|
46
|
+
|
|
47
|
+
But, *why not just use Claude Code sub-agents*, you ask? They're opaque -- they go off and do things and you, the user, cannot effectively monitor their work, interject, or continue a conversation with them. Using a full Claude Code session obviates this problem.
|
|
48
|
+
|
|
49
|
+
### Terminal Backends
|
|
50
|
+
|
|
51
|
+
`claude-team` supports two terminal backends:
|
|
52
|
+
|
|
53
|
+
| Backend | Platform | Status |
|
|
54
|
+
|---------|----------|--------|
|
|
55
|
+
| **tmux** | macOS, Linux | Primary. Auto-selected when running inside tmux. |
|
|
56
|
+
| **iTerm2** | macOS only | Fully supported. Requires Python API enabled. |
|
|
57
|
+
|
|
58
|
+
Backend selection order:
|
|
59
|
+
1. `CLAUDE_TEAM_TERMINAL_BACKEND` environment variable (`tmux` or `iterm`)
|
|
60
|
+
2. Config file setting (`terminal.backend`)
|
|
61
|
+
3. Auto-detect: if `TMUX` env var is set, use tmux; otherwise iTerm2
|
|
62
|
+
|
|
63
|
+
### Git Worktrees: Isolated Branches per Worker
|
|
64
|
+
|
|
65
|
+
A key feature of `claude-team` is **git worktree support**. When spawning workers with `use_worktree: true` (the default), each worker gets:
|
|
66
|
+
|
|
67
|
+
- **Its own working directory** - A git worktree at `{repo}/.worktrees/{name}/`
|
|
68
|
+
- **Its own branch** - Automatically created from the current HEAD
|
|
69
|
+
- **Shared repository history** - All worktrees share the same `.git` database, so commits are immediately visible across workers
|
|
70
|
+
|
|
71
|
+
Worktree naming depends on how workers are spawned:
|
|
72
|
+
- With a bead (issue tracker ID): `{repo}/.worktrees/{bead}-{annotation}/`
|
|
73
|
+
- Without: `{repo}/.worktrees/{worker-name}-{uuid}-{annotation}/`
|
|
74
|
+
|
|
75
|
+
The `.worktrees` directory is automatically added to `.gitignore`.
|
|
76
|
+
|
|
77
|
+
### Codex Support
|
|
78
|
+
|
|
79
|
+
Workers can run either Claude Code or OpenAI Codex. Set `agent_type: "codex"` in the worker config (or set the default in the config file) to spawn Codex workers instead of Claude Code workers.
|
|
80
|
+
|
|
81
|
+
## Features
|
|
82
|
+
|
|
83
|
+
- **Spawn Workers**: Create Claude Code or Codex sessions with multi-pane layouts
|
|
84
|
+
- **Terminal Backends**: tmux (cross-platform) and iTerm2 (macOS)
|
|
85
|
+
- **Git Worktrees**: Isolate each worker in its own branch and working directory
|
|
86
|
+
- **Send Messages**: Inject prompts into managed workers (single or broadcast)
|
|
87
|
+
- **Read Logs**: Retrieve conversation history from worker JSONL files
|
|
88
|
+
- **Monitor Status**: Check if workers are idle, processing, or waiting for input
|
|
89
|
+
- **Idle Detection**: Wait for workers to complete using stop-hook markers
|
|
90
|
+
- **Event Polling**: Track worker lifecycle events (started, completed, stuck)
|
|
91
|
+
- **Visual Identity**: Each worker gets a unique tab color and themed name (Marx Brothers, Beatles, etc.)
|
|
92
|
+
- **Session Recovery**: Discover and adopt orphaned sessions after MCP server restarts
|
|
93
|
+
- **HTTP Mode**: Run as a persistent service with streamable-http transport
|
|
94
|
+
- **Config File**: Centralized configuration at `~/.claude-team/config.json`
|
|
95
|
+
|
|
96
|
+
## Requirements
|
|
97
|
+
|
|
98
|
+
- Python 3.11+
|
|
99
|
+
- `uv` package manager
|
|
100
|
+
- **tmux backend**: tmux installed (macOS or Linux)
|
|
101
|
+
- **iTerm2 backend**: macOS with iTerm2 and Python API enabled (Preferences > General > Magic > Enable Python API)
|
|
102
|
+
- **Codex workers** (optional): OpenAI Codex CLI installed
|
|
103
|
+
|
|
104
|
+
## Installation
|
|
105
|
+
|
|
106
|
+
### As Claude Code Plugin (recommended)
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
# Add the Martian Engineering marketplace
|
|
110
|
+
/plugin marketplace add Martian-Engineering/claude-team
|
|
111
|
+
|
|
112
|
+
# Install the plugin
|
|
113
|
+
/plugin install claude-team@martian-engineering
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
This automatically configures the MCP server - no manual setup needed.
|
|
117
|
+
|
|
118
|
+
### From PyPI
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
uvx --from claude-team-mcp@latest claude-team
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### From Source
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
git clone https://github.com/Martian-Engineering/claude-team.git
|
|
128
|
+
cd claude-team
|
|
129
|
+
uv sync
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
## Configuration for Claude Code
|
|
133
|
+
|
|
134
|
+
Add to your Claude Code MCP settings. You can configure this at:
|
|
135
|
+
- **Global**: `~/.claude/settings.json`
|
|
136
|
+
- **Project**: `.claude/settings.json` in your project directory
|
|
137
|
+
|
|
138
|
+
### Using PyPI package
|
|
139
|
+
|
|
140
|
+
```json
|
|
141
|
+
{
|
|
142
|
+
"mcpServers": {
|
|
143
|
+
"claude-team": {
|
|
144
|
+
"command": "uvx",
|
|
145
|
+
"args": ["--from", "claude-team-mcp@latest", "claude-team"]
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Using local clone
|
|
152
|
+
|
|
153
|
+
```json
|
|
154
|
+
{
|
|
155
|
+
"mcpServers": {
|
|
156
|
+
"claude-team": {
|
|
157
|
+
"command": "uv",
|
|
158
|
+
"args": ["run", "--directory", "/path/to/claude-team", "python", "-m", "claude_team_mcp"]
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### Project-level with auto project path
|
|
165
|
+
|
|
166
|
+
For project-scoped `.mcp.json` files, use `CLAUDE_TEAM_PROJECT_DIR` so workers inherit the project path:
|
|
167
|
+
|
|
168
|
+
```json
|
|
169
|
+
{
|
|
170
|
+
"mcpServers": {
|
|
171
|
+
"claude-team": {
|
|
172
|
+
"command": "uvx",
|
|
173
|
+
"args": ["--from", "claude-team-mcp@latest", "claude-team"],
|
|
174
|
+
"env": { "CLAUDE_TEAM_PROJECT_DIR": "${PWD}" }
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
After adding the configuration, restart Claude Code for it to take effect.
|
|
181
|
+
|
|
182
|
+
## Config File
|
|
183
|
+
|
|
184
|
+
`claude-team` reads configuration from `~/.claude-team/config.json`. Manage it with the CLI:
|
|
185
|
+
|
|
186
|
+
```bash
|
|
187
|
+
claude-team config init # Create default config
|
|
188
|
+
claude-team config init --force # Overwrite existing config
|
|
189
|
+
claude-team config show # Show effective config (file + env overrides)
|
|
190
|
+
claude-team config get <key> # Get value by dotted path (e.g. defaults.layout)
|
|
191
|
+
claude-team config set <key> <value> # Set and persist a value
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Config Schema
|
|
195
|
+
|
|
196
|
+
```json
|
|
197
|
+
{
|
|
198
|
+
"version": 1,
|
|
199
|
+
"commands": {
|
|
200
|
+
"claude": null,
|
|
201
|
+
"codex": null
|
|
202
|
+
},
|
|
203
|
+
"defaults": {
|
|
204
|
+
"agent_type": "claude",
|
|
205
|
+
"skip_permissions": false,
|
|
206
|
+
"use_worktree": true,
|
|
207
|
+
"layout": "auto"
|
|
208
|
+
},
|
|
209
|
+
"terminal": {
|
|
210
|
+
"backend": null
|
|
211
|
+
},
|
|
212
|
+
"events": {
|
|
213
|
+
"max_size_mb": 1,
|
|
214
|
+
"recent_hours": 24
|
|
215
|
+
},
|
|
216
|
+
"issue_tracker": {
|
|
217
|
+
"override": null
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
| Section | Key | Description |
|
|
223
|
+
|---------|-----|-------------|
|
|
224
|
+
| `commands.claude` | string | Override Claude CLI command (e.g. `"happy"`) |
|
|
225
|
+
| `commands.codex` | string | Override Codex CLI command (e.g. `"happy codex"`) |
|
|
226
|
+
| `defaults.agent_type` | `"claude"` or `"codex"` | Default agent type for new workers |
|
|
227
|
+
| `defaults.skip_permissions` | bool | Default `--dangerously-skip-permissions` flag |
|
|
228
|
+
| `defaults.use_worktree` | bool | Create git worktrees by default |
|
|
229
|
+
| `defaults.layout` | `"auto"` or `"new"` | Default layout mode for spawn_workers |
|
|
230
|
+
| `terminal.backend` | `"tmux"` or `"iterm"` | Terminal backend override (null = auto-detect) |
|
|
231
|
+
| `events.max_size_mb` | int | Max event log file size before rotation |
|
|
232
|
+
| `events.recent_hours` | int | Hours of events to retain |
|
|
233
|
+
| `issue_tracker.override` | `"beads"` or `"pebbles"` | Force a specific issue tracker |
|
|
234
|
+
|
|
235
|
+
## Environment Variables
|
|
236
|
+
|
|
237
|
+
| Variable | Default | Description |
|
|
238
|
+
|----------|---------|-------------|
|
|
239
|
+
| `CLAUDE_TEAM_TERMINAL_BACKEND` | (auto-detect) | Force terminal backend: `tmux` or `iterm`. Highest precedence. |
|
|
240
|
+
| `CLAUDE_TEAM_PROJECT_DIR` | (none) | Enables `"project_path": "auto"` in worker configs. |
|
|
241
|
+
| `CLAUDE_TEAM_COMMAND` | `claude` | Override the CLI command for Claude Code workers. |
|
|
242
|
+
| `CLAUDE_TEAM_CODEX_COMMAND` | `codex` | Override the CLI command for Codex workers. |
|
|
243
|
+
|
|
244
|
+
## MCP Tools
|
|
245
|
+
|
|
246
|
+
### Worker Management
|
|
247
|
+
|
|
248
|
+
| Tool | Description |
|
|
249
|
+
|------|-------------|
|
|
250
|
+
| `spawn_workers` | Create workers with multi-pane layouts. Supports Claude Code and Codex agents. |
|
|
251
|
+
| `list_workers` | List all managed workers with status. Filter by status or project. |
|
|
252
|
+
| `examine_worker` | Get detailed worker status including conversation stats and last response preview. |
|
|
253
|
+
| `close_workers` | Gracefully terminate one or more workers. Worktree branches are preserved. |
|
|
254
|
+
| `discover_workers` | Find existing Claude Code/Codex sessions running in tmux or iTerm2. |
|
|
255
|
+
| `adopt_worker` | Import a discovered session into the managed registry. |
|
|
256
|
+
|
|
257
|
+
### Communication
|
|
258
|
+
|
|
259
|
+
| Tool | Description |
|
|
260
|
+
|------|-------------|
|
|
261
|
+
| `message_workers` | Send a message to one or more workers. Supports wait modes: `none`, `any`, `all`. |
|
|
262
|
+
| `read_worker_logs` | Get paginated conversation history from a worker's JSONL file. |
|
|
263
|
+
| `annotate_worker` | Add a coordinator note to a worker (visible in `list_workers` output). |
|
|
264
|
+
|
|
265
|
+
### Monitoring
|
|
266
|
+
|
|
267
|
+
| Tool | Description |
|
|
268
|
+
|------|-------------|
|
|
269
|
+
| `check_idle_workers` | Quick non-blocking check if workers are idle. |
|
|
270
|
+
| `wait_idle_workers` | Block until workers are idle. Modes: `all` (fan-out/fan-in) or `any` (pipeline). |
|
|
271
|
+
| `poll_worker_changes` | Read worker event log for started/completed/stuck workers since a timestamp. |
|
|
272
|
+
|
|
273
|
+
### Utilities
|
|
274
|
+
|
|
275
|
+
| Tool | Description |
|
|
276
|
+
|------|-------------|
|
|
277
|
+
| `list_worktrees` | List git worktrees created by claude-team for a repository. Supports orphan cleanup. |
|
|
278
|
+
| `issue_tracker_help` | Quick reference for the detected issue tracker (Beads or Pebbles). |
|
|
279
|
+
|
|
280
|
+
### Worker Identification
|
|
281
|
+
|
|
282
|
+
Workers can be referenced by any of three identifiers:
|
|
283
|
+
- **Internal ID**: Short hex string (e.g., `3962c5c4`)
|
|
284
|
+
- **Terminal ID**: Prefixed terminal session ID (e.g., `iterm:UUID` or `tmux:%1`)
|
|
285
|
+
- **Worker name**: Human-friendly name (e.g., `Groucho`, `Aragorn`)
|
|
286
|
+
|
|
287
|
+
All tools accept any of these formats.
|
|
288
|
+
|
|
289
|
+
### Tool Details
|
|
290
|
+
|
|
291
|
+
#### spawn_workers
|
|
292
|
+
|
|
293
|
+
```
|
|
294
|
+
WorkerConfig fields:
|
|
295
|
+
project_path: str - Required. Explicit path or "auto" (uses CLAUDE_TEAM_PROJECT_DIR)
|
|
296
|
+
agent_type: str - "claude" (default) or "codex"
|
|
297
|
+
name: str - Optional worker name override (auto-picked from themed sets if omitted)
|
|
298
|
+
annotation: str - Task description (shown in badge, used in branch names)
|
|
299
|
+
bead: str - Issue tracker ID (for badge, branch naming, and workflow instructions)
|
|
300
|
+
prompt: str - Additional instructions (combined with standard worker prompt)
|
|
301
|
+
skip_permissions: bool - Start with --dangerously-skip-permissions
|
|
302
|
+
use_worktree: bool - Create isolated git worktree (default: true)
|
|
303
|
+
worktree: WorktreeConfig - Optional: { branch: str, base: str } for explicit branch/base
|
|
304
|
+
|
|
305
|
+
Top-level arguments:
|
|
306
|
+
workers: list[WorkerConfig] - 1-4 worker configurations
|
|
307
|
+
layout: str - "auto" (reuse windows) or "new" (fresh window)
|
|
308
|
+
|
|
309
|
+
Returns:
|
|
310
|
+
sessions, layout, count, coordinator_guidance
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
Worker assignment is determined by `bead` and/or `prompt`:
|
|
314
|
+
- **bead only**: Worker follows issue tracker workflow (mark in_progress, implement, close, commit)
|
|
315
|
+
- **bead + prompt**: Issue tracker workflow plus additional custom instructions
|
|
316
|
+
- **prompt only**: Custom task with no issue tracking
|
|
317
|
+
- **neither**: Worker spawns idle, waiting for a message
|
|
318
|
+
|
|
319
|
+
#### message_workers
|
|
320
|
+
|
|
321
|
+
```
|
|
322
|
+
Arguments:
|
|
323
|
+
session_ids: list[str] - Worker IDs to message (accepts any identifier format)
|
|
324
|
+
message: str - The prompt to send
|
|
325
|
+
wait_mode: str - "none" (default), "any", or "all"
|
|
326
|
+
timeout: float - Max seconds to wait (default: 600)
|
|
327
|
+
|
|
328
|
+
Returns:
|
|
329
|
+
success, session_ids, results, [idle_session_ids, all_idle, timed_out]
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
#### wait_idle_workers
|
|
333
|
+
|
|
334
|
+
```
|
|
335
|
+
Arguments:
|
|
336
|
+
session_ids: list[str] - Worker IDs to wait on
|
|
337
|
+
mode: str - "all" (default) or "any"
|
|
338
|
+
timeout: float - Max seconds to wait (default: 600)
|
|
339
|
+
poll_interval: float - Seconds between checks (default: 2)
|
|
340
|
+
|
|
341
|
+
Returns:
|
|
342
|
+
session_ids, idle_session_ids, all_idle, waiting_on, mode, waited_seconds, timed_out
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
#### poll_worker_changes
|
|
346
|
+
|
|
347
|
+
```
|
|
348
|
+
Arguments:
|
|
349
|
+
since: str - ISO timestamp to filter events from (or null for latest)
|
|
350
|
+
stale_threshold_minutes: int - Minutes without activity before marking stuck (default: 20)
|
|
351
|
+
include_snapshots: bool - Include periodic snapshot events (default: false)
|
|
352
|
+
|
|
353
|
+
Returns:
|
|
354
|
+
events, summary (started/completed/stuck), active_count, idle_count, poll_ts
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
## HTTP Server Mode
|
|
358
|
+
|
|
359
|
+
Run `claude-team` as a persistent HTTP service instead of stdio:
|
|
360
|
+
|
|
361
|
+
```bash
|
|
362
|
+
claude-team --http # Default port 8766
|
|
363
|
+
claude-team --http --port 9000 # Custom port
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
HTTP mode enables:
|
|
367
|
+
- **Streamable HTTP transport** for MCP communication
|
|
368
|
+
- **Worker poller** that periodically snapshots worker state and emits lifecycle events
|
|
369
|
+
- **MCP Resources** for read-only session access:
|
|
370
|
+
- `sessions://list` - List all managed sessions
|
|
371
|
+
- `sessions://{session_id}/status` - Detailed session status
|
|
372
|
+
- `sessions://{session_id}/screen` - Terminal screen content
|
|
373
|
+
|
|
374
|
+
## Slash Commands
|
|
375
|
+
|
|
376
|
+
Install slash commands for common workflows:
|
|
377
|
+
|
|
378
|
+
```bash
|
|
379
|
+
make install-commands
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
| Command | Description |
|
|
383
|
+
|---------|-------------|
|
|
384
|
+
| `/spawn-workers` | Analyze tasks, create worktrees, and spawn workers with appropriate prompts |
|
|
385
|
+
| `/check-workers` | Generate a status report for all active workers |
|
|
386
|
+
| `/merge-worker` | Directly merge a worker's branch back to parent (for internal changes) |
|
|
387
|
+
| `/pr-worker` | Create a pull request from a worker's branch |
|
|
388
|
+
| `/team-summary` | Generate end-of-session summary of all worker activity |
|
|
389
|
+
| `/cleanup-worktrees` | Remove worktrees for merged branches |
|
|
390
|
+
|
|
391
|
+
## Issue Tracker Support
|
|
392
|
+
|
|
393
|
+
`claude-team` supports both Pebbles (`pb`) and Beads (`bd --no-db`).
|
|
394
|
+
The tracker is auto-detected by marker directories in the project root:
|
|
395
|
+
|
|
396
|
+
- `.pebbles` -> Pebbles
|
|
397
|
+
- `.beads` -> Beads
|
|
398
|
+
|
|
399
|
+
If both markers exist, Pebbles is selected by default. This can be overridden in the config file with `issue_tracker.override`. Worker prompts and coordination guidance use the detected tracker commands.
|
|
400
|
+
|
|
401
|
+
## Usage Patterns
|
|
402
|
+
|
|
403
|
+
### Basic: Spawn and Message
|
|
404
|
+
|
|
405
|
+
From your Claude Code session, spawn workers and send them tasks:
|
|
406
|
+
|
|
407
|
+
```
|
|
408
|
+
"Spawn two workers for frontend and backend work"
|
|
409
|
+
-> Uses spawn_workers with two WorkerConfigs pointing at different project paths
|
|
410
|
+
-> Returns workers named e.g. "Simon" and "Garfunkel"
|
|
411
|
+
|
|
412
|
+
"Send Simon the message: Review the React components"
|
|
413
|
+
-> Uses message_workers with session_ids=["Simon"]
|
|
414
|
+
|
|
415
|
+
"Check on Garfunkel's progress"
|
|
416
|
+
-> Uses examine_worker with session_id="Garfunkel"
|
|
417
|
+
```
|
|
418
|
+
|
|
419
|
+
### Parallel Work with Worktrees
|
|
420
|
+
|
|
421
|
+
Spawn workers in isolated branches for parallel development:
|
|
422
|
+
|
|
423
|
+
```
|
|
424
|
+
"Spawn three workers with worktrees to work on different features"
|
|
425
|
+
-> Uses spawn_workers with use_worktree=true (default)
|
|
426
|
+
-> Creates worktrees at {repo}/.worktrees/
|
|
427
|
+
-> Each worker gets their own branch
|
|
428
|
+
|
|
429
|
+
"Message all workers with their tasks, then wait for completion"
|
|
430
|
+
-> Uses message_workers with wait_mode="all"
|
|
431
|
+
|
|
432
|
+
"Create PRs for each worker's branch"
|
|
433
|
+
-> Uses /pr-worker for each completed worker
|
|
434
|
+
```
|
|
435
|
+
|
|
436
|
+
### Issue Tracker Integration
|
|
437
|
+
|
|
438
|
+
Assign workers to issue tracker items for structured workflows:
|
|
439
|
+
|
|
440
|
+
```
|
|
441
|
+
"Spawn a worker for issue cic-123"
|
|
442
|
+
-> spawn_workers with bead="cic-123", annotation="Fix auth bug"
|
|
443
|
+
-> Worker automatically marks issue in_progress, implements, closes, and commits
|
|
444
|
+
|
|
445
|
+
"Spawn workers for all ready issues"
|
|
446
|
+
-> Check `bd ready` or `pb ready` for available work
|
|
447
|
+
-> Spawn one worker per issue with bead assignments
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
### Coordinated Workflow
|
|
451
|
+
|
|
452
|
+
Use the manager to coordinate between workers:
|
|
453
|
+
|
|
454
|
+
```
|
|
455
|
+
"Spawn a backend worker to create a new API endpoint"
|
|
456
|
+
-> Wait for completion with wait_idle_workers
|
|
457
|
+
|
|
458
|
+
"Now spawn a frontend worker and tell it about the new endpoint"
|
|
459
|
+
-> Pass context from read_worker_logs of the backend worker
|
|
460
|
+
|
|
461
|
+
"Spawn a test worker to write integration tests"
|
|
462
|
+
-> Coordinate based on both previous workers' output
|
|
463
|
+
```
|
|
464
|
+
|
|
465
|
+
## Architecture
|
|
466
|
+
|
|
467
|
+
```
|
|
468
|
+
┌──────────────────────────────────────────────────────────────────┐
|
|
469
|
+
│ Manager Claude Code Session │
|
|
470
|
+
│ (has claude-team MCP server) │
|
|
471
|
+
├──────────────────────────────────────────────────────────────────┤
|
|
472
|
+
│ MCP Tools │
|
|
473
|
+
│ spawn_workers | message_workers | wait_idle_workers | etc. │
|
|
474
|
+
└───────────────────────────┬──────────────────────────────────────┘
|
|
475
|
+
│
|
|
476
|
+
┌────────────┼────────────┐
|
|
477
|
+
▼ ▼ ▼
|
|
478
|
+
┌──────────┐ ┌──────────┐ ┌──────────┐
|
|
479
|
+
│ Groucho │ │ Harpo │ │ Chico │
|
|
480
|
+
│ (tmux) │ │ (tmux) │ │ (tmux) │
|
|
481
|
+
│ │ │ │ │ │
|
|
482
|
+
│ Claude │ │ Claude │ │ Codex │
|
|
483
|
+
│ Code │ │ Code │ │ │
|
|
484
|
+
│ │ │ │ │ │
|
|
485
|
+
│ worktree │ │ worktree │ │ worktree │
|
|
486
|
+
│ .worktrees/ │ .worktrees/ │ .worktrees/ │
|
|
487
|
+
└──────────┘ └──────────┘ └──────────┘
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
The manager maintains:
|
|
491
|
+
- **Session Registry**: Maps worker IDs/names to terminal sessions
|
|
492
|
+
- **Terminal Backend**: Persistent connection to tmux or iTerm2 for terminal control
|
|
493
|
+
- **JSONL Monitoring**: Reads Claude/Codex session files for conversation state and idle detection
|
|
494
|
+
- **Worktree Tracking**: Manages git worktrees for isolated worker branches
|
|
495
|
+
- **Event Log**: Records worker lifecycle events for polling and diagnostics
|
|
496
|
+
|
|
497
|
+
## Development
|
|
498
|
+
|
|
499
|
+
```bash
|
|
500
|
+
# Sync dependencies (with dev tools)
|
|
501
|
+
uv sync --group dev
|
|
502
|
+
|
|
503
|
+
# Run tests
|
|
504
|
+
uv run pytest
|
|
505
|
+
|
|
506
|
+
# Run the server directly (for debugging)
|
|
507
|
+
uv run python -m claude_team_mcp
|
|
508
|
+
|
|
509
|
+
# Run in HTTP mode
|
|
510
|
+
uv run python -m claude_team_mcp --http
|
|
511
|
+
|
|
512
|
+
# Install slash commands
|
|
513
|
+
make install-commands
|
|
514
|
+
```
|
|
515
|
+
|
|
516
|
+
## Troubleshooting
|
|
517
|
+
|
|
518
|
+
### tmux backend
|
|
519
|
+
|
|
520
|
+
**"tmux not found"**
|
|
521
|
+
- Install tmux: `brew install tmux` (macOS) or `apt install tmux` (Linux)
|
|
522
|
+
- Ensure tmux is in your PATH
|
|
523
|
+
|
|
524
|
+
**Workers not detected after restart**
|
|
525
|
+
- Use `discover_workers` to find orphaned sessions
|
|
526
|
+
- Use `adopt_worker` to re-register them
|
|
527
|
+
- Sessions are matched via markers written to JSONL files
|
|
528
|
+
|
|
529
|
+
### iTerm2 backend
|
|
530
|
+
|
|
531
|
+
**"Could not connect to iTerm2"**
|
|
532
|
+
- Make sure iTerm2 is running
|
|
533
|
+
- Enable: iTerm2 > Preferences > General > Magic > Enable Python API
|
|
534
|
+
|
|
535
|
+
### General
|
|
536
|
+
|
|
537
|
+
**"Session not found"**
|
|
538
|
+
- The worker may have been closed externally
|
|
539
|
+
- Use `list_workers` to see active workers
|
|
540
|
+
- Workers can be referenced by ID, terminal ID, or name
|
|
541
|
+
|
|
542
|
+
**"No JSONL session file found"**
|
|
543
|
+
- Claude Code may still be starting up
|
|
544
|
+
- Wait a few seconds and try again
|
|
545
|
+
- Check that Claude Code is actually running in the worker pane
|
|
546
|
+
|
|
547
|
+
**Worktree issues**
|
|
548
|
+
- Use `list_worktrees` to see worktrees for a repository
|
|
549
|
+
- Orphaned worktrees can be cleaned up with `list_worktrees` + `remove_orphans=true`
|
|
550
|
+
- Worktrees are stored at `{repo}/.worktrees/`
|
|
551
|
+
|
|
552
|
+
## Upgrading
|
|
553
|
+
|
|
554
|
+
After a new version is published to PyPI, you may need to force-refresh the cached version:
|
|
555
|
+
|
|
556
|
+
```bash
|
|
557
|
+
uv cache clean --force
|
|
558
|
+
uv tool install --force --refresh claude-team-mcp
|
|
559
|
+
```
|
|
560
|
+
|
|
561
|
+
This is necessary because `uvx` aggressively caches tool environments.
|
|
562
|
+
|
|
563
|
+
## License
|
|
564
|
+
|
|
565
|
+
MIT
|