claude-coordinator 0.1.0__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.
Files changed (82) hide show
  1. claude_coordinator-0.1.0/LICENSE +21 -0
  2. claude_coordinator-0.1.0/PKG-INFO +394 -0
  3. claude_coordinator-0.1.0/README.md +366 -0
  4. claude_coordinator-0.1.0/claude_coordinator.egg-info/PKG-INFO +394 -0
  5. claude_coordinator-0.1.0/claude_coordinator.egg-info/SOURCES.txt +80 -0
  6. claude_coordinator-0.1.0/claude_coordinator.egg-info/dependency_links.txt +1 -0
  7. claude_coordinator-0.1.0/claude_coordinator.egg-info/entry_points.txt +2 -0
  8. claude_coordinator-0.1.0/claude_coordinator.egg-info/requires.txt +9 -0
  9. claude_coordinator-0.1.0/claude_coordinator.egg-info/top_level.txt +1 -0
  10. claude_coordinator-0.1.0/coord/__init__.py +3 -0
  11. claude_coordinator-0.1.0/coord/agent.py +716 -0
  12. claude_coordinator-0.1.0/coord/agent_app.py +134 -0
  13. claude_coordinator-0.1.0/coord/brain.py +248 -0
  14. claude_coordinator-0.1.0/coord/claim.py +158 -0
  15. claude_coordinator-0.1.0/coord/cli.py +2507 -0
  16. claude_coordinator-0.1.0/coord/comments.py +213 -0
  17. claude_coordinator-0.1.0/coord/config.py +541 -0
  18. claude_coordinator-0.1.0/coord/dashboard/__init__.py +0 -0
  19. claude_coordinator-0.1.0/coord/dashboard/server.py +238 -0
  20. claude_coordinator-0.1.0/coord/deps.py +115 -0
  21. claude_coordinator-0.1.0/coord/dispatch.py +219 -0
  22. claude_coordinator-0.1.0/coord/events.py +381 -0
  23. claude_coordinator-0.1.0/coord/freshness.py +139 -0
  24. claude_coordinator-0.1.0/coord/github_ops.py +171 -0
  25. claude_coordinator-0.1.0/coord/hooks.py +92 -0
  26. claude_coordinator-0.1.0/coord/merge_queue.py +237 -0
  27. claude_coordinator-0.1.0/coord/models.py +215 -0
  28. claude_coordinator-0.1.0/coord/network.py +157 -0
  29. claude_coordinator-0.1.0/coord/notify.py +260 -0
  30. claude_coordinator-0.1.0/coord/progress.py +110 -0
  31. claude_coordinator-0.1.0/coord/reconcile.py +210 -0
  32. claude_coordinator-0.1.0/coord/review.py +421 -0
  33. claude_coordinator-0.1.0/coord/smoke.py +373 -0
  34. claude_coordinator-0.1.0/coord/state.py +250 -0
  35. claude_coordinator-0.1.0/coord/worker_events.py +604 -0
  36. claude_coordinator-0.1.0/pyproject.toml +49 -0
  37. claude_coordinator-0.1.0/setup.cfg +4 -0
  38. claude_coordinator-0.1.0/tests/test_agent.py +196 -0
  39. claude_coordinator-0.1.0/tests/test_agent_app.py +192 -0
  40. claude_coordinator-0.1.0/tests/test_agent_branch_capture.py +126 -0
  41. claude_coordinator-0.1.0/tests/test_agent_repos_and_pull.py +226 -0
  42. claude_coordinator-0.1.0/tests/test_board_state.py +528 -0
  43. claude_coordinator-0.1.0/tests/test_brain.py +225 -0
  44. claude_coordinator-0.1.0/tests/test_claim.py +278 -0
  45. claude_coordinator-0.1.0/tests/test_cli_assign.py +243 -0
  46. claude_coordinator-0.1.0/tests/test_cli_merge.py +192 -0
  47. claude_coordinator-0.1.0/tests/test_cli_network.py +217 -0
  48. claude_coordinator-0.1.0/tests/test_cli_wait.py +261 -0
  49. claude_coordinator-0.1.0/tests/test_comments.py +157 -0
  50. claude_coordinator-0.1.0/tests/test_config.py +188 -0
  51. claude_coordinator-0.1.0/tests/test_coord_test.py +218 -0
  52. claude_coordinator-0.1.0/tests/test_dashboard.py +309 -0
  53. claude_coordinator-0.1.0/tests/test_deps.py +300 -0
  54. claude_coordinator-0.1.0/tests/test_dispatch.py +103 -0
  55. claude_coordinator-0.1.0/tests/test_done_housekeeping.py +393 -0
  56. claude_coordinator-0.1.0/tests/test_errors.py +189 -0
  57. claude_coordinator-0.1.0/tests/test_events.py +439 -0
  58. claude_coordinator-0.1.0/tests/test_freshness.py +135 -0
  59. claude_coordinator-0.1.0/tests/test_handoff.py +254 -0
  60. claude_coordinator-0.1.0/tests/test_hooks.py +264 -0
  61. claude_coordinator-0.1.0/tests/test_init.py +665 -0
  62. claude_coordinator-0.1.0/tests/test_integration.py +364 -0
  63. claude_coordinator-0.1.0/tests/test_merge_queue.py +224 -0
  64. claude_coordinator-0.1.0/tests/test_model_tiering.py +625 -0
  65. claude_coordinator-0.1.0/tests/test_models.py +106 -0
  66. claude_coordinator-0.1.0/tests/test_network.py +164 -0
  67. claude_coordinator-0.1.0/tests/test_notify.py +149 -0
  68. claude_coordinator-0.1.0/tests/test_operational_defaults.py +167 -0
  69. claude_coordinator-0.1.0/tests/test_progress.py +310 -0
  70. claude_coordinator-0.1.0/tests/test_reconcile_branch.py +65 -0
  71. claude_coordinator-0.1.0/tests/test_retry.py +187 -0
  72. claude_coordinator-0.1.0/tests/test_review.py +444 -0
  73. claude_coordinator-0.1.0/tests/test_session.py +195 -0
  74. claude_coordinator-0.1.0/tests/test_smoke.py +428 -0
  75. claude_coordinator-0.1.0/tests/test_smoke_workflow.py +579 -0
  76. claude_coordinator-0.1.0/tests/test_split.py +275 -0
  77. claude_coordinator-0.1.0/tests/test_state.py +74 -0
  78. claude_coordinator-0.1.0/tests/test_stuck.py +602 -0
  79. claude_coordinator-0.1.0/tests/test_watch.py +425 -0
  80. claude_coordinator-0.1.0/tests/test_worker_events.py +457 -0
  81. claude_coordinator-0.1.0/tests/test_worker_safety.py +311 -0
  82. claude_coordinator-0.1.0/tests/test_worktree.py +413 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 John Donaghy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,394 @@
1
+ Metadata-Version: 2.4
2
+ Name: claude-coordinator
3
+ Version: 0.1.0
4
+ Summary: Coordinate Claude Code workers across multiple machines and repos.
5
+ Author-email: John Donaghy <johnfdonaghy@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/JDonaghy/claude-coordinator
8
+ Project-URL: Repository, https://github.com/JDonaghy/claude-coordinator
9
+ Project-URL: Issues, https://github.com/JDonaghy/claude-coordinator/issues
10
+ Keywords: claude,claude-code,multi-agent,coordinator,automation
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Topic :: Software Development :: Build Tools
16
+ Requires-Python: >=3.12
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: click>=8.1
20
+ Requires-Dist: pyyaml>=6.0
21
+ Requires-Dist: httpx>=0.27
22
+ Requires-Dist: starlette>=0.37
23
+ Requires-Dist: uvicorn>=0.30
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest>=8.0; extra == "dev"
26
+ Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
27
+ Dynamic: license-file
28
+
29
+ # claude-coordinator
30
+
31
+ Coordinate multiple Claude Code workers from a single terminal.
32
+
33
+ Claude Code is great for one task at a time. But real projects have dozens of issues. This tool lets you run multiple Claude Code workers in parallel — even on a single machine — with a coordinator that picks the right model, avoids file conflicts, and handles the full issue-to-PR pipeline.
34
+
35
+ ## The Problem
36
+
37
+ Running one Claude Code session at a time is a bottleneck. You context-switch between issues, lose session state, and can't parallelize. Complex issues get one shot; if the session dies mid-flight, you start over. There's no audit trail, no conflict detection, and no way to see what happened last Thursday.
38
+
39
+ ## The Solution
40
+
41
+ One config file describes your repos and machines. Workers run in isolated git worktrees so they never step on each other. The coordinator tracks what's in flight, prevents conflicts, routes by capability, and sequences PRs.
42
+
43
+ Works on **one machine** with multiple worktrees. Add more machines over Tailscale when you need true parallelism.
44
+
45
+ ```
46
+ You (coordinator)
47
+
48
+ ├── coord assign → Agent Server (localhost:7433)
49
+ │ ├── Worker 1 (worktree A) → claude -p --model sonnet
50
+ │ ├── Worker 2 (worktree B) → claude -p --model haiku
51
+ │ └── Worker 3 (worktree C) → claude -p --model opus
52
+
53
+ └── coord watch/test/pr/fix
54
+ ```
55
+
56
+ ## Quick Demo
57
+
58
+ ```bash
59
+ pip install -e .
60
+ coord init # interactive setup: detects repos, writes coordinator.yml
61
+ coord agent & # start the agent server (port 7433)
62
+
63
+ coord assign laptop myrepo 42 --model sonnet --briefing "Fix the auth bug"
64
+ # → laptop → myrepo #42: Fix the auth middleware timeout
65
+ # → model: claude-sonnet-4-6
66
+ # → dispatched (assignment a1b2c3)
67
+
68
+ coord watch a1b2c3 # filtered live output (stream-json events)
69
+ # → [init] claude-sonnet-4-6 session a1b2
70
+ # → [tool] Read auth/middleware.py
71
+ # → [tool] Edit auth/middleware.py
72
+ # → [result] completed in 3m, 6 turns, $0.45
73
+
74
+ coord pr a1b2c3 # dispatch a worker to create the PR
75
+ # → PR worker dispatched (assignment d4e5f6)
76
+ # → branch: issue-42-fix-auth-middleware → main
77
+ # → Review dispatched (assignment g7h8i9)
78
+ # → reviewer: laptop
79
+ ```
80
+
81
+ ## Quick Start
82
+
83
+ ### 1. Install
84
+
85
+ ```bash
86
+ git clone https://github.com/JDonaghy/claude-coordinator.git ~/src/claude-coordinator
87
+ cd ~/src/claude-coordinator
88
+ pip install -e .
89
+ ```
90
+
91
+ ### 2. Configure
92
+
93
+ ```bash
94
+ coord init # interactive wizard: detects repos in cwd and ~/src/, writes coordinator.yml
95
+ coord config # verify it parsed cleanly
96
+ ```
97
+
98
+ Or copy `coordinator.example.yml` and edit it by hand. `coordinator.yml` is gitignored — keep secrets out of version control.
99
+
100
+ ### 3. Start the agent server
101
+
102
+ ```bash
103
+ coord agent & # runs on port 7433; auto-detects machine from hostname
104
+ ```
105
+
106
+ ### 4. Coordinate
107
+
108
+ **Option A — Use the /coordinator slash command in Claude Code:**
109
+
110
+ Open Claude Code in the repo, type `/coordinator`. It handles first-time setup, issue triage, dispatch, monitoring, smoke tests, and PR creation. The slash command is at `.claude/commands/coordinator.md`.
111
+
112
+ **Option B — Use the CLI directly:**
113
+
114
+ ```bash
115
+ coord status # verify agent is reachable
116
+ coord assign laptop myrepo 42 --model sonnet --briefing "Fix the auth bug"
117
+ coord watch <id> # live filtered output
118
+ coord test <id> # pull branch, run build + tests
119
+ coord test --passed <id> # record result
120
+ coord pr <id> # dispatch PR-creation worker
121
+ coord merge # open PRs and merge in sequence
122
+ ```
123
+
124
+ ## Worker Node Setup
125
+
126
+ To add a worker machine (no repo checkout needed):
127
+
128
+ ```bash
129
+ curl -sSL https://raw.githubusercontent.com/JDonaghy/claude-coordinator/main/install-agent.sh | bash
130
+ ```
131
+
132
+ Or with options:
133
+
134
+ ```bash
135
+ curl -sSL https://raw.githubusercontent.com/JDonaghy/claude-coordinator/main/install-agent.sh | bash -s -- --machine myserver --port 7433
136
+ ```
137
+
138
+ This installs coord, sets up a systemd service with auto-restart, and starts the agent.
139
+ Then add the machine to your coordinator.yml and run `coord status` to verify connectivity.
140
+
141
+ ## Command Reference
142
+
143
+ ### Core Workflow
144
+
145
+ | Command | Description |
146
+ |---------|-------------|
147
+ | `coord plan [--dry-run]` | Brain proposes assignments for idle machines |
148
+ | `coord approve <IDs> [--dry-run] [--auto-pull] [--skip-freshness]` | Dispatch approved assignments (comma-separated IDs) |
149
+ | `coord assign <machine> <repo> <issue> [--model haiku\|sonnet\|opus] [--briefing TEXT] [--dry-run]` | Direct dispatch, bypasses the brain |
150
+ | `coord status [--machine NAME] [--freshness]` | Show all machines, assignments, connectivity |
151
+ | `coord watch <id> [--all]` | Filtered live log output (stream-json events) |
152
+ | `coord wait <id>` | Block until assignment completes |
153
+ | `coord log <id> [-f] [--machine NAME] [--local]` | Raw `claude -p` output for an assignment |
154
+
155
+ ### Post-Completion
156
+
157
+ | Command | Description |
158
+ |---------|-------------|
159
+ | `coord test <id>` | Pull worker's branch locally, run build + tests |
160
+ | `coord test --passed <id>` | Record smoke test as passed |
161
+ | `coord test --fail <id> --reason "..."` | Record smoke test as failed |
162
+ | `coord pr <id> [--no-review]` | Dispatch a worker to create a PR (auto-dispatches adversarial review unless --no-review) |
163
+ | `coord fix <id> [--guidance "..."]` | Dispatch a fix-up worker for a failed smoke test (auto-escalates model) |
164
+ | `coord notify` | Poll agents, post completion/failure comments to GitHub |
165
+ | `coord merge [--dry-run] [--repo NAME] [--method rebase\|squash\|merge] [--order IDs]` | Process merge queue |
166
+ | `coord split <IDs>` | Create sub-issues from split proposals |
167
+
168
+ ### Recovery and Lifecycle
169
+
170
+ | Command | Description |
171
+ |---------|-------------|
172
+ | `coord resume-stuck <id> --guidance "..."` | Cancel a stuck worker, dispatch a continuation with guidance |
173
+ | `coord retry <id>` | Re-dispatch a failed assignment to a different machine |
174
+ | `coord stop <id>` | Cancel a running assignment |
175
+ | `coord resume` | Recover board state after crash, reconcile with agents |
176
+ | `coord done` | End session, run housekeeping hooks, show summary |
177
+
178
+ ### Setup and Diagnostics
179
+
180
+ | Command | Description |
181
+ |---------|-------------|
182
+ | `coord init` | Interactive setup: detects repos, writes coordinator.yml |
183
+ | `coord agent [--machine NAME] [--host HOST] [--port PORT]` | Start agent server (default port 7433) |
184
+ | `coord web [--host HOST] [--port PORT]` | Start web dashboard (default port 7434) |
185
+ | `coord config` | Pretty-print parsed coordinator.yml |
186
+ | `coord version` | Print version |
187
+
188
+ ### Model Tiers
189
+
190
+ | Flag | Use for |
191
+ |------|---------|
192
+ | `--model haiku` | Docs, config, trivial single-file changes |
193
+ | `--model sonnet` | Standard features, bug fixes (default) |
194
+ | `--model opus` | Complex multi-file or architectural work |
195
+
196
+ `coord fix` automatically escalates to the next tier on failure. Configure the ladder in `models.escalation`.
197
+
198
+ ## Configuration
199
+
200
+ ### Minimal single-machine config
201
+
202
+ ```yaml
203
+ # coordinator.yml
204
+
205
+ repos:
206
+ - name: my-project
207
+ github: owner/my-project
208
+ default_branch: main
209
+ build_command: "pytest"
210
+ test_command: "pytest"
211
+
212
+ machines:
213
+ - name: laptop
214
+ host: localhost # single machine: localhost works fine
215
+ capabilities: [python]
216
+ repos: [my-project]
217
+ repo_paths:
218
+ my-project: ~/src/my-project
219
+
220
+ concurrency:
221
+ max_workers: 3 # how many claude -p sessions can run at once
222
+ stagger_seconds: 30 # delay between dispatches (avoids rate limits)
223
+
224
+ models:
225
+ default: sonnet # model used when --model not specified
226
+ escalation: [haiku, sonnet, opus] # coord fix escalates through this list
227
+ labels: # assign model by GitHub issue label
228
+ documentation: haiku
229
+ architecture: opus
230
+ ```
231
+
232
+ ### Full reference
233
+
234
+ ```yaml
235
+ repos:
236
+ - name: api-gateway
237
+ github: acme/api-gateway
238
+ depends_on: [] # blocks dispatch if listed repos have active work
239
+ default_branch: main
240
+ build_command: "npm run build"
241
+ test_command: "npm test"
242
+
243
+ - name: user-service
244
+ github: acme/user-service
245
+ depends_on: [shared-lib] # won't dispatch if shared-lib has active work
246
+
247
+ - name: shared-lib
248
+ github: acme/shared-lib
249
+
250
+ machines:
251
+ - name: laptop
252
+ host: localhost # single machine
253
+ capabilities: [python, node]
254
+ repos: [api-gateway, user-service]
255
+ repo_paths:
256
+ api-gateway: ~/src/api-gateway
257
+ user-service: ~/src/user-service
258
+
259
+ - name: server # second machine (Tailscale hostname)
260
+ host: server.tailnet
261
+ capabilities: [docker, python]
262
+ repos: [user-service, shared-lib]
263
+ repo_paths:
264
+ user-service: ~/src/user-service
265
+ shared-lib: ~/src/shared-lib
266
+
267
+ concurrency:
268
+ max_workers: 2
269
+ stagger_seconds: 30
270
+ backoff_base: 60
271
+ max_retries: 3
272
+ auto_reassign: false # auto-retry failed assignments on a different machine
273
+ stale_threshold: 3 # unreachable poll count before marking stale
274
+
275
+ models:
276
+ default: sonnet
277
+ escalation: [haiku, sonnet, opus]
278
+ labels:
279
+ documentation: haiku
280
+ architecture: opus
281
+
282
+ hooks:
283
+ on_round_complete:
284
+ - summary_report
285
+ on_session_end:
286
+ - summary_report
287
+
288
+ reviews:
289
+ enabled: false # opt-in: adversarial review on completion
290
+ auto_dispatch: true
291
+ require_approval: false
292
+ checklist:
293
+ - "Did the worker add tests?"
294
+ - "Did the worker stay within file scope?"
295
+ repo_overrides:
296
+ api-gateway:
297
+ - "Check rate limiting on new endpoints"
298
+
299
+ smoke_tests:
300
+ auto_queue: false
301
+ default_command: "make smoke"
302
+ timeout_seconds: 600
303
+ capability_rules:
304
+ - files: [src/gtk/]
305
+ requires: [gtk]
306
+ ```
307
+
308
+ `coordinator.yml` is gitignored. Use `coordinator.example.yml` as the checked-in reference.
309
+
310
+ ## Features
311
+
312
+ - **No API key** — uses `claude -p` on your Max/Pro subscription; billing stays per-seat
313
+ - **Single-machine first** — one agent server, multiple workers in isolated git worktrees; no Tailscale needed
314
+ - **Model tiering** — docs get haiku ($0.08/task), standard work gets sonnet, complex work gets opus; `coord fix` auto-escalates on failure
315
+ - **Worktree isolation** — workers operate in separate git worktrees; no shared working-tree state between sessions
316
+ - **Stream-json observability** — `coord watch` parses `claude -p` stream-json events and shows a clean filtered log
317
+ - **Full issue-to-PR pipeline** — `coord assign` → `coord watch` → `coord test` → `coord pr` → `coord merge`
318
+ - **`/coordinator` slash command** — open Claude Code, type `/coordinator` for guided operation: setup, triage, dispatch, monitoring
319
+ - **Multi-repo** — tracks dependency chains between repos; upstream work blocks downstream dispatch
320
+ - **File conflict avoidance** — coordinator ensures no two workers touch the same files simultaneously
321
+ - **Claim detection** — checks board and remote `issue-{N}-*` branches before dispatching; refuses duplicates
322
+ - **Adversarial reviews** — enabled by default: `coord pr` auto-dispatches an independent `claude -p` session that reviews the diff with zero shared context. Works on a single machine — independence comes from a fresh session, not separate hardware
323
+ - **Smoke testing** — capability-aware routing (GTK changes → machine with GTK)
324
+ - **Merge queue** — sequences completed PRs with conflict detection and dependency-aware ordering
325
+ - **Progress streaming** — workers emit `STATUS:`/`STUCK:` lines; `coord status` shows real-time progress
326
+ - **Failure reassignment** — `coord retry` re-dispatches to a different machine; `auto_reassign` does it automatically
327
+ - **Crash recovery** — `coord resume` reconciles board with live agent state after restart
328
+ - **Web dashboard** — lightweight board view at port 7434
329
+
330
+ ## Why This Works (Even With One Machine)
331
+
332
+ This tool encodes a pattern discovered through real multi-agent coordination sessions: **separate the tech lead from the IC.**
333
+
334
+ The coordinator thinks about *what to do next* — priority, dependencies, conflicts, which machine is idle. Workers think about *how to do this one thing* — read the issue, write the code, push the branch. Neither is distracted by the other's concern.
335
+
336
+ This division of labor produces better results than a single long-running Claude Code session:
337
+
338
+ - **Forced scoping.** One issue per worker session prevents scope creep. No "while I'm here, let me also refactor this." The worker does one thing and finishes.
339
+ - **Structured handoffs.** Every assignment has a briefing posted as a GitHub issue comment. If a session dies, a new one picks up from the comment — zero context loss.
340
+ - **Persistent record.** Every decision, briefing, and result lives on GitHub. You can review what happened a week later. Terminal scrollback is gone when the window closes.
341
+ - **Fresh eyes.** Each worker starts with no prior context. Adversarial reviews take this further: a separate session reviews the work with zero shared context — even on the same machine.
342
+ - **Human stays strategic.** You approve assignments and make judgment calls. You don't ferry messages between terminals or track who's touching which file in your head.
343
+ - **Cost savings.** Model tiering means you're not paying opus prices for documentation fixes. Auto-escalation on failure means you start cheap and only pay more when needed.
344
+
345
+ Even with a single machine, the pattern gives you scoping discipline, handoff resilience, and an auditable trail of decisions that a raw terminal session doesn't.
346
+
347
+ ## Scaling Up
348
+
349
+ Started on one machine? Add more by:
350
+
351
+ 1. Install `coord` on the new machine (`pip install -e .` from the cloned repo)
352
+ 2. Start the agent: `coord agent` (port 7433)
353
+ 3. Add it to `coordinator.yml` under `machines:` with its Tailscale hostname
354
+ 4. `coord status` shows all machines and their connectivity
355
+
356
+ For Tailscale setup, see [tailscale.com/kb](https://tailscale.com/kb/). The agent server only needs port 7433 reachable on the tailnet.
357
+
358
+ ## Troubleshooting
359
+
360
+ ### Agent won't start
361
+
362
+ - **Port in use:** Another `coord agent` is running. Check `lsof -i :7433`, or use `--port` to pick a different one.
363
+ - **Hostname mismatch:** The agent matches `socket.gethostname()` against `coordinator.yml`. If it fails, pass `--machine NAME` explicitly.
364
+
365
+ ### "connection refused" in coord status
366
+
367
+ - **Agent not running:** Start `coord agent` on the target machine.
368
+ - **Tailscale not connected:** Run `tailscale status` on both machines.
369
+ - **Firewall:** Tailscale usually handles this, but check `ufw`/`iptables` if you have custom rules.
370
+
371
+ ### Worker fails immediately
372
+
373
+ - **Repo path wrong:** `repo_paths` in `coordinator.yml` must match the actual path on that machine. Run `coord config` to see parsed paths.
374
+ - **`gh` not authenticated:** The coordinator uses `gh` for GitHub operations (issues, PRs, comments). Workers do NOT use `gh` — only the coordinator does. Run `gh auth status` on the machine running `coord` commands.
375
+ - **`claude` CLI not available:** The agent spawns `claude -p` as a subprocess. Ensure the Claude Code CLI is installed and on the PATH.
376
+
377
+ ### Stale dependency warnings
378
+
379
+ When `coord approve` warns about stale dependencies, an upstream repo on the target machine is behind GitHub's HEAD:
380
+ - `--auto-pull` to `git pull --ff-only` stale repos before starting the worker
381
+ - `--skip-freshness` to skip the check entirely
382
+ - Or manually pull on the target machine
383
+
384
+ ### Board state issues
385
+
386
+ - **Stuck assignments after crash:** Run `coord resume` to reconcile board with live agent state.
387
+ - **Stale completed entries:** `coord resume` runs garbage collection, keeping the 50 most recent completed assignments.
388
+
389
+ ## Requirements
390
+
391
+ - Python 3.12+
392
+ - Claude Code CLI with Max or Pro subscription
393
+ - `gh` CLI (authenticated, for coordinator-side GitHub operations)
394
+ - Tailscale — optional, only needed for multi-machine setups