ConfigHub · Durable config for coding agents
Docs / docs/ci-and-sandboxes.md Source on GitHub →

In CI or a sandbox

This page is for running the Claude plugin in a CI job, a container, or any machine that is thrown away afterwards. The problem is that the Claude plugin's record lives on the machine, so it goes when the machine goes. This page shows how to load the Claude plugin, how to keep its record, and what it does there.

The record is the Claude plugin's list of what agents changed, with the request that caused each change and the reason given (how it works).

Loading the plugin

From a checkout of this repository, this loads the Claude plugin for one session, with no install step:

claude --plugin-dir plugins/confighub

Each setting is an environment variable, so a job sets them in its environment.

Keeping the record

The record is kept in ~/.confighub/agent-changes, which goes when the sandbox goes. To keep it, turn on one of these:

An agent in a fresh checkout has no record of its own. When it reads a file that the records in the repository cover, it is told the history from those records.

The stop across sandboxes

The Claude plugin stops a deploy that would undo an earlier agent's change, once, and gives the reason (the stop). This works in a new sandbox with an empty configuration too. The records in the repository are enough to hold the agent back, with the reason the earlier sandbox gave.

For this, turn on CUB_MINI_ASK_REASONS=1 with CUB_MINI_RECORD_IN_REPO=1. This is because a record kept in the repository has reasons, and never requests.

Without the Claude plugin, a second sandbox often undoes the first sandbox's change without a word. With it, the second sandbox is told the earlier change and its reason before it deploys.

In a GitHub Actions job

The same works in a GitHub Actions job on ubuntu-latest, with a kind cluster (Kubernetes in Docker) in the runner. An agent with the Claude plugin is told about the earlier change before it applies the manifests, whether or not there's anyone to ask.

Reviewing pull requests

The pull-request review Action needs neither the Claude plugin nor a hub (a ConfigHub server).

An agent in CI that keeps your team's reasons

See ci/. The agent makes its change in a local hub of its own. The local hub is ConfigHub, small, for one machine (install the local hub). The agent's local hub is started from a file in the repository. The job hands back a pull request with each changed value, and a CHANGES.md that says why each is set.

For example, asked to roll out a new image to every environment, the agent took the image into dev and prod after a dry run of each, and kept production's 4 replicas for a sale. The branch it handed back said why in CHANGES.md.

An agent in CI that proposes, and a person who approves

See ci/agent-proposes.yml. This runs on the organization's shared hub. The agent has a key of its own. With it, the agent can change the base, which is the version of the configuration you change, and ask for approval. It can never approve. The person you name approves in ConfigHub, and Argo CD or Flux deploys the change. The words are explained in approvals.

It works from GitHub against a shared hub on confighub.com. For example, the agent proposes 3 replicas, production stays at 2 until the approval, and runs 3 a few seconds after it.

Guarding sandbox boot with mini exec and .confighub/connections.yaml

For local nono containers, Daytona sandboxes, Google AX cloud agents, Unikraft microVMs, or CI test runners where live production credentials must never enter the environment:

Partner runtime templates

Daytona (.devcontainer/devcontainer.json):

{
  "name": "shop-sandbox",
  "postStartCommand": "confighub env exec --app shop --env sandbox --mode test --capture -- npm run test:smoke"
}

Unikraft (Kraftfile / entrypoint wrapper):

confighub env exec --app shop --env sandbox --mode test --connections .confighub/connections.yaml --capture -- ./server

nono / Google AX interactive shell (starters/nono.yaml & starters/google-ax.yaml):

nono run -- sh -c 'eval "$(confighub env shell --app shop --env sandbox --mode test --capture-on-exit)" && claude'

Share a working staging env without pasting .env in Slack

When a teammate or an agent in a fresh sandbox clones your repo and needs your staging settings + test service keys to boot the app, you do not need to paste a .env in Slack or force the recipient to create a ConfigHub account: