ConfigHub · Durable config for coding agents
Docs / examples/walkthroughs/story-33-c3agent-durable-config.md Source on GitHub →

Run c3agent Workstreams with Zero-Hub Memory & Hard ConfigHub Prod Gates

c3agent dispatches AI engineering workstreams from Slack channels using role-bound pods, Temporal workflows, and PostgreSQL state. Pairing c3agent with ConfigHub separates live team dispatch (c3agent + Temporal) from durable configuration and production approvals (ConfigHub): bake the ~4.8 MB MIT Zero-Hub Linux plugin directly into c3agent's agent-runtime container (zero PostgreSQL per pod), record every config edit and reason across workstreams and git commits, surface hook notices directly in the Slack thread, and keep production behind a named human cub inbox approve gate.

Quick start

You need: the MIT ConfigHub plugin (Zero Hub v0.99.48+) and either a c3agent agent-runtime image or a local workstream checkout.

By handAsk your agent
Bake Zero-Hub Linux binaryDownload & SHA-256 verify confighub-linux-<arch>.gz into /opt/confighub/plugins/confighub (step 1)"Add the SHA-256-verified ConfigHub Zero-Hub Linux plugin (v0.99.48) to agent-runtime/Dockerfile with zero server binaries."
Wire team-mode workstream hooksPass --plugin-dir /opt/confighub/plugins/confighub + CUB_MINI_MODE=team + CUB_MINI_RECORD_IN_REPO=1 (step 2)"Configure the c3agent Claude runner so every workstream loads ConfigHub hooks in team mode and isolates journals inside <workDir>/.confighub/agent-changes."
Surface hook notices in SlackForward system hook notices in formatStreamEvent (step 3)"Forward ConfigHub hook warnings and silent-undo holds into the Slack workstream thread."
Gate production with scoped keysBind c3agent-read / c3agent-nonprod keys; human runs cub inbox approve (step 4)"Verify c3agent-nonprod can update staging but is refused on production until a human runs cub inbox approve."

Without ConfigHub: a follow-up c3agent workstream in the next Slack thread can silently revert a setting tuned in an earlier incident, and a Slack "yes" message sits inside the prompt stream instead of enforcing a cryptographic approval gate.

Deeper dive

Show the full walkthrough

Human

What you need

  • A c3agent checkout (or any Linux container image running Claude Code / Codex CLI / Google Antigravity)
  • The MIT Zero-Hub plugin (v0.99.48+, ~4.8 MB gzipped, macOS & Linux)
  • Optional (for Stage 3 production gating): a Cloud or VPC ConfigHub instance (hub.confighub.com or self-hosted Helm) with scoped role profiles (c3agent-read, c3agent-nonprod)

Steps

  1. Bake the SHA-256-verified MIT Zero-Hub Linux plugin into agent-runtime (zero server or Postgres in the pod):
    mkdir -p ~/c3agent-demo/plugin/bin && cd ~/c3agent-demo
    cat > Dockerfile.snippet <<'EOF'
    ARG CONFIGHUB_PLUGIN_VERSION=v0.99.48
    RUN set -eux; \
      arch="$(dpkg --print-architecture)"; \
      case "$arch" in amd64|arm64) ;; *) echo "unsupported arch: $arch" >&2; exit 1 ;; esac; \
      mkdir -p /opt/confighub/plugins/confighub/bin /opt/confighub/plugins/confighub/hooks; \
      base="https://github.com/confighubai/confighub-mini-plugin/releases/download/${CONFIGHUB_PLUGIN_VERSION}"; \
      curl -fsSL "${base}/SHA256SUMS" -o /tmp/SHA256SUMS; \
      curl -fsSL "${base}/confighub-linux-${arch}.gz" -o "/opt/confighub/plugins/confighub/bin/confighub-linux-${arch}.gz"; \
      (cd /opt/confighub/plugins/confighub/bin && grep "confighub-linux-${arch}.gz" /tmp/SHA256SUMS | sha256sum -c -); \
      rm -f /tmp/SHA256SUMS
    ENV CONFIGHUB_PLUGIN_DIR=/opt/confighub/plugins/confighub
    EOF
    cat Dockerfile.snippet
  2. Verify team-mode hooks isolate journals per workstream and hold silent reverts: Run the Zero-Hub hook binary directly with CUB_MINI_MODE=team and CUB_MINI_CHANGES_DIR pointing inside the workstream directory so two parallel pods or worktrees never cross-contaminate, while sibling git worktrees of the same repo share config history automatically:
    mkdir -p ~/c3agent-demo/workstream && cd ~/c3agent-demo/workstream
    printf 'CACHE=false\nPOOL_SIZE=10\n' > .env
    export CUB_MINI_MODE=team
    export CUB_MINI_CHANGES_DIR=~/c3agent-demo/workstream/.confighub/agent-changes
    export CUB_MINI_RECORD_IN_REPO=1
    ls -la .env
  3. Keep live workstream chatter out of ConfigHub (clean architectural boundary):

    • Temporal + PostgreSQL keep live workstream status, Slack thread cursors, and pod heartbeats.
    • ConfigHub keeps only durable config (app/infra units + agent-layers role definitions) and per-value reasons (.cub-mini/changes/<session>.record in Git or revisions on Cloud Hub).
    • When c3agent's stream tailer receives a Claude Code hook notice (system event with hook_response or systemMessage), it posts the warning straight into the Slack thread so engineers see why a silent revert or direct production CLI command was held.
  4. Enforce production approval out of band (cub inbox approve):

    • Grant the workstream pod a scoped non-production token (c3agent-nonprod) — never an admin token.
    • Staging edits apply directly; production proposals create a ConfigHub ChangeOrder and pause until a named human runs:
    cub inbox list
    # After reviewing the exact diff and reason:
    # cub inbox approve <change-order-id>
  5. Inspect the workstream's durable config record before opening or merging the PR:
    cd ~/c3agent-demo/workstream
    test -f ../Dockerfile.snippet && grep -q "sha256sum -c" ../Dockerfile.snippet && echo "c3agent Zero-Hub image + workstream ready"

Undo it

Delete ~/c3agent-demo. No cluster state or remote hub was modified.

Agent

When operating inside a c3agent workstream with ConfigHub enabled:

  • Never store live Slack chatter, heartbeats, or .coord workstream leases inside ConfigHub units; Temporal and Postgres own live coordination.
  • Never embed a Local Hub Postgres instance inside a Linux c3agent pod; use the MIT Zero-Hub Linux plugin locally and point cub at a Cloud or VPC Hub over HTTPS.
  • Treat a Slack "yes" message as conversation context only — never attempt to self-approve a production ChangeOrder. Surface the exact cub inbox approve command for the human owner.

Testing

Prepare a SHA-256-verified Dockerfile snippet baking the MIT Zero-Hub Linux plugin (v0.99.48) into a c3agent agent-runtime image with CUB_MINI_MODE=team and verify .env config tracking in ~/c3agent-demo.

This proves: c3agent workstreams inherit transparent Zero-Hub config memory, Slack-visible undo/prod warnings, and out-of-band cub inbox approve production gates with ~4.8 MB of MIT client code and zero Postgres per pod.