Exec & sessions

Run Cluster Build non-interactively with `cluster exec`, and list, resume, and manage your saved sessions.

Exec & sessions

Interactive sessions are the main way to work with Cluster Build, but you can also run a single prompt non-interactively — for scripts, CI, and quick questions — and pick up any past conversation where you left off.

Run a one-shot prompt

cluster exec runs a single prompt and exits without entering the interactive UI:

cluster exec "summarize what this service does"

It reads from stdin too, so you can pipe context in. A positional prompt and piped stdin are combined (positional first, then stdin, joined by a newline):

echo "fix the failing test in api_test.go" | cluster exec
git diff | cluster exec "review this change for bugs"

Flags

FlagEffect
--model <id> (-m)Override the default model for this run only (not persisted)
--effort <level>Reasoning effort hint — minimal, low, medium, high, xhigh, max
--ephemeralDon't save this run to ~/.cluster/sessions/
--resume <prefix>Append this turn to an existing session (see below)
cluster exec --model <model-id> --effort high "plan a refactor of the auth module"

Without --dangerously-skip-approvals, exec still prompts on stderr before mutating actions. For unattended runs, prefer --plan to keep the run read-only. Use --dangerously-skip-approvals (alias --yolo) only in isolated, least-privilege environments — it lets the assistant run commands and edit files with no confirmation. Both are global flags, so cluster exec --yolo "…" and cluster --yolo exec "…" are equivalent.

Sessions

Every conversation — interactive or exec — is saved under ~/.cluster/sessions/ unless you pass --ephemeral. List, inspect, and delete them:

cluster sessions ls            # newest first
cluster sessions ls --here     # only sessions started in this directory
cluster sessions show <id>     # print a session's contents
cluster sessions rm <id>       # delete a session

Resume a session

Resume by its id prefix (at least 6 hex characters). This works from any directory:

cluster --resume <id-prefix>            # resume interactively
cluster exec --resume <id-prefix> "…"   # append a one-shot turn

Inside an interactive session you can also run /resume to browse and switch between saved sessions.

Next steps

On this page