ccd

command
v0.254.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 20, 2026 License: MIT Imports: 39 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command ccd is the in-pod supervisor that makes an interactive Claude Code session a muster agent runtime.

One `claude` TUI runs in a tmux session; it is the conversation, and the one an operator sees when they attach. ccd speaks muster's existing agent wire on top of it:

  • POST /v1/responses — muster's chat/kickoff transport. The prompt goes IN as a bracketed paste into the pane (tmux.go); the reply comes OUT of the session transcript JSONL (transcript.go), never off the screen; the turn ends on the CLI's Stop / StopFailure hook (server.go). A failed turn is a non-200 with a typed JSON error (failure.go), never a 200 with no text.
  • GET /healthz (and GET /, identically) — 200 while ccd is up, the tmux session (once the CLI is started: the CLI's own pane, on the tmux server it was started in) is alive, and the CLI is neither crash-looping nor lost. Session and auth state are reported in the body and never gate it (server.go handleHealthz).
  • /hook/{event} on a UNIX SOCKET in a directory only ccd's user can enter, authenticated with a per-process credential — where `ccd hook <Event>`, the command the CLI's settings run for each hook, reports (server.go hookHandler). ccd hands the socket's path and the credential to each CLI it starts, in its environment (CCD_HOOK_SOCKET, CCD_HOOK_SECRET).

Subcommands:

ccd [serve]          run the server (environment below)
ccd hook <Event>     forward a hook payload from stdin to the server
ccd seed [--check]   write (or verify) the CLI's onboarding/trust/hook config
ccd approve          the PermissionRequest hook: route the prompt to the
                     operator through muster's approval relay (approve.go)
ccd compose          the image as a docker compose service: run the entrypoint
                     as a child per the spec muster writes under CCD_SPEC_DIR,
                     and proxy :18789 to it (compose.go)
ccd compose-epoch    the helper `ccd compose` runs as the CLI's user to empty
                     /data for a new epoch (compose.go prepareEpoch)

Environment (serve):

MUSTER_GATEWAY_BEARER  the bearer /v1/responses accepts (muster mints it per agent)
HOOKS_TOKEN            alternatively, a token it is derived from (both: must agree)
CCD_GATEWAY_UPSTREAM_BEARER  retired (the gateway runtime that once ran beside a
                       chief's ccd is gone); still unset if a pod carries it
                       🔴 ccd unsets all three before it starts anything, and
                       refuses a bearer the CLI could derive from what it keeps
                       (MUSTER_HOOK_TOKEN): turncred.go
CLAUDE_CONFIG_DIR      the CLI's config dir; transcripts are read only under <it>/projects
CCD_LISTEN             gateway address        (default :18789)
                       (the hook listener is a unix socket ccd creates itself under
                       $TMPDIR; CCD_HOOK_LISTEN, the old TCP address, is no longer read)
CCD_TMUX_SOCKET        tmux -L socket name    (default: tmux's default server)
CCD_TMUX_CONF          tmux -f config file    (default: tmux's default)
CCD_TMUX_TARGET        tmux SESSION name      (default cc); never an input target:
                       prompts go to the CLI's pane id (tmux.go)
CCD_WORKSPACE          the CLI's working directory (default: cwd)
CCD_REPO               owner/name: clone https://github.com/<it> into CCD_WORKSPACE before the
                       CLI starts, and start the CLI only once it exists (checkout.go)
CCD_REPO_BRANCH        the branch to clone (default: the remote's default)
CCD_SUPERVISE          "1": once listening, create the tmux session and keep the
                       CLI running in it — `claude --resume <id>` when a transcript
                       exists, `claude` on a fresh volume (supervise.go). Without
                       it ccd knows no pane id, so every turn is not_ready.
CCD_CLAUDE_BIN         the CLI binary         (default claude)
CCD_MAX_SESSIONS       how many CLIs ccd runs BESIDE the primary, one per explicit
                       muster session (lanes.go; default 3, 0 = none: a request
                       naming a session is then not_ready)
CCD_SUBMIT_TIMEOUT / CCD_TURN_TIMEOUT              (default 20s / 30m)
CCD_HOOK_LOG           append every raw hook payload to this file. OFF by default;
                       when on it writes every prompt's text there (on the volume,
                       when pointed under /data). Capture-only, for the OWED note in
                       failure.go, and removed by the PR that closes it.

Directories

Path Synopsis
Command livecheck sends ONE turn to a running ccd through muster's own chat client — agentgateway.Gateway, the code path muster's chat box and kickoff use — and prints the reply.
Command livecheck sends ONE turn to a running ccd through muster's own chat client — agentgateway.Gateway, the code path muster's chat box and kickoff use — and prints the reply.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL