Skip to main content

CLI Reference

Auto-generated — do not edit. Run go run ./cmd/genschema to regenerate.

Global Flags

FlagTypeDefaultDescription
--citystringpath to the city directory (default: walk up from cwd)

gc

Gas City CLI — orchestration-builder for multi-agent workflows
gc [flags]
SubcommandDescription
gc agentManage agent configuration
gc beadsManage the beads provider
gc build-imageBuild a prebaked agent container image
gc citiesList registered cities
gc configInspect and validate city configuration
gc convergeManage convergence loops (bounded iterative refinement)
gc convoyManage convoys (batch work tracking)
gc dashboardWeb dashboard for monitoring the city
gc doctorCheck workspace health
gc eventEvent operations
gc eventsShow the event log
gc graphShow dependency graph for beads
gc handoffSend handoff mail and restart agent session
gc helpHelp about any command
gc hookCheck for available work (use —inject for Stop hook output)
gc initInitialize a new city
gc mailSend and receive messages between agents and humans
gc nudgeInspect and deliver deferred nudges
gc orderManage orders (periodic formula dispatch)
gc packManage remote pack sources
gc primeOutput the behavioral prompt for an agent
gc registerRegister a city with the machine-wide supervisor
gc restartRestart all agent sessions in the city
gc resumeResume a suspended city
gc rigManage rigs (projects)
gc runtimeProcess-intrinsic runtime operations
gc serviceInspect workspace services
gc sessionManage interactive chat sessions
gc skillShow command reference for a topic
gc slingRoute work to an agent or pool
gc startStart the city under the machine-wide supervisor
gc statusShow city-wide status overview
gc stopStop all agent sessions in the city
gc supervisorManage the machine-wide supervisor
gc suspendSuspend the city (all agents effectively suspended)
gc unregisterRemove a city from the machine-wide supervisor
gc versionPrint gc version information
gc waitInspect and manage durable session waits

gc agent

Manage agent configuration in city.toml. Runtime operations (attach, list, peek, nudge, kill, start, stop, destroy) have moved to “gc session” and “gc runtime”.
gc agent
SubcommandDescription
gc agent addAdd an agent to the workspace
gc agent resumeResume a suspended agent
gc agent suspendSuspend an agent (reconciler will skip it)

gc agent add

Add a new agent to the workspace configuration. Appends an [[agent]] block to city.toml. The agent will be started on the next “gc start” or controller reconcile tick. Use —dir to scope the agent to a rig’s working directory.
gc agent add --name <name> [flags]
Example:
gc agent add --name mayor
  gc agent add --name polecat --dir my-project
  gc agent add --name worker --prompt-template prompts/worker.md --suspended
FlagTypeDefaultDescription
--dirstringWorking directory for the agent (relative to city root)
--namestringName of the agent
--prompt-templatestringPath to prompt template file (relative to city root)
--suspendedboolRegister the agent in suspended state

gc agent resume

Resume a suspended agent by clearing suspended in city.toml. The reconciler will start the agent on its next tick. Supports bare names (resolved via rig context) and qualified names (e.g. “myrig/worker”).
gc agent resume <name>

gc agent suspend

Suspend an agent by setting suspended=true in city.toml. Suspended agents are skipped by the reconciler — their sessions are not started or restarted. Existing sessions continue running but won’t be replaced if they exit. Use “gc agent resume” to restore.
gc agent suspend <name>

gc beads

Manage the beads provider (backing store for issue tracking). Subcommands for health checking and diagnostics.
gc beads
SubcommandDescription
gc beads healthCheck beads provider health

gc beads health

Check beads provider health and attempt recovery on failure. Delegates to the provider’s lifecycle health operation. For exec providers (including bd/dolt), the script handles multi-tier checking and recovery internally. For the file provider, always succeeds (no-op). Also used by the beads-health system order for periodic monitoring.
gc beads health [flags]
Example:
gc beads health
  gc beads health --quiet
FlagTypeDefaultDescription
--quietboolsilent on success, stderr on failure

gc build-image

Assemble a Docker build context from city config, prompts, formulas, and rig content, then build a container image with everything pre-staged. Pods using the prebaked image skip init containers and file staging, reducing startup from 30-60s to seconds. Configure with prebaked = true in [session.k8s]. Secrets (Claude credentials) are never baked — they stay as K8s Secret volume mounts at runtime.
gc build-image [city-path] [flags]
Example:
# Build context only (no docker build)
  gc build-image ~/bright-lights --context-only

  # Build and tag image
  gc build-image ~/bright-lights --tag my-city:latest

  # Build with rig content baked in
  gc build-image ~/bright-lights --tag my-city:latest --rig-path demo:/path/to/demo

  # Build and push to registry
  gc build-image ~/bright-lights --tag registry.io/my-city:latest --push
FlagTypeDefaultDescription
--base-imagestringgc-agent:latestbase Docker image
--context-onlyboolwrite build context without running docker build
--pushboolpush image after building
--rig-pathstringSlicerig name:path pairs (repeatable)
--tagstringimage tag (required unless —context-only)

gc cities

List all cities registered with the machine-wide supervisor.
gc cities

gc config

Inspect, validate, and debug the resolved city configuration. The config system supports multi-file composition with includes, packs, patches, and overrides. Use “show” to dump the resolved config and “explain” to see where each value originated.
gc config
SubcommandDescription
gc config explainShow resolved agent config with provenance annotations
gc config showDump the resolved city configuration as TOML

gc config explain

Show the resolved configuration for each agent with provenance. Displays every resolved field with an annotation showing which config file provided the value. Use —rig and —agent to filter the output. Useful for debugging config composition and understanding override resolution.
gc config explain [flags]
Example:
gc config explain
  gc config explain --agent mayor
  gc config explain --rig my-project
  gc config explain -f overlay.toml --agent polecat
FlagTypeDefaultDescription
--agentstringfilter to a specific agent name
-f, --filestringArrayadditional config files to layer (can be repeated)
--rigstringfilter to agents in this rig

gc config show

Dump the fully resolved city configuration as TOML. Loads city.toml with all includes, packs, patches, and overrides, then outputs the merged result. Use —validate to check for errors without printing. Use —provenance to see which file contributed each config element. Use -f to layer additional config files.
gc config show [flags]
Example:
gc config show
  gc config show --validate
  gc config show --provenance
  gc config show -f overlay.toml
FlagTypeDefaultDescription
-f, --filestringArrayadditional config files to layer (can be repeated)
--provenanceboolshow where each config element originated
--validateboolvalidate config and exit (0 = valid, 1 = errors)

gc converge

Convergence loops are bounded multi-step refinement cycles. A root bead + formula + gate = repeat until the gate passes or max iterations are reached. The controller processes wisp_closed events and drives the loop automatically.
gc converge
SubcommandDescription
gc converge approveApprove and close a convergence loop (manual gate)
gc converge createCreate a convergence loop
gc converge iterateForce next iteration (manual gate)
gc converge listList convergence loops
gc converge retryRetry a terminated convergence loop
gc converge statusShow convergence loop status
gc converge stopStop a convergence loop
gc converge test-gateDry-run the gate condition (no state changes)

gc converge approve

Approve and close a convergence loop (manual gate)
gc converge approve <bead-id>

gc converge create

Create a convergence loop
gc converge create [flags]
FlagTypeDefaultDescription
--evaluate-promptstringCustom evaluate prompt (overrides formula default)
--formulastringFormula to use (required)
--gatestringmanualGate mode: manual, condition, hybrid
--gate-conditionstringPath to gate condition script
--gate-timeoutstring30sGate execution timeout
--gate-timeout-actionstringiterateAction on gate timeout: iterate, retry, manual, terminate
--max-iterationsint5Maximum iterations
--targetstringTarget agent (required)
--titlestringConvergence loop title
--varstringArrayTemplate variable (key=value, repeatable)

gc converge iterate

Force next iteration (manual gate)
gc converge iterate <bead-id>

gc converge list

List convergence loops
gc converge list [flags]
FlagTypeDefaultDescription
--allboolInclude closed/terminated loops
--jsonboolOutput as JSON
--statestringFilter by state (active, waiting_manual, terminated)

gc converge retry

Retry a terminated convergence loop
gc converge retry <bead-id> [flags]
FlagTypeDefaultDescription
--max-iterationsintOverride max iterations (default: inherit from source)

gc converge status

Show convergence loop status
gc converge status <bead-id> [flags]
FlagTypeDefaultDescription
--jsonboolOutput as JSON

gc converge stop

Stop a convergence loop
gc converge stop <bead-id>

gc converge test-gate

Dry-run the gate condition (no state changes)
gc converge test-gate <bead-id>

gc convoy

Manage convoys — batch work tracking containers. A convoy is a bead that groups related issues. Issues are linked to a convoy via parent-child relationships. Convoys track completion progress and can be auto-closed when all their issues are resolved.
gc convoy
SubcommandDescription
gc convoy addAdd an issue to a convoy
gc convoy checkAuto-close convoys where all issues are closed
gc convoy closeClose a convoy
gc convoy createCreate a convoy and optionally track issues
gc convoy landLand an owned convoy (terminate + cleanup)
gc convoy listList open convoys with progress
gc convoy statusShow detailed convoy status
gc convoy strandedFind convoys with ready work but no workers

gc convoy add

Link an existing issue bead to a convoy. Sets the issue’s parent to the convoy ID, making it appear in the convoy’s progress tracking.
gc convoy add <convoy-id> <issue-id>

gc convoy check

Scan open convoys and auto-close any where all child issues are resolved. Evaluates each open convoy’s children. If all children have status “closed”, the convoy is automatically closed and an event is recorded.
gc convoy check

gc convoy close

Close a convoy bead manually. Marks the convoy as closed regardless of child issue status. Use “gc convoy check” to auto-close convoys where all issues are resolved.
gc convoy close <id>

gc convoy create

Create a convoy and optionally link existing issues to it. Creates a convoy bead and sets the parent of any provided issue IDs to the new convoy. Issues can also be added later with “gc convoy add”.
gc convoy create <name> [issue-ids...] [flags]
Example:
gc convoy create sprint-42
  gc convoy create sprint-42 issue-1 issue-2 issue-3
  gc convoy create deploy --owner mayor --notify mayor --merge mr
FlagTypeDefaultDescription
--mergestringmerge strategy: direct, mr, local
--notifystringnotification target on completion
--ownerstringconvoy owner (who manages it)

gc convoy land

Land an owned convoy, verifying all children are closed. Landing is the natural lifecycle termination for owned convoys created via “gc sling —owned”. It verifies all children are closed (or uses —force), closes the convoy bead, and records a ConvoyClosed event.
gc convoy land <convoy-id> [flags]
Example:
gc convoy land gc-42
  gc convoy land gc-42 --force
  gc convoy land gc-42 --dry-run
FlagTypeDefaultDescription
--dry-runboolpreview what would happen
--forceboolland even with open children

gc convoy list

List all open convoys with completion progress. Shows each convoy’s ID, title, and the number of closed vs total child issues.
gc convoy list

gc convoy status

Show detailed status of a convoy and all its child issues. Displays the convoy’s ID, title, status, completion progress, and a table of all child issues with their status and assignee.
gc convoy status <id>

gc convoy stranded

Find open issues in convoys that have no assignee. Lists issues that are ready for work but not claimed by any agent. Useful for identifying bottlenecks in convoy processing.
gc convoy stranded

gc dashboard

Web dashboard for monitoring the city
gc dashboard
SubcommandDescription
gc dashboard serveStart the web dashboard

gc dashboard serve

Start the web dashboard
gc dashboard serve [flags]
FlagTypeDefaultDescription
--apistringGC API server URL (e.g. standalone http://127.0.0.1:9443, supervisor http://127.0.0.1:8372)
--portint8080HTTP port

gc doctor

Run diagnostic health checks on the city workspace. Checks city structure, config validity, binary dependencies (tmux, git, bd, dolt), controller status, agent sessions, zombie/orphan sessions, bead stores, Dolt server health, event log integrity, and per-rig health. Use —fix to attempt automatic repairs.
gc doctor [flags]
Example:
gc doctor
  gc doctor --fix
  gc doctor --verbose
FlagTypeDefaultDescription
--fixboolattempt to fix issues automatically
-v, --verboseboolshow extra diagnostic details

gc event

Event operations
gc event
SubcommandDescription
gc event emitEmit an event to the city event log

gc event emit

Record a custom event to the city event log. Best-effort: always exits 0 so bead hooks never fail. Supports attaching arbitrary JSON payloads.
gc event emit <type> [flags]
FlagTypeDefaultDescription
--actorstringActor name (default: GC_AGENT or “human”)
--messagestringEvent message
--payloadstringJSON payload to attach to the event
--subjectstringEvent subject (e.g. bead ID)

gc events

Show the city event log with optional filtering. Events are recorded to .gc/events.jsonl by the controller, agent lifecycle operations, and bead mutations. Use —type and —since to filter. Use —watch to block until matching events arrive (useful for scripting and automation).
gc events [flags]
Example:
gc events
  gc events --type bead.created --since 1h
  gc events --watch --type convoy.closed --timeout 5m
  gc events --follow
  gc events --seq
FlagTypeDefaultDescription
--afteruint64Resume watching from this sequence number (0 = current head)
--followboolContinuously stream events as they arrive
--jsonboolOutput in JSON format (list mode only)
--payload-matchstringArrayFilter by payload field (key=value, repeatable)
--seqboolPrint the current head sequence number and exit
--sincestringShow events since duration ago (e.g. 1h, 30m)
--timeoutstring30sMax wait duration for —watch (e.g. 30s, 5m)
--typestringFilter by event type (e.g. bead.created)
--watchboolBlock until matching events arrive (exits after first match)

gc graph

Show the dependency graph for a set of beads or a convoy. Resolves dependencies via the bead store and prints each bead with its status and what blocks it. Convoys are expanded to their children automatically. Epics are treated as ordinary beads. Readiness is computed within the displayed set. By default prints a table. Use —tree for a Unicode tree view or —mermaid for a Mermaid.js flowchart you can paste into Markdown.
gc graph <bead-ids|convoy-id...> [flags]
Example:
gc graph gc-42               # expand convoy children
  gc graph gc-1 gc-2 gc-3     # arbitrary beads
  gc graph gc-42 --tree        # dependency tree
  gc graph gc-42 --mermaid     # Mermaid.js diagram
FlagTypeDefaultDescription
--mermaidbooloutput Mermaid.js flowchart
--treebooloutput Unicode dependency tree

gc handoff

Convenience command for context handoff. Self-handoff (default): sends mail to self and blocks until controller restarts the session. Equivalent to: gc mail send $GC_AGENT <subject> [message] gc runtime request-restart Remote handoff (—target): sends mail to target agent and kills its session. The reconciler restarts it with the handoff mail waiting. Returns immediately. Equivalent to: gc mail send <target> <subject> [message] gc session kill <target> Self-handoff requires agent context (GC_AGENT/GC_CITY env vars). Remote handoff can be run from any context with access to the city.
gc handoff <subject> [message] [flags]
FlagTypeDefaultDescription
--targetstringRemote agent to handoff (sends mail + kills session)

gc help

Help provides help for any command in the application. Simply type gc help [path to command] for full details.
gc help [command]

gc hook

Checks for available work using the agent’s work_query config. Without —inject: prints raw output, exits 0 if work exists, 1 if empty. With —inject: wraps output in <system-reminder> for hook injection, always exits 0. The agent is determined from $GC_AGENT or a positional argument.
gc hook [agent] [flags]
FlagTypeDefaultDescription
--injectbooloutput <system-reminder> block for hook injection

gc init

Create a new Gas City workspace in the given directory (or cwd). Runs an interactive wizard to choose a config template and coding agent provider. Creates the .gc/ runtime directory, default prompts and formulas, and writes city.toml. Use —provider to create the default mayor city non-interactively, or —file to initialize from an existing TOML config file.
gc init [path] [flags]
Example:
gc init
  gc init ~/my-city
  gc init --provider codex ~/my-city
  gc init --provider codex --bootstrap-profile k8s-cell /city
  gc init --file examples/gastown.toml ~/bright-lights
FlagTypeDefaultDescription
--bootstrap-profilestringbootstrap profile to apply for hosted/container defaults
--filestringpath to a TOML file to use as city.toml
--fromstringpath to an example city directory to copy
--providerstringbuilt-in workspace provider to use for the default mayor config

gc mail

Send and receive messages between agents and humans. Mail is implemented as beads with type=“message”. Messages have a sender, recipient, subject, and body. Use “gc mail check —inject” in agent hooks to deliver mail notifications into agent prompts.
gc mail
SubcommandDescription
gc mail archiveArchive a message without reading it
gc mail checkCheck for unread mail (use —inject for hook output)
gc mail countShow total/unread message count
gc mail deleteDelete a message (closes the bead)
gc mail inboxList unread messages (defaults to your inbox)
gc mail mark-readMark a message as read
gc mail mark-unreadMark a message as unread
gc mail peekShow a message without marking it as read
gc mail readRead a message and mark it as read
gc mail replyReply to a message
gc mail sendSend a message to an agent or human
gc mail threadList all messages in a thread

gc mail archive

Close a message bead without displaying its contents. Use this to dismiss a message without reading it. The message is marked as closed and will no longer appear in mail check or inbox results.
gc mail archive <id>

gc mail check

Check for unread mail addressed to an agent. Without —inject: prints the count and exits 0 if mail exists, 1 if empty. With —inject: outputs a <system-reminder> block suitable for hook injection (always exits 0). The recipient defaults to $GC_AGENT or “human”.
gc mail check [agent] [flags]
Example:
gc mail check
  gc mail check --inject
  gc mail check mayor
FlagTypeDefaultDescription
--injectbooloutput <system-reminder> block for hook injection

gc mail count

Show total and unread message counts for an agent or human. The recipient defaults to $GC_AGENT or “human”.
gc mail count [agent]

gc mail delete

Delete a message by closing the bead. Same effect as archive but with different user intent.
gc mail delete <id>

gc mail inbox

List all unread messages for an agent or human. Shows message ID, sender, subject, and body in a table. The recipient defaults to $GC_AGENT or “human”. Pass an agent name to view another agent’s inbox.
gc mail inbox [agent]

gc mail mark-read

Mark a message as read without displaying it. The message will no longer appear in inbox results.
gc mail mark-read <id>

gc mail mark-unread

Mark a message as unread. The message will appear again in inbox results.
gc mail mark-unread <id>

gc mail peek

Display a message without marking it as read. Same output as “gc mail read” but does not change the message’s read status. The message will continue to appear in inbox results.
gc mail peek <id>

gc mail read

Display a message and mark it as read. Shows the full message details (ID, sender, recipient, subject, date, body). The message stays in the store — use “gc mail archive” to permanently close it.
gc mail read <id>

gc mail reply

Reply to a message. The reply is addressed to the original sender. Inherits the thread ID from the original message for conversation tracking. Use -s/—subject for the reply subject and -m/—message for the reply body.
gc mail reply <id> [-s subject] [-m body] [flags]
FlagTypeDefaultDescription
-m, --messagestringreply body text
--notifyboolnudge the recipient after replying
-s, --subjectstringreply subject line

gc mail send

Send a message to an agent or human. Creates a message bead addressed to the recipient. The sender defaults to $GC_AGENT (in agent sessions) or “human”. Use —notify to nudge the recipient after sending. Use —from to override the sender identity. Use —to as an alternative to the positional <to> argument. Use -s/—subject for the summary line and -m/—message for the body text. Use —all to broadcast to all agents (excluding sender and “human”).
gc mail send [<to>] [<body>] [flags]
Example:
gc mail send mayor "Build is green"
  gc mail send mayor -s "Build is green"
  gc mail send mayor/ -s "ESCALATION: Auth broken" -m "Token refresh fails after 30min"
  gc mail send --to mayor "Build is green"
  gc mail send human "Review needed for PR #42"
  gc mail send polecat "Priority task" --notify
  gc mail send --all "Status update: tests passing"
FlagTypeDefaultDescription
--allboolbroadcast to all agents (excludes sender and human)
--fromstringsender identity (default: $GC_AGENT or “human”)
-m, --messagestringmessage body text
--notifyboolnudge the recipient after sending
-s, --subjectstringmessage subject line
--tostringrecipient address (alternative to positional argument)

gc mail thread

Show all messages sharing a thread ID, ordered by time.
gc mail thread <thread-id>

gc nudge

Inspect and deliver deferred nudges. Deferred nudges are reminders that were queued because the target agent was asleep or was not at a safe interactive boundary yet.
gc nudge
SubcommandDescription
gc nudge statusShow queued and dead-letter nudges for an agent

gc nudge status

Show queued and dead-letter nudges for an agent. Defaults to $GC_AGENT when run inside an agent session.
gc nudge status [agent]

gc order

Manage orders — formulas with gate conditions for periodic dispatch. Orders are formulas annotated with scheduling gates (interval, cron schedule, or shell check commands). The controller evaluates gates periodically and dispatches order formulas when they are due.
gc order
SubcommandDescription
gc order checkCheck which orders are due to run
gc order historyShow order execution history
gc order listList available orders
gc order runExecute an order manually
gc order showShow details of an order

gc order check

Evaluate gate conditions for all orders and show which are due. Prints a table with each order’s gate, due status, and reason. Returns exit code 0 if any order is due, 1 if none are due.
gc order check

gc order history

Show execution history for orders. Queries bead history for past order runs. Optionally filter by order name. Use —rig to filter by rig.
gc order history [name] [flags]
FlagTypeDefaultDescription
--rigstringrig name to filter order history

gc order list

List all available orders with their gate type, schedule, and target pool. Scans formula layers for formulas that have order metadata (gate, interval, schedule, check, pool).
gc order list

gc order run

Execute an order manually, bypassing its gate conditions. Instantiates a wisp from the order’s formula and routes it to the target pool (if configured). Useful for testing orders or triggering them outside their normal schedule. Use —rig to disambiguate same-name orders in different rigs.
gc order run <name> [flags]
FlagTypeDefaultDescription
--rigstringrig name to disambiguate same-name orders

gc order show

Display detailed information about a named order. Shows the order name, description, formula reference, gate type, scheduling parameters, check command, target pool, and source file. Use —rig to disambiguate same-name orders in different rigs.
gc order show <name> [flags]
FlagTypeDefaultDescription
--rigstringrig name to disambiguate same-name orders

gc pack

Manage remote pack sources that provide agent configurations. Packs are git repositories containing pack.toml files that define agent configurations for rigs. They are cached locally and can be pinned to specific git refs.
gc pack
SubcommandDescription
gc pack fetchClone missing and update existing remote packs
gc pack listShow remote pack sources and cache status

gc pack fetch

Clone missing and update existing remote pack caches. Fetches all configured pack sources from their git repositories, updates the local cache, and writes a lockfile with commit hashes for reproducibility. Automatically called during “gc start”.
gc pack fetch

gc pack list

Show configured pack sources with their cache status. Displays each pack’s name, source URL, git ref, cache status, and locked commit hash (if available).
gc pack list

gc prime

Outputs the behavioral prompt for an agent. Use it to prime any CLI coding agent with city-aware instructions: claude “(gcprimemayor)"codexprompt"(gc prime mayor)" codex --prompt "(gc prime worker)” Runtime hook profiles may call gc prime --hook. When agent-name is omitted, GC_AGENT is used automatically. If agent-name matches a configured agent with a prompt_template, that template is output. Otherwise outputs a default worker prompt.
gc prime [agent-name] [flags]
FlagTypeDefaultDescription
--hookboolcompatibility mode for runtime hook invocations

gc register

Register a city directory with the machine-wide supervisor. If no path is given, registers the current city (discovered from cwd). Registration is idempotent — registering the same city twice is a no-op. The supervisor is started if needed and immediately reconciles the city.
gc register [path]

gc restart

Restart the city by stopping it then starting it again. Equivalent to running “gc stop” followed by “gc start”. Under supervisor mode this unregisters the city, then re-registers it and triggers an immediate reconcile.
gc restart [path]

gc resume

Resume a suspended city by clearing workspace.suspended in city.toml. Restores normal operation: the reconciler will spawn agents again and gc hook/prime will return work. Use “gc agent resume” to resume individual agents, or “gc rig resume” for rigs.
gc resume [path]

gc rig

Manage rigs (external project directories) registered with the city. Rigs are project directories that the city orchestrates. Each rig gets its own beads database, agent hooks, and cross-rig routing. Agents are scoped to rigs via their “dir” field.
gc rig
SubcommandDescription
gc rig addRegister a project as a rig
gc rig listList registered rigs
gc rig restartRestart all agents in a rig
gc rig resumeResume a suspended rig
gc rig statusShow rig status and agent running state
gc rig suspendSuspend a rig (reconciler will skip its agents)

gc rig add

Register an external project directory as a rig. Initializes beads database, installs agent hooks if configured, generates cross-rig routes, and appends the rig to city.toml. If the target directory doesn’t exist, it is created. Use —include to apply a pack directory that defines the rig’s agent configuration. Use —start-suspended to add the rig in a suspended state (dormant-by-default). The rig’s agents won’t spawn until explicitly resumed with “gc rig resume”.
gc rig add <path> [flags]
Example:
gc rig add /path/to/project
  gc rig add ./my-project --include packs/gastown
  gc rig add ./my-project --include packs/gastown --start-suspended
FlagTypeDefaultDescription
--includestringpack directory for rig agents
--start-suspendedbooladd rig in suspended state (dormant-by-default)

gc rig list

List all registered rigs with their paths, prefixes, and beads status. Shows the HQ rig (the city itself) and all configured rigs. Each rig displays its bead ID prefix and whether its beads database is initialized.
gc rig list

gc rig restart

Kill all agent sessions belonging to a rig. The reconciler will restart the agents on its next tick. This is a quick way to force-refresh all agents working on a particular project.
gc rig restart <name>

gc rig resume

Resume a suspended rig by clearing suspended in city.toml. The reconciler will start the rig’s agents on its next tick.
gc rig resume <name>

gc rig status

Show rig status and agent running state
gc rig status <name>

gc rig suspend

Suspend a rig by setting suspended=true in city.toml. All agents scoped to the suspended rig are effectively suspended — the reconciler skips them and gc hook returns empty. The rig’s beads database remains accessible. Use “gc rig resume” to restore.
gc rig suspend <name>

gc runtime

Process-intrinsic runtime operations called by agent code from within sessions. These commands read and write session metadata to coordinate lifecycle events (drain, restart) between agents and the controller. They are designed to be called from within running agent sessions, not by humans.
gc runtime
SubcommandDescription
gc runtime drainSignal an agent to drain (wind down gracefully)
gc runtime drain-ackAcknowledge drain — signal the controller to stop this session
gc runtime drain-checkCheck if this agent is draining (exit 0 = draining)
gc runtime request-restartRequest controller restart this session (blocks until killed)
gc runtime undrainCancel drain on an agent

gc runtime drain

Signal an agent to drain — wind down its current work gracefully. Sets a GC_DRAIN metadata flag on the session. The agent should check for drain status periodically (via “gc runtime drain-check”) and finish its current task before exiting. Use “gc runtime undrain” to cancel.
gc runtime drain <name>

gc runtime drain-ack

Acknowledge a drain signal — tell the controller to stop this session. Sets GC_DRAIN_ACK metadata on the session. The controller will stop the session on its next reconcile tick. Call this after the agent has finished its current work in response to a drain signal.
gc runtime drain-ack [name]

gc runtime drain-check

Check if this agent is currently draining. Returns exit code 0 if draining, 1 if not. Designed for use in conditionals: “if gc runtime drain-check; then finish-up; fi”. Uses GCAGENTandGC_AGENT and GC_CITY env vars when called without arguments.
gc runtime drain-check [name]

gc runtime request-restart

Signal the controller to stop and restart this agent session. Sets GC_RESTART_REQUESTED metadata on the session, then blocks forever. The controller will stop the session on its next reconcile tick and restart it fresh. The blocking prevents the agent from consuming more context while waiting. This command is designed to be called from within an agent session (uses GC_AGENT and GC_CITY env vars). It emits an agent.draining event before blocking.
gc runtime request-restart

gc runtime undrain

Cancel a pending drain signal on an agent. Clears the GC_DRAIN and GC_DRAIN_ACK metadata flags, allowing the agent to continue normal operation.
gc runtime undrain <name>

gc service

Inspect workspace services
gc service
SubcommandDescription
gc service doctorShow detailed workspace service status
gc service listList workspace services

gc service doctor

Show detailed workspace service status
gc service doctor <name>

gc service list

List workspace services
gc service list

gc session

Create, resume, suspend, and close persistent conversations with agents. Sessions are conversations backed by agent templates. They can be suspended to free resources and resumed later with full conversation continuity.
gc session
SubcommandDescription
gc session attachAttach to (or resume) a chat session
gc session closeClose a session permanently
gc session killForce-kill session runtime (reconciler restarts)
gc session listList chat sessions
gc session logsShow session logs for an agent
gc session newCreate a new chat session from an agent template
gc session nudgeSend a text message to a running agent session
gc session peekView session output without attaching
gc session pruneClose old suspended sessions
gc session renameRename a session
gc session suspendSuspend a session (save state, free resources)
gc session waitRegister a dependency wait for a session
gc session wakeWake a session (clear hold and quarantine)

gc session attach

Attach to a running session or resume a suspended one. If the session is active with a live tmux session, reattaches. If the session is suspended or the tmux session died, resumes using the provider’s resume mechanism (if supported) or restarts. Accepts a session ID (e.g., gc-42) or template name (e.g., overseer).
gc session attach <session-id-or-name>

gc session close

End a conversation. Stops the runtime if active and closes the bead. Accepts a session ID (e.g., gc-42) or template name (e.g., overseer).
gc session close <session-id-or-name>

gc session kill

Force-kill the runtime process for a session without changing its bead state. The session remains marked as active, so the reconciler will detect the dead process and restart it according to the session’s lifecycle rules. This is useful for unsticking a session without losing its conversation history. Accepts a session ID (e.g., gc-42) or template name (e.g., overseer).
gc session kill <session-id-or-name>

gc session list

List all chat sessions. By default shows active and suspended sessions.
gc session list [flags]
FlagTypeDefaultDescription
--jsonboolJSON output
--statestringfilter by state: “active”, “suspended”, “closed”, “all”
--templatestringfilter by template name

gc session logs

Show structured session log messages from an agent’s JSONL session file. Reads the agent’s session log, resolves the conversation DAG, and prints messages in chronological order. Searches default paths (~/.claude/projects/) and any extra paths from [daemon] observe_paths in city.toml. Use —tail to control how many compaction segments to show (0 = all). Use -f to follow new messages as they arrive.
gc session logs <agent-name> [flags]
Example:
gc session logs mayor
  gc session logs mayor --tail 0
  gc session logs myrig/polecat-1 -f
FlagTypeDefaultDescription
-f, --followboolFollow new messages as they arrive
--tailint1Number of compaction segments to show (0 = all)

gc session new

Create a new persistent conversation from an agent template defined in city.toml. By default, attaches the terminal after creation.
gc session new <template> [flags]
Example:
gc session new helper
  gc session new helper --title "debugging auth"
  gc session new helper --no-attach
FlagTypeDefaultDescription
--no-attachboolcreate session without attaching
--titlestringhuman-readable session title

gc session nudge

Send text input to a running agent session via the runtime provider. The message is delivered as text content to the session’s input. This is equivalent to typing the message into the session’s terminal. Accepts a session ID, session name, or agent name. Multi-word messages are joined automatically.
gc session nudge <id-or-name> <message...> [flags]
FlagTypeDefaultDescription
--deliverystringwait-idledelivery mode: immediate, wait-idle, or queue

gc session peek

View session output without attaching
gc session peek <session-id-or-name> [flags]
FlagTypeDefaultDescription
--linesint50number of lines to capture

gc session prune

Close suspended sessions older than a given age. Only suspended sessions are affected — active sessions are never pruned.
gc session prune [flags]
Example:
gc session prune --before 7d
  gc session prune --before 24h
FlagTypeDefaultDescription
--beforestring7dprune sessions older than this duration (e.g., 7d, 24h)

gc session rename

Rename a session
gc session rename <session-id-or-name> <title>

gc session suspend

Suspend an active session by stopping its runtime process. The session bead persists and can be resumed later. Accepts a session ID (e.g., gc-42) or template name (e.g., overseer).
gc session suspend <session-id-or-name>

gc session wait

Register a dependency wait for a session
gc session wait [session-id-or-name] [flags]
FlagTypeDefaultDescription
--anyboolwake when any watched bead closes (default: all)
--notestringreminder text delivered when the wait is satisfied
--on-beadsstringSlicebead IDs to watch
--sleepboolset wait hold so the session can drain to sleep

gc session wake

Release a user hold and/or crash-loop quarantine on a session. After waking, the reconciler will start the session on its next tick if it has wake reasons (e.g., a matching config agent). If the session has no wake reasons, it remains asleep. Accepts a session ID (e.g., gc-42) or template name (e.g., overseer).
gc session wake <session-id-or-name>
Example:
gc session wake gc-42
  gc session wake overseer

gc skill

Show curated command reference for a Gas City topic. Without arguments, lists available topics. With a topic name, prints the full command reference for that topic.
gc skill [topic]
Example:
gc skill work       # beads command reference
  gc skill dispatch   # sling and formula reference
  gc skill            # list all topics

gc sling

Route a bead to an agent or pool using the target’s sling_query. The target is an agent qualified name (e.g. “mayor” or “hello-world/polecat”). The second argument is a bead ID, a formula name when —formula is set, or arbitrary text (which auto-creates a task bead). When target is omitted, the bead’s rig prefix is used to look up the rig’s default_sling_target from config. Requires —formula to have an explicit target. Inline text also requires an explicit target. With —formula, a wisp (ephemeral molecule) is instantiated from the formula and its root bead is routed to the target. Examples: gc sling my-rig/claude BL-42 # route existing bead gc sling my-rig/claude “write a README” # create bead from text, then route gc sling mayor code-review —formula # instantiate formula, route wisp echo “fix login” | gc sling mayor —stdin # read bead text from stdin
gc sling [target] <bead-or-formula-or-text> [flags]
FlagTypeDefaultDescription
-n, --dry-runboolshow what would be done without executing
--forceboolsuppress warnings and allow cross-rig routing
-f, --formulabooltreat argument as formula name
--mergestringmerge strategy: direct, mr, or local
--no-convoyboolskip auto-convoy creation
--no-formulaboolsuppress default formula (route raw bead)
--nudgeboolnudge target after routing
--onstringattach wisp from formula to bead before routing
--ownedboolmark auto-convoy as owned (skip auto-close)
--stdinboolread bead text from stdin (first line = title, rest = description)
-t, --titlestringwisp root bead title (with —formula or —on)
--varstringArrayvariable substitution for formula (key=value, repeatable)

gc start

Start the city under the machine-wide supervisor. Requires an existing city bootstrapped by “gc init”. Fetches remote packs as needed, registers the city with the machine-wide supervisor, ensures the supervisor is running, and triggers immediate reconciliation. Use “gc supervisor run” for foreground operation.
gc start [path] [flags]
Example:
gc start
  gc start ~/my-city
  gc start --dry-run
  gc supervisor run
FlagTypeDefaultDescription
-n, --dry-runboolpreview what agents would start without starting them

gc status

Shows a city-wide overview: controller state, suspension, all agents with running status, rigs, and a summary count.
gc status [path] [flags]
FlagTypeDefaultDescription
--jsonboolOutput in JSON format

gc stop

Stop all agent sessions in the city with graceful shutdown. Sends interrupt signals to running agents, waits for the configured shutdown timeout, then force-kills any remaining sessions. Also stops the Dolt server and cleans up orphan sessions. If a controller is running, delegates shutdown to it.
gc stop [path]

gc supervisor

Manage the machine-wide supervisor. The supervisor manages all registered cities from a single process, hosting a unified API server. Use “gc init”, “gc start”, or “gc register” to add cities.
gc supervisor
SubcommandDescription
gc supervisor installInstall the supervisor as a platform service
gc supervisor logsTail the supervisor log file
gc supervisor reloadTrigger immediate reconciliation of all cities
gc supervisor runRun the machine-wide supervisor in the foreground
gc supervisor startStart the machine-wide supervisor in the background
gc supervisor statusCheck if the supervisor is running
gc supervisor stopStop the machine-wide supervisor
gc supervisor uninstallRemove the platform service

gc supervisor install

Install the machine-wide supervisor as a platform service that starts on login.
gc supervisor install

gc supervisor logs

Tail the machine-wide supervisor log file. Shows recent log output from background and service-managed supervisor runs.
gc supervisor logs [flags]
FlagTypeDefaultDescription
-f, --followboolfollow log output
-n, --linesint50number of lines to show

gc supervisor reload

Send a reload signal to the running supervisor, causing it to immediately re-read the registry and reconcile all cities. Use this after killing a child process to force the supervisor to detect the change and restart it without waiting for the next patrol tick.
gc supervisor reload

gc supervisor run

Run the machine-wide supervisor in the foreground. This is the canonical long-running control loop. It reads ~/.gc/cities.toml for registered cities, manages them from one process, and hosts the shared API server.
gc supervisor run

gc supervisor start

Start the machine-wide supervisor in the background. This forks “gc supervisor run”, verifies it became ready, and returns.
gc supervisor start

gc supervisor status

Check if the supervisor is running
gc supervisor status

gc supervisor stop

Stop the running machine-wide supervisor and all its cities.
gc supervisor stop

gc supervisor uninstall

Remove the platform service and stop the machine-wide supervisor.
gc supervisor uninstall

gc suspend

Suspends the city by setting workspace.suspended = true in city.toml. This inherits downward — when the city is suspended, all agents are effectively suspended regardless of their individual suspended fields. The reconciler won’t spawn agents, gc hook/prime return empty. Use “gc resume” to restore.
gc suspend [path]

gc unregister

Remove a city from the machine-wide supervisor registry. If no path is given, unregisters the current city (discovered from cwd). If the supervisor is running, it immediately stops managing the city.
gc unregister [path]

gc version

Print the gc version string. Use gc version --long to include git commit and build date metadata.
gc version

gc wait

Inspect and manage durable session waits
gc wait
SubcommandDescription
gc wait cancelCancel a wait
gc wait inspectShow details for a wait
gc wait listList durable waits
gc wait readyManually mark a wait ready

gc wait cancel

Cancel a wait
gc wait cancel <wait-id>

gc wait inspect

Show details for a wait
gc wait inspect <wait-id>

gc wait list

List durable waits
gc wait list [flags]
FlagTypeDefaultDescription
--sessionstringfilter by session ID
--statestringfilter by wait state

gc wait ready

Manually mark a wait ready
gc wait ready <wait-id>
Last modified on March 19, 2026