Delegate coding work from Claude Code or the terminal, on macOS and Windows:
tandy-*— ordinary Claude Code subagents running on GPT models, in the same session as a Claude parent, via a local CLIProxyAPI gateway. Interactive.dairy— a standalone CLI for one-shot, unattended, and CI jobs with Codex or Claude. No gateway required.herd— detached, resumable, steerable headless workers with Codex or Claude: spawn returns immediately, and you check on, steer, resume, or kill the worker later. No gateway, no Claude session. State is device-local and never synced.
Plus prune-worktrees, a safe cleaner for the isolated worktrees these
paths create.
runtime-selected orchestrator (Opus, Sonnet, Fable — your choice)
|
+-- tandy-<profile> one writer in the current checkout
+-- tandy-<profile>-worktree each simultaneous writer in its own worktree
+-- tandy-<profile>-readonly read-only analysis and shell inspection
profiles: terra (default), luna (fast/high-volume), sol (strongest)
Every capability exists for every profile, so tandy-luna-readonly and
tandy-sol-worktree are both valid. The agent definitions are capability
boundaries, not personas — the task message defines the work. Multiple workers
run under distinct runtime names, and the orchestrator can message or resume any
of them by agent ID.
tandy needs the gateway; dairy, herd, and prune-worktrees do not. If you
only want direct CLI execution, install the kit and skip the gateway steps.
Claude Code speaks the Anthropic Messages API, and ANTHROPIC_BASE_URL is
process-wide — a subagent cannot use a different endpoint from its parent. So
the whole session routes through one local gateway that serves both model
families at once. The trade-off: in a gateway session the claude.ai connectors
are unavailable, which is why the kit adds a second launcher rather than
replacing your existing one.
-
Render and wire the kit
python3 tools/render_config.py ./bin/install-macos.sh # or: .\bin\install-windows.ps1 -AddToUserPath -
Set up the gateway — install CLIProxyAPI, fill
generated/cliproxy/config.template.yaml, run both OAuth logins, and start the proxy at login. Full procedure: docs/gateway-setup.md. Platform specifics: docs/macos.md, docs/windows.md. -
Add the
ccglauncher. On Windows,install-windows.ps1 -AddToUserPathexposes the syncedbin/ccg.cmdto both PowerShell and cmd.exe. On macOS/Linux, sourcebin/ccg-snippet.sh. Keep it alongside your normal direct launcher, then run the platform doctor to verify. On macOS/Linux, sourcing the siblingglobal-agent-defaults/bin/agent-shell.shfirst also enablesccgs, an explicitly persistentscreenvariant; plainccgstays nonpersistent.
Change models by editing config/models.env and re-rendering — never by editing
generated/.
| File | What it covers |
|---|---|
| docs/gateway-setup.md | The canonical per-device install |
| docs/known-issues.md | Traps that have actually bitten. Read before debugging |
| docs/architecture.md | Design, prompt budget, why it stays maintainable |
| docs/native-agents.md | Delegating, resuming, smoke tests |
| docs/dairy-runner.md | The dairy CLI: modes, backends, known issues |
| docs/detached-runner.md | The herd CLI: detached, resumable workers and their lifecycle |
| docs/model-aliases.md | How aliases map to providers |
| docs/permissions-and-stalls.md | Permission modes and avoiding hangs |
| DEVICE-AGENT-INSTALL.md | A brief you can hand to a local coding agent to install this for you |
- The parent model is never hardcoded;
claudexpasses--modelthrough unchanged, with an optionalDELEGATE_PARENT_MODELpin. - Provider model IDs live in exactly one file,
config/models.env. Agent files reference stable gateway aliases generated from it. - The always-sent worker prompt is one short paragraph. The larger orchestration policy is an optional Skill, loaded only when invoked.
- Gateway aliases intentionally begin with
claude-, because Claude Code filters gateway model discovery by that prefix. - Credentials live in one local
device.envper machine, never in the repo. - Tandy defaults to the dedicated
clientdata-272kprofile. Thenative-200kpath remains an explicit compatibility fallback; revalidate the 272k client behavior after Claude Code upgrades as described in known issues.
Deliberately omitted: any large global CLAUDE.md block (subagents already
inherit the parent's hierarchy), and CLAUDE_CODE_SUBAGENT_MODEL (it would
override per-agent and per-invocation model selection).
Routing Claude Code to non-Claude models through a third-party gateway is
outside Anthropic's supported model path. Use current Claude Code — the
per-invocation and resume behaviour this kit relies on requires 2.1.211 or
later. Keep CLIProxyAPI current and re-run tests/ plus the doctor script
after upgrading either.
MIT — see LICENSE.