Skip to main content

Documentation Index

Fetch the complete documentation index at: https://gascityinc-5c0069dd-work-default-pack-registry.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

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)
--rigstringrig name or path (default: discover from cwd)

gc

Gas City CLI — orchestration-builder for multi-agent workflows
gc [flags]
SubcommandDescription
gc agentManage agent configuration
gc bdRun bd in the correct rig directory
gc beadsManage the beads provider
gc build-imageBuild a prebaked agent container image
gc citiesList registered cities
gc completionGenerate the autocompletion script for the specified shell
gc configInspect and validate city configuration
gc convergeManage convergence loops (bounded iterative refinement)
gc convoyManage convoys — graphs of related work
gc dashboardWeb dashboard for monitoring the supervisor and managed cities
gc doctorCheck workspace health
gc dolt-cleanupFind and remove orphaned Dolt databases (Go-side core)
gc eventEvent operations
gc eventsShow events from the GC API
gc formulaManage and inspect formulas
gc graphShow dependency graph for beads
gc handoffSend handoff mail and restart controller-managed sessions
gc helpHelp about any command
gc hookCheck for available work
gc importManage pack imports
gc initInitialize a new city
gc mailSend and receive messages between agents and humans
gc mcpInspect projected MCP config
gc nudgeInspect and deliver deferred nudges
gc orderManage orders (scheduled and event-driven dispatch)
gc packManage remote pack sources
gc primeOutput the behavioral prompt for an agent
gc registerRegister a city with the machine-wide supervisor
gc reloadReload the current city’s config without restarting the city/controller
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 shellManage the Gas City shell integration hook
gc skillList visible skills
gc slingRoute work to a session config or agent
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 traceInspect and control session reconciler tracing
gc unregisterRemove a city from the machine-wide supervisor
gc versionPrint gc version
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 scaffold
gc agent resumeResume a suspended agent
gc agent suspendSuspend an agent (reconciler will skip it)

gc agent add

Add a new agent scaffold under agents/<name>/. Creates agents/<name>/prompt.template.md and, when needed, agents/<name>/agent.toml. These files live in the city directory and do not append [[agent]] blocks to city.toml. Use —prompt-template to copy prompt content from an existing file into the canonical prompt.template.md location. Use —dir to record a rig or working-directory prefix in agent.toml. Use —suspended to scaffold the agent in a suspended state.
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 ./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 its durable config. 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 its durable config. 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 bd

Run a bd command routed to the correct rig directory. When beads belong to a rig (not the city root), bd must run from the rig directory to find the correct .beads database. This command resolves the rig automatically from the —rig flag or by detecting the bead prefix in the arguments. All arguments after “gc bd” are forwarded to bd unchanged. gc bd forces BD_EXPORT_AUTO=false to prevent bd’s git auto-export hook from wedging the wrapper after printing command output. If you need auto-export behavior, invoke bd directly.
gc bd [bd-args...]
Example:
gc bd --rig my-project list
  gc bd --rig my-project create "New task"
  gc bd show my-project-abc          # auto-detects rig from bead prefix
  gc bd list --rig my-project -s open

gc beads

Manage the beads provider (backing store for issue tracking). Subcommands for topology operations, health checking, and diagnostics.
gc beads
SubcommandDescription
gc beads cityManage canonical city endpoint topology
gc beads healthCheck beads provider health

gc beads city

Manage the canonical city endpoint topology for bd-backed beads stores. Use use-managed to make the city GC-managed again. Use use-external to pin the city to an external Dolt endpoint and rewrite inherited rig mirrors.
gc beads city
SubcommandDescription
gc beads city use-externalSet the city endpoint to an external Dolt server
gc beads city use-managedSet the city endpoint to GC-managed

gc beads city use-external

Set the city endpoint to an external Dolt server
gc beads city use-external [flags]
FlagTypeDefaultDescription
--adopt-unverifiedboolrecord the endpoint without live validation
--dry-runboolshow the canonical changes without writing files
--hoststringexternal Dolt host
--portstringexternal Dolt port
--userstringexternal Dolt user

gc beads city use-managed

Set the city endpoint to GC-managed
gc beads city use-managed [flags]
FlagTypeDefaultDescription
--dry-runboolshow the canonical changes without writing files

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
SubcommandDescription
gc cities listList registered cities

gc cities list

List registered cities
gc cities list

gc completion

Generate the autocompletion script for gc for the specified shell. See each sub-command’s help for details on how to use the generated script.
gc completion
SubcommandDescription
gc completion bashGenerate the autocompletion script for bash
gc completion fishGenerate the autocompletion script for fish
gc completion powershellGenerate the autocompletion script for powershell
gc completion zshGenerate the autocompletion script for zsh

gc completion bash

Generate the autocompletion script for the bash shell. This script depends on the ‘bash-completion’ package. If it is not installed already, you can install it via your OS’s package manager. To load completions in your current shell session: source <(gc completion bash) To load completions for every new session, execute once:

Linux:

gc completion bash > /etc/bash_completion.d/gc

macOS:

gc completion bash > $(brew —prefix)/etc/bash_completion.d/gc You will need to start a new shell for this setup to take effect.
gc completion bash
FlagTypeDefaultDescription
--no-descriptionsbooldisable completion descriptions

gc completion fish

Generate the autocompletion script for the fish shell. To load completions in your current shell session: gc completion fish | source To load completions for every new session, execute once: gc completion fish > ~/.config/fish/completions/gc.fish You will need to start a new shell for this setup to take effect.
gc completion fish [flags]
FlagTypeDefaultDescription
--no-descriptionsbooldisable completion descriptions

gc completion powershell

Generate the autocompletion script for powershell. To load completions in your current shell session: gc completion powershell | Out-String | Invoke-Expression To load completions for every new session, add the output of the above command to your powershell profile.
gc completion powershell [flags]
FlagTypeDefaultDescription
--no-descriptionsbooldisable completion descriptions

gc completion zsh

Generate the autocompletion script for the zsh shell. If shell completion is not already enabled in your environment you will need to enable it. You can execute the following once: echo “autoload -U compinit; compinit” >> ~/.zshrc To load completions in your current shell session: source <(gc completion zsh) To load completions for every new session, execute once:

Linux:

gc completion zsh > ”${fpath[1]}/_gc”

macOS:

gc completion zsh > $(brew —prefix)/share/zsh/site-functions/_gc You will need to start a new shell for this setup to take effect.
gc completion zsh [flags]
FlagTypeDefaultDescription
--no-descriptionsbooldisable completion descriptions

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 config with provenance annotations
gc config showDump the resolved city configuration as TOML

gc config explain

Show the resolved configuration with provenance. For agents (default): displays every resolved field with an annotation showing which config file provided the value. Use —rig and —agent to filter. For providers (—provider): displays the resolved ProviderSpec along with per-field and per-map-key attribution — which chain layer (builtin:X or providers.Y) contributed each value. Useful for debugging base-chain inheritance. Use —json to emit machine-readable output (providers only).
gc config explain [flags]
Example:
gc config explain
  gc config explain --agent mayor
  gc config explain --rig my-project
  gc config explain --provider codex-max
  gc config explain --provider codex-max --json
  gc config explain -f overlay.toml --agent polecat
FlagTypeDefaultDescription
--agentstringfilter to a specific agent name
-f, --filestringArrayadditional config files to layer (can be repeated)
--jsonboolemit JSON (requires —provider)
--providerstringexplain a provider’s resolved chain instead of agents
--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-timeoutstring5m0sGate 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 — graphs of related work beads. A convoy is a named graph of beads with dependencies. Simple convoys group related issues via parent-child relationships. Complex convoys use formula-compiled DAGs with control beads for orchestration.
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 controlExecute control beads or run the control-dispatcher loop
gc convoy createCreate a convoy and optionally track issues
gc convoy deleteClose or delete a convoy and all its beads
gc convoy delete-sourceClose workflows sourced from a bead
gc convoy landLand an owned convoy (terminate + cleanup)
gc convoy listList open convoys with progress
gc convoy reopen-sourceReopen a source bead after workflow cleanup
gc convoy statusShow detailed convoy status
gc convoy strandedFind convoys with ready work but no workers
gc convoy targetSet the target branch on a convoy

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 control

Process a single control bead, or run the control-dispatcher loop with —serve to continuously process ready control beads. Use —follow <agent> to filter the serve loop to a specific agent template.
gc convoy control [bead-id] [flags]
FlagTypeDefaultDescription
--followstringRun serve loop filtered to a specific agent template
--serveboolRun the control-dispatcher loop (continuous)

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
  gc convoy create auth-rewrite --owned --target integration/auth-rewrite
FlagTypeDefaultDescription
--mergestringmerge strategy: direct, mr, local
--notifystringnotification target on completion
--ownedboolmark convoy as owned (manual lifecycle, no auto-close)
--ownerstringconvoy owner (who manages it)
--targetstringtarget branch inherited by child work beads

gc convoy delete

Close all open beads in a convoy, or delete them. Searches all stores (city + rigs) for the convoy root and all beads with matching gc.root_bead_id. Without —force, shows a preview. By default, beads are closed with gc.outcome=skipped. Use —delete to remove them from the store via bd delete —cascade —force.
gc convoy delete <convoy-id> [flags]
FlagTypeDefaultDescription
--deleteboolDelete beads from the store instead of closing
-f, --forceboolActually close/delete (without this, shows preview)

gc convoy delete-source

Find every live workflow root sourced from the given bead and close its subtree. By default this is a preview. Use —apply to mutate. Use —delete with —apply to also delete closed beads.
gc convoy delete-source <source-bead-id> [flags]
FlagTypeDefaultDescription
--applyboolActually close/delete matched workflows
--deleteboolAlso delete beads from the store after closing
--rigstringSelect the rig store for the source bead
--store-refstringSelect the source bead store (city:<name> or rig:<name>)

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 reopen-source

Reopen a source bead after workflow cleanup
gc convoy reopen-source <source-bead-id> [flags]
FlagTypeDefaultDescription
--rigstringSelect the rig store for the source bead
--store-refstringSelect the source bead store (city:<name> or rig:<name>)

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 convoy target

Set the target branch metadata on a convoy. Child work beads can inherit this target branch when slung with feature-branch formulas such as mol-polecat-work.
gc convoy target <convoy-id> <branch>

gc dashboard

Open the static GC dashboard against the machine-wide supervisor API. Without a city in scope, the dashboard shows supervisor-level state and managed city tabs. From a city directory or with —city, city-specific panels and action forms are enabled for that city.
gc dashboard [flags]
FlagTypeDefaultDescription
--apistringGC API server URL override (auto-discovered by default)
--portint8080HTTP port
SubcommandDescription
gc dashboard serveStart the web dashboard

gc dashboard serve

Start the static GC dashboard against the machine-wide supervisor API. Without a city in scope, the dashboard shows supervisor-level state and managed city tabs. From a city directory or with —city, city-specific panels and action forms are enabled for that city.
gc dashboard serve [flags]
FlagTypeDefaultDescription
--apistringGC API server URL override (auto-discovered by default)
--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 dolt-cleanup

gc dolt-cleanup is the Go-side implementation of the operational Dolt cleanup tool. It resolves the Dolt server port via the AD-04 chain (—port > city dolt.port > <rigRoot>/.beads/dolt-server.port > 3307), drops stale test/agent databases, calls DOLT_PURGE_DROPPED_DATABASES to reclaim disk, and reaps orphaned dolt sql-server processes left over from leaked test harnesses. Invalid explicit ports and unreadable or invalid city/rig port settings fail closed before cleanup stages run; only absent rig port files can reach the legacy default. The legacy default is a connection fallback only; it does not protect port 3307 from orphan-process reaping. Dry-run by default. Pass —force to actually drop, purge, and kill. Pass —max-orphan-dbs with —force to refuse all destructive cleanup stages if the live apply-time stale database count exceeds the scan-time threshold. The default 0 disables this guard; negative values are rejected before any city lookup or cleanup stage runs. Active rig dolt servers, registered rig databases, active test temp roots, and processes outside the test-config-path allowlist (/tmp/Test*, os.TempDir()/Test*, known Gas City test prefixes, ~/.gotmp/Test*) are always protected — see the PROTECTED section of the report. Destructive drops are limited to known stale test database name shapes and conservative SQL identifier characters; skipped stale matches are reported in dropped.skipped. Rig dolt_database names used for purge must use the same identifier shape: ASCII letters, digits, underscores, and non-leading hyphens. Missing or silent rig metadata disables forced drop/purge because the live database name cannot be proven safe. JSON envelope schema is stable: gc.dolt.cleanup.v1. Automation that uses —json must inspect summary.errors_total and errors, and must also refuse to invoke —force when dry-run force_blockers is non-empty. force_blockers reports conditions that would block forced cleanup without incrementing errors_total. The rig-protection blocker is intentionally global: missing or silent rig metadata prevents forced drop/purge because the command cannot prove all registered rig databases are protected. Cleanup stage errors are reported in the envelope even when the command can still return successfully after emitting the report.
gc dolt-cleanup [flags]
FlagTypeDefaultDescription
--forceboolactually drop, purge, and kill orphaned resources (default: dry-run)
--jsonboolemit JSON envelope (gc.dolt.cleanup.v1)
--max-orphan-dbsintwith —force, refuse cleanup when live stale database count exceeds this limit
--portstringoverride the resolved Dolt port
--probeboolTCP-probe the resolved port; fail if unreachable

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: GCALIAS,elseGC_ALIAS, else GC_AGENT, else $GC_SESSION_ID, else “human”)
--messagestringEvent message
--payloadstringJSON payload to attach to the event
--subjectstringEvent subject (e.g. bead ID)

gc events

Show events from the GC API with optional filtering. The API is the source of truth for both city-scoped and supervisor-scoped events. In a city directory (or with —city), this command reflects the city’s /v0/city/{cityName}/events and /stream endpoints. Without a city in scope, it reflects the supervisor’s /v0/events and /stream endpoints. List, watch, and follow output are always JSON Lines. Each line is one API DTO or SSE envelope.
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
  gc events --follow --after-cursor city-a:12,city-b:9
FlagTypeDefaultDescription
--afteruint64Resume from this city event sequence number (city scope only)
--after-cursorstringResume from this supervisor event cursor (supervisor scope only)
--apistringGC API server URL override (auto-discovered by default)
--followboolContinuously stream events as they arrive
--payload-matchstringArrayFilter by payload field (key=value or key.subkey=value, repeatable)
--seqboolPrint the current head cursor 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 or buffered replay)

gc formula

Manage and inspect formulas
gc formula
SubcommandDescription
gc formula cookInstantiate a formula into the current bead store
gc formula listList available formulas
gc formula showShow a compiled formula recipe

gc formula cook

Compile and instantiate a formula as real beads in the current store. This is a low-level workflow construction tool. It creates the formula root and all compiled step beads without routing any work. With —attach=<bead-id>, the sub-DAG is created as children of the given bead. The bead gains a blocking dependency on the sub-DAG root, so it won’t close until the sub-DAG completes. This is the core primitive for late-bound DAG expansion — any agent, script, or workflow step can call it to expand a bead into a sub-workflow at runtime.
gc formula cook <formula-name> [flags]
FlagTypeDefaultDescription
--attachstringattach sub-DAG to existing bead (bead gains blocking dep on sub-DAG root)
--metastringArrayset root bead metadata after cook (key=value, repeatable)
-t, --titlestringoverride root bead title
--varstringArrayvariable substitution for formula (key=value, repeatable)

gc formula list

List all formulas available in the city’s formula search paths. Formulas are discovered from city-level and rig-level formula directories configured via packs and formulas_dir settings.
gc formula list

gc formula show

Compile and display a formula recipe. By default, shows the recipe with {{variable}} placeholders intact. Use —var to substitute variables and preview the resolved output. Examples: gc formula show mol-feature gc formula show mol-feature —var title=“Auth system” —var branch=main
gc formula show <formula-name> [flags]
FlagTypeDefaultDescription
--varstringArrayvariable substitution for preview (key=value)

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. 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. If the current session is controller-restartable, requests a restart and blocks until the controller stops the session. For on-demand configured named sessions, sends mail and returns without requesting restart because the controller cannot restart the user-attended process. For controller-restartable sessions, equivalent to: gc mail send $GC_ALIAS <subject> [message] gc runtime request-restart Under normal operation the controller stops controller-restartable self-handoff sessions before this command returns. If the controller does not act within a bounded timeout, gc handoff exits 1 with a diagnostic instead of blocking indefinitely. If interrupted, the restart request remains set for the controller to process on its next reconcile tick. Auto handoff (—auto): sends mail to self and returns without requesting a restart. This is for PreCompact hooks, where the provider is already managing the context compaction lifecycle. Remote handoff (—target): sends mail to a target session. If the target is controller-restartable, kills it so the reconciler restarts it with the handoff mail waiting. For on-demand configured named targets, sends mail and returns without killing the session. For controller-restartable targets, equivalent to: gc mail send <target> <subject> [message] gc session kill <target> Self-handoff requires session context (GC_ALIAS or GC_SESSION_ID, plus GC_SESSION_NAME and city context env). Remote handoff accepts a session alias or ID. Subject is required unless —auto is set.
gc handoff [subject] [message] [flags]
FlagTypeDefaultDescription
--autoboolSend handoff mail without requesting restart (for PreCompact hooks)
--hook-formatstringformat hook output for a provider
--targetstringRemote session alias or ID to handoff (kills only controller-restartable sessions)

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: silent legacy Stop-hook compatibility; skips the work query and always exits 0. The agent is determined from $GC_AGENT or a positional argument.
gc hook [agent] [flags]
FlagTypeDefaultDescription
--injectboolsilent legacy Stop-hook compatibility; skip work query and exit 0

gc import

Manage pack imports
gc import
SubcommandDescription
gc import addAdd a pack import
gc import checkValidate installed pack import state
gc import installInstall imports from pack.toml and packs.lock
gc import listList imported packs
gc import migrateMigrate a V1 city layout to the V2 pack shape
gc import removeRemove a pack import
gc import upgradeUpgrade imported packs within their constraints
gc import whyExplain why an import is present

gc import add

Add a pack import
gc import add <source> [flags]
FlagTypeDefaultDescription
--namestringLocal binding name override
--versionstringVersion constraint for git-backed imports

gc import check

Validate installed pack import state
gc import check

gc import install

Install imports from pack.toml and packs.lock
gc import install

gc import list

List imported packs
gc import list [flags]
FlagTypeDefaultDescription
--treeboolShow the import dependency tree

gc import migrate

Rewrite a legacy city into the V2 migration shape. Moves workspace.includes into pack imports, converts [[agent]] tables into agents/<name>/ directories, and stages prompt/overlay/namepool assets into their V2 locations.
gc import migrate [flags]
FlagTypeDefaultDescription
--dry-runboolprint what would change without writing

gc import remove

Remove a pack import
gc import remove <name>

gc import upgrade

Upgrade imported packs within their constraints
gc import upgrade [name]

gc import why

Explain why an import is present
gc import why <name-or-source>

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 plus pack.toml, city.toml, the standard top-level directories, and .template.md prompt templates, then records bundled default packs as explicit pack registry imports. Use —provider to create the default minimal city non-interactively, or —file to initialize from an existing TOML config file. Pass —preserve-existing to keep any pre-authored pack.toml, city.toml, or agent prompt files in the target directory (useful when bootstrapping a committed workspace — e.g. from a bootstrap.sh shipped in the repo).
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 --name my-city
  gc init --from ~/elan --name elan /city
  gc init --file examples/gastown.toml ~/bright-lights
  gc init --file city.toml --preserve-existing .
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
--namestringworkspace name (default: target directory basename)
--preserve-existingboolkeep any pre-authored pack.toml, city.toml, or agent prompt files instead of overwriting them
--providerstringbuilt-in workspace provider to use for the default mayor config
--skip-provider-readinessboolskip provider login/readiness checks during init and continue startup

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 one or more messages without reading them
gc mail checkCheck for unread mail (use —inject for hook output)
gc mail countShow total/unread message count
gc mail deleteDelete one or more messages (closes the beads)
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 a session alias or human
gc mail threadList all messages in a thread

gc mail archive

Close one or more message beads without displaying their contents. Use this to dismiss messages without reading them. Each message is marked as closed and will no longer appear in mail check or inbox results. When multiple IDs are passed, they are archived in a single batch round-trip.
gc mail archive <id>...

gc mail check

Check for unread mail addressed to a session alias or mailbox. 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 GCSESSIONID,GC_SESSION_ID, GC_ALIAS, $GC_AGENT, or “human”.
gc mail check [session] [flags]
Example:
gc mail check
  gc mail check --inject
  gc mail check mayor
FlagTypeDefaultDescription
--hook-formatstringformat hook output for a provider
--injectbooloutput <system-reminder> block for hook injection

gc mail count

Show total and unread message counts for a session alias or human. The recipient defaults to GCSESSIONID,GC_SESSION_ID, GC_ALIAS, $GC_AGENT, or “human”.
gc mail count [session]

gc mail delete

Delete one or more messages by closing the beads. Same effect as archive but with different user intent. When multiple IDs are passed, they are deleted in a single batch round-trip.
gc mail delete <id>...

gc mail inbox

List all unread messages for a session alias or human. Shows message ID, sender, subject, and body in a table. The recipient defaults to GCSESSIONID,GC_SESSION_ID, GC_ALIAS, $GC_AGENT, or “human”. Pass a session alias to view another inbox.
gc mail inbox [session]

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 —notify to nudge the recipient after replying. 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 a session alias or human. Creates a message bead addressed to the recipient. The sender defaults to GCSESSIONID,GC_SESSION_ID, GC_ALIAS, $GC_AGENT, 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 live sessions (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 myrig/witness -s "Need investigation" -m "Attach logs from the last failed run"
  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 live sessions (excludes sender and human)
--fromstringsender identity (default: GCSESSIONID,GC_SESSION_ID, GC_ALIAS, $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 or message ID, ordered by time.
gc mail thread <id>

gc mcp

Inspect the projected MCP catalog for a concrete target. Projected MCP is target-specific. Use “gc mcp list —agent <name>” when the agent has a single deterministic projection target from config, or “gc mcp list —session <id>” for a live session target.
gc mcp
SubcommandDescription
gc mcp listShow projected MCP servers

gc mcp list

Show the precedence-resolved MCP servers that Gas City would project into the provider-native config for one agent or session target.
gc mcp list [flags]
FlagTypeDefaultDescription
--agentstringshow the projected MCP config for this agent
--sessionstringshow the projected MCP config for this session

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 a session

gc nudge status

Show queued and dead-letter nudges for a session. Defaults to GCALIASorGC_ALIAS or GC_SESSION_ID when run inside a session.
gc nudge status [session]

gc order

Manage orders — scheduled or event-driven dispatch of formulas and scripts. Orders live in flat orders/<name>.toml files. Each order pairs a trigger condition (cooldown, cron, condition, event, or manual) with an action (a formula or an exec script). The controller evaluates triggers on each tick and dispatches work when a trigger opens.
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 sweep-trackingClose stale order-tracking beads

gc order check

Evaluate trigger conditions for all orders and show which are due. Prints a table with each order’s trigger, 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 trigger type, schedule, and target. Scans orders/ directories for flat .toml files defining trigger conditions, scheduling parameters, and target pools.
gc order list

gc order run

Execute an order manually, bypassing its trigger conditions. Instantiates a wisp from the order’s formula and routes it to the configured target (if any). 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, trigger type, scheduling parameters, check command, target, 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 order sweep-tracking

Close stale open order-tracking beads. This is intended for maintenance exec orders. It only closes tracking beads older than —stale-after so a fresh in-flight order is not interrupted.
gc order sweep-tracking [flags]
FlagTypeDefaultDescription
--quietboolsuppress success output
--stale-afterduration10m0sminimum age for an open tracking bead to be closed

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_ALIAS is used (falling back to GC_AGENT). If agent-name matches a configured agent with a prompt_template, that template is output. Otherwise outputs a default worker prompt. Pass —strict to fail on debugging mistakes instead of silently falling back to the default prompt. Strict errors on:
  • no city config found
  • city config fails to load
  • no agent name given (from args, GC_ALIAS, or GC_AGENT)
  • agent name not in city config (typo detection — the main use case)
  • agent’s prompt_template points at a file that cannot be read
Strict does NOT error on agents whose config intentionally lacks a prompt_template (a supported minimal config), on templates that render to empty output from valid conditional logic, or on suspended states (city or agent) — those are legitimate quiet states, not mistakes.
gc prime [agent-name] [flags]
FlagTypeDefaultDescription
--hookboolcompatibility mode for runtime hook invocations
--hook-formatstringformat hook output for a provider
--strictboolfail on missing city, missing or unknown agent, or unreadable prompt_template instead of falling back to the default prompt

gc register

Register a city directory with the machine-wide supervisor. If no path is given, registers the current city (discovered from cwd). Use —name to set the machine-local registration alias. The alias is stored in the machine-local supervisor registry and never written back to city.toml. When —name is omitted, the current effective city identity is used (site-bound workspace name if present, otherwise legacy workspace.name, otherwise the directory basename) — in every case city.toml is not modified. 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] [flags]
FlagTypeDefaultDescription
--namestringmachine-local alias for this city registration

gc reload

Force the current city controller to re-read effective config and process one reload tick without restarting the city/controller. Reload may fetch configured remote packs before recomputing effective config. Existing per-session restarts may still happen if normal config drift rules require them.
gc reload [path] [flags]
FlagTypeDefaultDescription
--asyncboolReturn after the controller accepts the reload request
--timeoutstring5mHow long to wait for reload completion

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 removeRemove a rig from the city
gc rig restartRestart all agents in a rig
gc rig resumeResume a suspended rig
gc rig set-endpointSet the canonical endpoint ownership for a 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; repeat the flag to compose multiple packs for one rig. Use —name to set the rig name explicitly (default: directory basename). Use —prefix to set the bead ID prefix explicitly (default: derived from name). Use —default-branch to set the rig’s mainline branch explicitly. By default, gc rig add probes the repo’s origin/HEAD (and falls back to the currently checked-out branch) and stores the result in city.toml so polecats and the refinery target the right branch without manual metadata patching. 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”. Use —adopt to register a directory that already has a fully initialized .beads/ directory (must include both metadata.json and config.yaml). Skips beads init; the git repo check remains informational.
gc rig add <path> [flags]
Example:
gc rig add /path/to/project
  gc rig add /path/to/project --name myrig
  gc rig add /path/to/project --prefix r1
  gc rig add /path/to/master-repo --default-branch master
  gc rig add ./my-project --include packs/gastown
  gc rig add ./my-project --include packs/planner --include packs/architect
  gc rig add ./my-project --include packs/gastown --start-suspended
  gc rig add /path/to/existing --adopt
FlagTypeDefaultDescription
--adoptbooladopt existing .beads/ directory (skip init)
--default-branchstringmainline branch (default: auto-detect from origin/HEAD or current branch)
--includestringArraypack directory for rig agents (repeatable)
--namestringrig name (default: directory basename)
--prefixstringbead ID prefix (default: derived from name)
--start-suspendedbooladd rig in suspended state (dormant-by-default)

gc rig list

List all registered rigs with their paths, prefixes, default branches, and beads status. Shows the HQ rig (the city itself) and all configured rigs. Each rig displays its bead ID prefix, recorded default branch when set, and whether its beads database is initialized.
gc rig list [flags]
FlagTypeDefaultDescription
--jsonboolOutput in JSON format

gc rig remove

Remove a rig from the current city’s configuration. Removes the rig entry from city.toml and removes its machine-local path binding from .gc/site.toml.
gc rig remove <name>
Example:
gc rig remove myrig

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 set-endpoint

Set the canonical endpoint ownership for a rig. Use —inherit to make a rig derive its endpoint from the current city topology. Use —external to pin the rig to its own external Dolt endpoint. Use —self to mark the rig as running its own local Dolt server on 127.0.0.1 at the given —port; while the city is in managed_city mode the command requires —force because the rig’s .beads/dolt-server.port mirror will no longer track the managed city Dolt. This command owns the rig’s canonical .beads/config.yaml topology state.
gc rig set-endpoint <rig> [flags]
Example:
gc rig set-endpoint frontend --inherit
  gc rig set-endpoint frontend --external --host db.example.com --port 3307
  gc rig set-endpoint frontend --external --host db.example.com --port 3307 --user agent --adopt-unverified
  gc rig set-endpoint frontend --self --port 28232 --force
  gc rig set-endpoint frontend --inherit --dry-run
FlagTypeDefaultDescription
--adopt-unverifiedboolrecord the endpoint without live validation
--dry-runboolshow the canonical changes without writing files
--externalboolset an explicit external endpoint for the rig
--forceboolacknowledge conflicting managed-city state when using —self
--hoststringexternal Dolt host
--inheritboolinherit the city endpoint
--portstringexternal Dolt port (required with —external or —self)
--selfboolmark the rig as running its own local Dolt on 127.0.0.1
--userstringexternal Dolt user

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 a session to drain (wind down gracefully)
gc runtime drain-ackAcknowledge drain — signal the controller to stop this session
gc runtime drain-checkCheck if a session is draining (exit 0 = draining)
gc runtime request-restartRequest controller restart this session (waits to be killed)
gc runtime undrainCancel drain on a session

gc runtime drain

Signal a session 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. Pass a session alias or ID. 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 session has finished its current work in response to a drain signal.
gc runtime drain-ack [name]

gc runtime drain-check

Check if a session 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”. Without arguments, uses the current session context.
gc runtime drain-check [name]

gc runtime request-restart

Signal the controller to stop and restart this session. Sets GC_RESTART_REQUESTED metadata on the session, then waits while the controller stops the session on its next reconcile tick and restarts it fresh. The wait keeps the agent idle so it does not consume more context in the interim. Under normal operation the controller SIGKILLs the process tree before this command returns. If the controller accepts the stop handoff, the runtime is already gone, or a SIGINT/SIGTERM is received, the command exits 0 cleanly. If the controller has not acted within a bounded timeout (max(5*PatrolInterval, 5min), capped at 30min) the command exits 1 with a diagnostic pointing at controller health. For on-demand configured named sessions, the controller cannot restart the user-attended process. In that case this command reports that restart was skipped and returns immediately. No session.draining event is emitted when restart is skipped. This command is designed to be called from within a session context. It emits a session.draining event before waiting.
gc runtime request-restart

gc runtime undrain

Cancel a pending drain signal on a session. Clears the GC_DRAIN and GC_DRAIN_ACK metadata flags, allowing the session to continue normal operation. Pass a session alias or ID.
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 restartRestart a workspace service

gc service doctor

Show detailed workspace service status
gc service doctor <name>

gc service list

List workspace services
gc service list

gc service restart

Stop and restart a workspace service by name. The controller closes the current service process and starts a fresh one. Useful after updating pack scripts without a full city restart.
gc service restart <name>

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 a session
gc session newCreate a new chat session from an agent template
gc session nudgeSend a text message to a running session
gc session peekView session output without attaching
gc session pinKeep a session awake
gc session pruneClose old suspended sessions
gc session renameRename a session
gc session resetRestart a session fresh while preserving the bead
gc session submitSubmit a message with semantic delivery intent
gc session suspendSuspend a session (save state, free resources)
gc session unpinRemove a session awake pin
gc session waitRegister a dependency wait for a session
gc session wakeWake a session (request start and clear holds)

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 session alias (e.g., mayor).
gc session attach <session-id-or-alias>

gc session close

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

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 session alias (e.g., mayor).
gc session kill <session-id-or-alias>

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 a session’s JSONL file. Reads the 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 print only the last N transcript entries (0 = all). Semantics match Unix ‘tail -n’: ‘—tail 5’ prints the final 5 entries, not the first 5. A single assistant turn with multiple tool-use blocks still counts as one entry. Compact-boundary dividers count as entries when they fall inside the final window. Compatibility note: before 1.0, —tail mapped to compaction segments. As of 1.0, —tail trims the displayed transcript entry window instead. The HTTP API’s tail query parameter still uses compaction-segment semantics. Use -f to follow new messages as they arrive.
gc session logs <session> [flags]
Example:
gc session logs mayor
  gc session logs mayor --tail 2
  gc session logs gc-123 --tail 20
  gc session logs gc-123 --tail 0
  gc session logs s-gc-123 -f
FlagTypeDefaultDescription
-f, --followboolFollow new messages as they arrive
--tailint10Number of most recent transcript entries to show (0 = all; compact dividers count as entries)

gc session new

Create a new persistent conversation from an agent template defined in the loaded city configuration. By default, attaches the terminal after creation. When —title-hint is provided without —title, the session title is auto-generated from the hint text: a short version is set immediately and refined by the title model in the background.
gc session new <template> [flags]
Example:
gc session new helper
  gc session new helper --alias sky
  gc session new helper --title "debugging auth"
  gc session new helper --title-hint "fix the login redirect loop"
  gc session new helper --no-attach
FlagTypeDefaultDescription
--aliasstringhuman-friendly session identifier for commands and mail
--no-attachboolcreate session without attaching
--titlestringhuman-readable session title
--title-hintstringtext to auto-generate a session title from

gc session nudge

Send text input to a running 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 or session alias. Multi-word messages are joined automatically.
gc session nudge <id-or-alias> <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-alias> [flags]
FlagTypeDefaultDescription
--linesint50number of lines to capture

gc session pin

Keep a session awake by setting its durable pin override. Pinning does not clear suspend holds or other hard blockers. If the target is a configured named session that has not been materialized yet, pin creates its canonical bead so the reconciler can start it when unblocked.
gc session pin <session-id-or-alias>

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-alias> <title>

gc session reset

Request a fresh restart for an existing session without closing its bead. The controller stops the current runtime and starts the same session again with fresh provider conversation state. Session identity, alias, mail, and queued work remain attached to the existing session bead. For named sessions, reset also clears any tripped named-session respawn circuit breaker before requesting the fresh restart. Accepts a session ID (e.g., gc-42) or session alias (e.g., mayor).
gc session reset <session-id-or-alias>

gc session submit

Submit a user message to a session without choosing provider transport details. The runtime decides whether to wake, inject immediately, or queue the message according to the selected semantic intent.
gc session submit <id-or-alias> <message...> [flags]
Example:
gc session submit mayor "status update"
  gc session submit mayor "after this run, handle docs" --intent follow_up
  gc session submit mayor "stop and do this instead" --intent interrupt_now
FlagTypeDefaultDescription
--intentstringdefaultsubmit intent: default, follow_up, or interrupt_now

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 session alias (e.g., mayor).
gc session suspend <session-id-or-alias>

gc session unpin

Remove only the durable pin override from a session. Unpinning does not force an immediate stop. The reconciler will apply the normal wake/sleep rules on its next pass.
gc session unpin <session-id-or-alias>

gc session wait

Register a dependency wait for a session
gc session wait [session-id-or-alias] [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

Request wake for a session and release user hold or crash-loop quarantine metadata. 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 session alias (e.g., mayor).
gc session wake <session-id-or-alias>
Example:
gc session wake gc-42
  gc session wake mayor

gc shell

The shell integration adds a completion hook to your shell RC file that provides tab-completion for gc commands and flags. Subcommands: install, remove, status.
gc shell
SubcommandDescription
gc shell installInstall or update shell integration
gc shell removeRemove shell integration
gc shell statusShow shell integration status

gc shell install

Install or update the gc shell completion hook. If no shell is specified, the shell is detected from $SHELL. The completion script is written to ~/.gc/completions/ and a source line is added to your shell RC file.
gc shell install [bash|zsh|fish]

gc shell remove

Remove the gc shell completion hook from your shell RC file and delete the completion script.
gc shell remove

gc shell status

Show shell integration status
gc shell status

gc skill

List skills visible to the current city. Output includes:
  • City pack skills (skills/<name>/SKILL.md under the city root)
  • Imported pack shared skills (binding-qualified, e.g. ops.code-review)
  • Compatibility bootstrap skills, when legacy implicit imports still exist
  • With —agent/—session: that agent’s agents/<name>/skills/ catalog
The listing is a diagnostic view of what’s available. It does not collapse precedence, filter to agents whose provider has a vendor sink, or predict exactly which entries the materializer will pick on name collision. For the materialized set, inspect the <scope-root>/.<vendor>/skills/ sink after “gc start” or run “gc doctor” to surface collisions.
gc skill
SubcommandDescription
gc skill listList visible skills

gc skill list

List the current shared and agent-local visible skills, optionally scoped to an agent or session.
gc skill list [flags]
FlagTypeDefaultDescription
--agentstringshow the effective skill view for this agent
--sessionstringshow the effective skill view for this session

gc sling

Route a bead to a session config or agent 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, allow cross-rig routing, allow graph workflow replacement, and for direct bead routes dispatch even if the bead does not resolve in the local store
-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)
--scope-kindstringlogical workflow scope kind for graph.v2 launches
--scope-refstringlogical workflow scope ref for graph.v2 launches
--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. Use —timeout=DURATION to cap the wall-clock time gc stop will spend before giving up; the default budgets configured session interrupt and stop waves, the configured shutdown grace wait, and a second orphan cleanup pass. Use —force to skip the interrupt grace period and go straight to kill.
gc stop [path] [flags]
FlagTypeDefaultDescription
--forceboolskip the interrupt grace period and force-kill all sessions immediately
--timeoutduration0swall-clock cap for the stop sequence (0 = derive from city config)

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. By default, returns as soon as the supervisor acknowledges the stop request — shutdown continues asynchronously. Pass —wait to block until the supervisor socket is no longer answering, which is what most callers that need deterministic cleanup want (e.g., integration tests that then expect to remove temp directories without racing against lingering supervisor / controller subprocesses).
gc supervisor stop [flags]
FlagTypeDefaultDescription
--waitboolWait for the supervisor to finish stopping all managed cities and release its socket before returning
--wait-timeoutduration30sMaximum time to wait when —wait is set

gc supervisor uninstall

Remove the platform service and stop the machine-wide supervisor. On systemd, uninstall refuses to remove an active unit when the supervisor control socket is unavailable. Start the supervisor first so it can re-adopt preserved sessions, then retry uninstall.
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 trace

Inspect and control the session reconciler trace stream. Trace state is persisted locally under .gc/runtime/session-reconciler-trace and can be managed even when the controller is offline.
gc trace
SubcommandDescription
gc trace cycleShow a cycle by tick id
gc trace reasonsShow reason codes observed in trace records
gc trace showShow trace records
gc trace startStart or extend tracing for a template
gc trace statusShow trace arms and stream state
gc trace stopStop tracing for a template
gc trace tailFollow trace records

gc trace cycle

Show a cycle by tick id
gc trace cycle [flags]
FlagTypeDefaultDescription
--tickstringtick id to display

gc trace reasons

Show reason codes observed in trace records
gc trace reasons [flags]
FlagTypeDefaultDescription
--sincestringshow reasons since duration ago
--templatestringexact normalized template selector

gc trace show

Show trace records
gc trace show [flags]
FlagTypeDefaultDescription
--jsonbooltrueemit JSON array
--reasonstringfilter by reason code
--sincestringshow records since duration ago
--templatestringexact normalized template selector
--tickstringfilter by tick id
--trace-idstringfilter by trace id
--typestringfilter by record type

gc trace start

Start or extend tracing for a template
gc trace start [flags]
FlagTypeDefaultDescription
--autoboolmark the arm as auto-triggered
--forstring15mtrace arm duration (e.g. 15m)
--levelstringdetailtrace level: baseline or detail
--templatestringexact normalized template selector

gc trace status

Show trace arms and stream state
gc trace status

gc trace stop

Stop tracing for a template
gc trace stop [flags]
FlagTypeDefaultDescription
--allboolremove both manual and auto arms
--templatestringexact normalized template selector

gc trace tail

Follow trace records
gc trace tail [flags]
FlagTypeDefaultDescription
--sincestringfollow from duration ago
--templatestringexact normalized template selector

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 —long to include git commit and build date metadata.
gc version [flags]
FlagTypeDefaultDescription
-l, --longboolInclude git commit and build date metadata

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 May 12, 2026