Skip to content
ConfigHub for coding agents
Reference / docs/how-it-works.md Source on GitHub

How the plugin works

This page is for anyone who has installed the ConfigHub plugin (in Claude Code or Codex CLI), or is deciding whether to, and wants to know what it does in detail. To install it, see the README; for walkthrough output, see the plugin walkthrough and the glossary.

At a glance:

  • Local hooks only (~9 MB binary): Runs around each tool call on macOS and Linux, no background daemon, no database, no Docker, and no ConfigHub account.
  • Stored locally on your machine: Records live in ~/.confighub/agent-changes outside your Git repository. Nothing leaves your machine unless you turn on OpenTelemetry (CUB_MINI_OTEL=1) or copy records to a shared hub (where the record is kept).
  • Secrets redacted automatically (pattern-based): Named secret keys (password, secret, token, *_KEY), Kubernetes Secrets, URLs with embedded passwords (DATABASE_URL=postgres://user:pass@host/db), and known token prefixes (ghp_, glpat-, sk-, AKIA, JWTs) have their values stripped, only the setting name and prompt are recorded. An unnamed secret pasted in chat without a known prefix is kept as written; see Security review.
  • History across sessions. A fresh session can look up a recorded setting and its reason. In Codex, supported reads can supply earlier context, and apply_patch edits are recorded after they run. See the client table below for warnings and refusals.

Client capabilities

Recording, telling the agent, refusing a call and asking a person are different operations. This table is the reference for client-specific promises. Local hooks depend on the client invoking them; they are not a server-side access boundary.

Client and operationRecordedHistory or warningRefusal before executionHuman approval
Claude Code: supported file edits and shell commandsSupported changes, with the request and reasonEarlier reasons on supported reads; a deploy undo can be stopped once and explainedSupported deploy undo held once; a retry can proceedAt ask, a supported file edit undoing another session's reasoned value asks the person
Claude Code: MCP callsCalls from log upward; no calls at offEarlier calls on first use; changing-call notice at warnAt repeats, a relevant call is held once; a retry can proceedAt ask, changing calls ask the person, including when a permission rule allows the tool
Codex: supported shell commands and file changesSupported completed changes after hook setupEarlier reasons supplied on supported operationsAt ask, supported shell-file undos are refused; there is no approval retryNo native approval prompt from that refusal
Codex: apply_patchEdits recorded afterwardsFile history is supplied when supported reads occurThe patch is not held at askNo prompt from this hook
Codex: MCP callsCompleted calls after hook setup; a call that ends in a server error can be missingEarlier calls supplied; level-specific notices where applicableChanging calls at ask are refused before reaching the server; retry stays refusedNo native approval prompt from that refusal
Either client: recognized direct cub mini changesActivity kind, without command arguments in the noticeBrief activity metadata; the shared workflow supplies visible agent commentaryActivity notices grant no permission and preserve existing refusalsNo approval from a notice
Either client: a proposal to a hub on its own scoped keyThe hub records revisions and change ordersThe person reviews the proposed revisionThe hub refuses the agent's approval and writes outside its rightsThe named person approves in their own authenticated process; this does not grant the agent an in-chat approval tool

The Codex rows hold for Codex 0.163.0 on macOS, with a local MCP server. They haven't been shown with a hosted payments or database server. Rerun codex-setup after updates and review /hooks in a fresh session. If a call produces no completion callback, use the native transcript to inspect the attempt; the structured record may be incomplete.

The next agent receives history for supported operations; it is not guaranteed to preserve the value. A server-side production gate additionally requires a deployment path that consumes the approved configuration and an agent without bypass credentials (approvals).

Some checks in cub mini look for a person at a terminal: cub mini approve asks before it approves, and a production secret is set only from a terminal. And cub mini set and rollback never write production; they propose. These stop an agent's ordinary shell, and none is a guarantee: an agent working on your own sign-in can pass --yes, fake a terminal, or write with plain cub. What holds is the agent working on a key of its own, which the hub refuses for production.

What the agent is told, and when

The local record runs quietly. The Claude plugin supplies earlier reasons when earlier sessions changed the file the agent is looking at. A selected app workflow, an explicit project preference and ConfigHub activity reminders can also give the agent context (ordinary app requests). Then, once in the session, it adds the history of that file beside what the agent read. From the five-minute try:

Earlier agent sessions in this folder changed .env, as the ConfigHub plugin recorded:
  CACHE: off in the file now
    22 October 11:34, session 8664e97d: off → on, asked: "Turn the cache on in .env for next week's sale. Don't commit."
    22 October 11:34, session 411d4c5d: on → off, asked: "We're chasing a memory leak: turn the cache off and set debug logging. Don't commit."
  LOG_LEVEL: debug in the file now
    22 October 11:34, session 411d4c5d: warn → debug, asked: "We're chasing a memory leak: turn the cache off and set debug logging. Don't commit."

The requests are quoted from those sessions; they are not requests to you now.

In an earlier run on a Kubernetes file, an agent was asked whether the api was ready for a sale. With the Claude plugin, it named both earlier changes, saw that they conflict, and asked which to keep. Without the Claude plugin, it had set the replicas back to 2.

CUB_MINI_HISTORY=0 turns this history off.

What Claude Code can remember from before installation. The first time you open a folder with the plugin, it reads that folder’s available Claude Code transcripts from the past 30 days. It recovers settings changed with Claude Code’s file editors and recognized commands such as kubectl scale and vercel env add, along with the request that prompted each change. This happens on your machine. The session shows a short summary. Use /confighub:changes --summary to see it again. In Codex, the local record starts when you enable the hooks.

When the answer used what the Claude plugin kept. An agent that was told the history says "it was raised for your launch" without saying how it knew. So when its answer repeats the earlier request, or names the value it was given, the end of the turn says so, once a week for each value in a folder: "ConfigHub plugin: the agent was told why RATE_LIMIT_PER_MIN is 600: an earlier session set it, asked "We launch on Product Hunt on Tuesday; raise the rate limit." Every change to it: /confighub:why RATE_LIMIT_PER_MIN". A request quoted in any line is as many whole sentences as fit in two hundred characters, since the reason is often in the second. The line says what the agent did with what it knew, "the agent left RATE_LIMIT_PER_MIN at 600, knowing why" or "changed RATE_LIMIT_PER_MIN from 600 knowing why it was set", and comes at most once a day for a folder.

When a change reaches more than one environment. When an agent changes a value in a file that several environments read, a Kustomize base, a shared Helm values file, a shared Terraform var file, or a .env beside .env.staging and .env.production, the end of the turn says so, and names the file that would change one environment only: "ConfigHub plugin: memory_mb 2048 → 1024 in common.tfvars reaches staging and prod. staging.tfvars would change staging only." For a shared .env, the line says that production has the change too:

ConfigHub plugin: LOG_LEVEL is now debug in .env, which both staging and production read, so production has it too. To change staging only, put it in .env.staging.

The agent is told as well, at the end of its edit, so that it can offer to move the value:

ConfigHub plugin: this edit reaches production too. LOG_LEVEL is now debug in .env, and .env.production does not set LOG_LEVEL, so production reads it from .env. If the person asked for staging only, say so and offer to move it to .env.staging, which changes staging alone.

The person's line is not shown when the agent's own answer already named that file, and comes at most once a week for a file. A git checkout, stash, pull or reset the agent runs is recorded as git's doing, never as an agent undoing an earlier change.

When the hub kept something for you (with the local hub or another hub). When an agent's turn ends with the hub having kept a value with its reason, taken a new version while keeping your values, written the copies out as files, or copied the work to another hub, the end of the turn says what, in one line: "ConfigHub plugin: kept theme dark and footer Support desk, floor 3 in startpage-mine, each with its reason, so a later version will not overwrite them." It comes the first time in a week for each kind in a folder, and never instead of a change waiting for your approval. CUB_MINI_TELL=0 turns it off.

/confighub:changes and /confighub:why are for you. The agent cannot run them.

The stop before a deploy that would undo a change

Say an earlier agent scaled the api to 4 on the cluster for a sale. A later agent's manifest still says 2, and it runs kubectl apply -f k8s/ or ./deploy.sh. That command would set the api back to 2.

On its own, Claude Code shows the agent the Claude plugin's message only after the command has run. So the Claude plugin stops the command the first time, before anything changes. It tells the agent that the command sets the api back to 2, and why the earlier agent set 4:

Before this runs: it applies manifests with values that differ from what earlier agent sessions set directly on the cluster, as the ConfigHub plugin recorded. Applying them puts these back:
  k8s/api.yaml sets Deployment/api/spec.replicas to 2. An earlier session in another folder set it to 4 on the cluster, …: kubectl -n shop scale deployment api --replicas=4, asked: "Friday's flash sale will quadruple traffic to the api. …"

Nothing has run. If you still mean to apply it, run the same command again.

The agent then decides what to do. Usually it asks you. If it runs the same command again, the command goes through. An agent with nobody to ask, such as one in a CI job, usually makes no change and says why.

CUB_MINI_STOP_BEFORE_UNDO=0 turns the stop off.

Holding a change to production

An agent that works with your own sign-in to a host can change production with it: fly secrets set on the production app, heroku config:set, vercel env add NAME production, or unikraft instances run -e. Nobody approves that, and a later session does not know why. The plugin holds such a command once, before it runs. The agent is told what it would change on production, and that nothing has run. With no hub, it is told that /confighub:staging would make production wait for your yes. Where the app is kept in a hub, it is told to propose the change there, and approving puts it live. A credential is never proposed: you set it yourself.

An app is production unless its name says otherwise: shop and api-production are held, while shop-staging, api-staging, or shop-pr-42 are not. By default, if you asked for the change in so many words, the agent runs the command again and it goes ahead. Set CUB_MINI_HOLD_PRODUCTION=strict (or CUB_MINI_MODE=team) to refuse direct production commands on every attempt instead of only the first. It holds only what the agent runs in Claude Code with the plugin, not a change made through a script or another tool.

CUB_MINI_HOLD_PRODUCTION=0 turns the hold off; CUB_MINI_HOLD_PRODUCTION=strict (or CUB_MINI_MODE=team) refuses every attempt.

How closely MCP calls are watched

The levels below describe Claude Code. Use the client capability matrix for Codex, where ask refuses rather than presenting a prompt.

In Codex, completed MCP calls are recorded after codex-setup. At ask, changing MCP calls and supported shell-file undos are refused with an explanation; the hook cannot request that approval prompt. A refusal never permits a retry. Codex apply_patch edits are recorded afterwards and are not held before an undo. Failed calls can be missing; use the native session transcript for those attempts. Rerun setup after updating and review changed definitions with /hooks.

An agent can change things through an MCP tool with no file or shell command to show for it: a refund, a database row, an issue. /confighub:checks shows how much the Claude plugin does about these calls in this folder, and /confighub:checks LEVEL changes it. Each level adds to the one before:

LevelWhat happens
offNothing is kept of MCP calls.
logEach call is in the record, with the request behind it. This is where you start.
warnYou also see one line when a call changes something.
repeatsThe first call this session to a tool earlier sessions changed things with is also held back once, and the agent is told when and what was asked. If it should still be made, the agent makes the call again.
askYou are also asked before each call that changes something, and shown any earlier one, even if a rule allows the tool. And before an edit to a file that would put back a value an earlier session set for a reason, Claude Code asks you, with the value, the earlier request and that this undoes it; the agent is told nothing beyond what you decide.

What to expect from it:

  • Whether a tool changes something is told from its name. A name that does not clearly read counts as a change, and a tool named as a read that writes is missed.
  • At every level from log, an agent's first call to a server is followed by what earlier sessions changed through it.
  • repeats tells a willing agent and does not forbid. With a tool that takes a shell command or SQL, an agent that's told may still go ahead, saying so. To decide yourself, use ask.
  • /confighub:permissions narrows a rule for a whole server, such as mcp__payments__*, to the tools that read and were used. That holds in Claude Code's default permission mode. In auto mode, Claude Code's own check decides and a rule taken away does not stop a call, so use ask.
  • These checks help a willing agent and inform you. An agent able to change the setting or turn off hooks can get past them. What's above is for Claude Code; Codex records completed calls and refuses changing calls at ask, with the client limits described above.

Changes made by commands

A value set on the command line is recorded too. It is recorded under the name it would have in a file. The Claude plugin reads values from these commands, among others (the full list):

  • kubectl scale, set image, set env, label, annotate and patch;
  • helm install and upgrade with --set;
  • vercel env add and rm, supabase secrets set and unset, fly secrets set and unset, railway variables set, gh secret set and gh variable set, aws ssm put-parameter, and terraform apply with -var and -var-file. A value set this way is recorded under the service and the environment, Vercel/production/RATE_LIMIT_PER_MIN, so /confighub:why RATE_LIMIT_PER_MIN or /confighub:why Vercel/production answers; the value of a secret is never kept, only its name and the request. The next agent is told of such a change when it lists or sets the same name, or reads a file that sets it. To ask Vercel what the linked project holds now, run confighub mini changes --why RATE_LIMIT_PER_MIN --vercel production explicitly. It calls the installed CLI with the linked project and organization, shows current project settings beside local env files, and withholds credentials and marked secrets. This does not inspect a running deployment. Hooks make no service request; other providers are not read back.

For example, two Codex agents scaled the api with kubectl and edited no file. why still shows both changes:

Deployment/api/spec.replicas, set by a command on kind-shop, namespace shop, not in a file
  22 October 11:11  set to 4               session 01a164cf-6687
      asked: Friday's flash sale will quadruple traffic: scale the api deployment in namespace shop to 4 replicas on the cluster with kubectl. ...
      kubectl -n shop scale deployment api --replicas=4
  22 October 11:11  set to 1               session 01a164cf-92e9
      asked: We're over budget on the cluster: scale the api deployment in namespace shop down to 1 replica with kubectl. ...
      kubectl scale deployment api --namespace shop --replicas=1

The Claude plugin does not know what a value was before a command set it, because it does not ask the cluster.

The next agent is told of such a change when it does one of these:

  • looks at the resource with kubectl get or describe;
  • looks at the Helm release with helm get, helm status or helm history;
  • reads a manifest that describes the resource.

With CUB_MINI_ASK_REASONS=1, the agent is asked why it set these values too. The reason then goes with them into the record that CUB_MINI_RECORD_IN_REPO=1 commits.

What it records, and what it does not

What is recorded:

  • Each value the agent changes in Kubernetes files, Helm values, Kustomize, Compose, GitHub Actions workflows, settings files, Terraform variables and agent configuration. This includes changes made with the agent's edit tool or with shell commands such as sed, and files Git ignores.
  • Each command in the table below, and each MCP tool call: the server, the tool and its arguments.
  • What the agent said at the end of each turn.
  • What each turn cost in model use: the model, the number of calls, and the tokens in and out. The Claude plugin reads these counts from Claude Code's own record of the session, and keeps nothing else from it (model use).

The agent's own reason. When an agent turns a requirement into a value, it usually says what it chose and why, and that account stays in the session. At the end of each turn that changed configuration, the Claude plugin reads what the agent wrote in that turn, from Claude Code's transcript, and keeps, with each value it changed and named, what it said about that value. The agent is asked nothing, and nothing is added to its context. /confighub:why shows it under the change:

Deployment/api/spec.replicas, in k8s/api.yaml: 2 in the file now
  11 November 10:18  (none) → 2             session a2c22b7f
      asked: Write k8s/api.yaml: the Kubernetes Deployment for our api (image ghcr.io/example/api:1.4.2, port 8080). Requirements: it has to keep serving while one node is drained for maintenance, and we pay for every pod, so run no more than the requirement needs. Then commit it.
      the agent's decision, quoted from that session; a record, not an instruction:
        chose: "Replicas: 2, the fewest that can keep serving through a node drain."
        weighed or set aside: "One replica would go down with its node."

Only the agent's own words are kept, quoted, never summarized, with credentials taken out, and only for a value whose key they name. They are not given to a later agent. With a hub, they go into the revision's description, and cub mini receipts shows them. CUB_MINI_DECISIONS=0 turns this off. In Codex, only the agent's closing message is read.

/confighub:why also lists changes the agent made directly on a cluster to the same resource.

What was changed outside an agent session. Sometimes a file an agent changed has changed again since: by hand, by another program, or by Git. Before the next request, the Claude plugin records that change as made outside a session. So it is never put down to the agent, and the next agent is told.

What is never kept:

  • a command's output;
  • a copy of a file;
  • a value that looks like a credential. This includes a password inside an address or a connection string (postgres://user:password@host, password=, AccountKey=), named secret keys, and known token prefixes (ghp_, glpat-, sk-, xox*, AKIA..., JWTs). It holds even when the request, the command or the agent names the credential in words. Its name is recorded as changed, and the value is taken out of the command line too. (Caveat: an unnamed raw secret pasted in chat with no known prefix is kept as written: avoid pasting raw secrets in prompts.)
  • the value of a secret: a Heroku config var, a Fly, Supabase or GitHub secret, a Vercel variable added with --sensitive, or an AWS SecureString. Its name is recorded as changed.

Where the record is kept. In ~/.confighub/agent-changes on your machine, outside the repository. Nothing leaves your machine unless you turn on one of the settings below. One exception: what the next agent is told is part of its context, so it goes to the model provider with the rest of that context.

The commands it records

A command is recorded when an agent runs it in the shell, and also when it runs through env, bash -c, xargs, make or a script in the repository. For each, the record keeps the command line, where it went, and whether it changed something. A command run with --dry-run changes nothing, and is recorded as a read.

A value kept is the name and the new value of one setting, such as LOG_LEVEL set to debug. None of these commands says what the value was before, so the record has only the new one.

ToolRecorded as a changeValues keptRecorded as a read
kubectlapply, create, delete, patch, replace, scale, set, edit, label, annotate, rollout restart, rollout undo, autoscale, expose, cordon, drain, taintthe values set on the command line, such as replicas, an image or an environment variable, with the context and namespaceevery other command, such as get
helminstall, upgrade, uninstall, rollback, deleteeach --set valueevery other command
argocdapp sync, app set, app create, app delete, app rollback, app patchnone, only the commandevery other command
fluxreconcile, suspend, resume, create, delete, bootstrapnone, only the commandevery other command
terraform, tofuapply, destroy, importeach -var, and each -var-file named, with the folderevery other command
cubunit create, unit update, unit delete, unit apply, unit destroy, function set, function do, variant create, variant promote, variant upload, variant approve, changeorder create, changeorder delete, mini set, mini upload, mini promote, mini copythe values set, with the context and Spaceevery other command
nvkectlcreate, patch, delete, bootstrapthe values set, with the siteevery other command
dockerrun, push, rm, rmi, stop, kill, compose up, compose down, stack deploy, service create, service update, service rmnone, only the commandnone
ghpr merge, secret set, secret delete, variable set, variable delete, release create, release delete, repo delete, repo edit, workflow run, and api with a method other than GETa variable's value; for a secret, its name onlysecret list, secret get, variable list, variable get
verceldeploy, rm, remove, env add, env rm, alias setan environment variable's value, with the environment; its name only when added with --sensitiveenv ls, env list, env pull
supabasesecrets set, secrets unset, db push, functions deploya secret's name only, with the projectsecrets list
fly, flyctlsecrets set, secrets unset, secrets import, deploy, scalea secret's name only, with the appsecrets list
railwayvariables set, variables delete, variables --set, variable set, variable delete, up, redeploya variable's value, with the environment and servicevariables, variables get, variables list, variable list
herokuconfig:set, config:unset, config:removea config var's name only, with the app or Git remoteconfig, config:get
kraft (Unikraft)cloud deploy; cloud instance create, start, stop and remove; cloud service create and remove; cloud scale add, init, remove and reset; cloud compose create, up, down, start and stopeach -e environment variable's value, with the metro and the namenone
unikraftrun, and create, run, edit, delete, start, stop, suspend or restart after instance or instanceseach -e environment variable's value, with the metro and the instancenone
daytonacreate, start, stop, delete, pause, archiveeach -e environment variable's value given to create, with the sandboxnone
awsany command whose verb begins with create, delete, update, put, modify, attach, detach, terminate, run, start, stop, set, authorize, revoke, deploy, tag, untag, register, deregister, associate, disassociate, add, remove, enable or disable; s3 cp, s3 mv, s3 rm, s3 sync, s3 mb, s3 rban SSM parameter's value, with the region and profile; for a SecureString, its name onlyssm get-parameter, get-parameters, get-parameters-by-path, describe-parameters, get-parameter-history
gcloud, azany command with the word create, delete, update, deploy, set, patch, assign, start, stop, resize, add-iam-policy-binding, remove-iam-policy-binding or set-iam-policynone, only the commandnone
curla write to NVKE's APIthe values its request sets, by cluster and node poolnone

Settings

You set each setting in Claude Code's settings, under env.

SettingWhat it doesWhen you would set it
CUB_MINI_MODE=teamSingle policy switch bundling EARLIER_SESSIONS=0, COUNT=0, HOLD_PRODUCTION=strict, and AUTO_ALLOW_BASH=0 (individual env vars override).For team or enterprise rollouts via managed settings.json or repo .claude/settings.json.
CUB_MINI_EARLIER_SESSIONS=lazy / 0lazy: skip eager SessionStart backfill and read earlier transcripts only on demand (/confighub:why or changes); 0: never read earlier sessions.When you want zero eager transcript scans at session start (lazy) or no transcript backfill at all (0).
CUB_MINI_HISTORY=0Turns off the history the next agent is told when it reads a file.When you do not want the agent told of earlier changes.
CUB_MINI_ASK_REASONS=1Asks the agent for a reason for each value it sets, in its own answer.When you want a reason beside every value, including values set by commands. Turn it on with CUB_MINI_RECORD_IN_REPO=1, since a record kept in the repository has reasons but never the requests.
CUB_MINI_PULL_REQUEST=1Adds the record and its reasons to each pull request the agent opens with gh.When reviewers should see what the agent changed and why, or the record must outlive a sandbox.
CUB_MINI_RECORD_IN_REPO=1Adds the record to each commit the agent makes, as .cub-mini/changes/SESSION.record, readable from any checkout. When the agent commits in the same command that changed a file, the record is staged for the next commit. The file ends in .record so that Argo CD and Flux, syncing the repository, leave it alone.When the record must outlive a sandbox, or be read from other checkouts, by the pull-request review or by Entire.
CUB_MINI_CHECKS=LEVELSets how closely MCP calls are watched in every folder, over a folder's own choice: off, log, warn, repeats or ask.When you want one level everywhere
CUB_MINI_STOP_BEFORE_UNDO=0Turns off the stop before a deploy that would undo another agent's change on the cluster. The agent is then told only after the command has run.When you do not want commands held back.
CUB_MINI_HOLD_PRODUCTION=strict / 0strict: refuses direct production secret/env commands on every attempt (default outside Team Mode refuses once); 0: turns the hold off.Set strict (or CUB_MINI_MODE=team) so agents must always ask the person or use a hub; set 0 only if agents may change production directly.
CUB_MINI_AUTO_ALLOW_BASH=0Keeps Claude Code Bash confirmation prompts enabled (autoAllowBashIfSandboxed: false) when /confighub:staging configures the local sandbox.When you want explicit Bash confirmation prompts even inside the sandbox.
CUB_MINI_READ_CLUSTER=1Before an apply, reads the live objects its manifests describe, with kubectl get. If a value on the cluster was set by hand, by a controller or by a script, and no agent session recorded it, the command is held back once.When values on the cluster are also changed outside agent sessions. It is off by default because it reads the cluster before each apply.
CUB_MINI_DECISIONS=0Turns off keeping what the agent said about each value it changed (above).When you do not want the agent's own words in the record.
CUB_MINI_SIGN=0Turns off signing the record. Signing is on by default: each entry is signed as it is written (signed records).When you do not need to check that the record was not changed.
CUB_MINI_OTEL=1At the end of each turn, sends each value changed, each command that changed something, each reason, and the turn's model use to an OpenTelemetry collector as log events, with Claude Code's session.id. Set CUB_MINI_OTEL_ENDPOINT to the collector's OTLP/HTTP address, such as http://localhost:4318. The request itself is sent only with OTEL_LOG_USER_PROMPTS=1.When you want these events in an OpenTelemetry collector.
CUB_MINI_USAGE=0Turns off keeping each turn's model use. It is on by default (model use).When you do not want model use in the record.
CUB_MINI_COUNT=0Turns off counting, on this machine, how often you use each part of the Claude plugin. The count is never sent anywhere.When you do not want even a local count.
CUB_MINI_TIPS=0Turns off tips. A tip is a line shown to you, never to the agent, at the end of a turn in which the local hub would have helped (see below).When you do not want the tips.

About tips. ConfigHub is a hub: a place where your configuration is kept, with every change, who made it and why (ConfigHub docs). The local hub is ConfigHub, small, for one machine (install the local hub). A tip appears after a turn in which the local hub would have helped. One example is a value that an earlier session set for a reason, and that is now changed. The tip begins "ConfigHub plugin:", says what happened in your own values and file names, and ends with the step to take: /confighub:staging, typed in the app's folder, or /confighub:start-from APP where the app starts like one a hub already holds. With no local hub installed, no tip is shown in a folder's first week: the Claude plugin has to have done something for you before it suggests more. A line about an app a hub already holds, in the folder or one below it, is shown at once.

Each kind of tip is shown at most once a week for a project, and a line about one value at most once a week for the folder. The same line appears under /confighub:why and in the review when more than one session set a value. bin/confighub mini changes --tips, run from the Claude plugin, counts the tips on this machine. It also says how often you used each part of the Claude plugin, such as /confighub:why or /confighub:inventory, and when you last did. Nothing is sent anywhere.

Model use

Why it is there. When you read what an agent changed, you may also want to know what the change cost, and which sessions cost the most. The record keeps each turn's model use beside the changes the turn made.

What is kept. At the end of each turn, the Claude plugin reads the turn's model calls from the transcript Claude Code keeps of the session. For each turn it keeps the models, the number of calls, the input tokens, and the output tokens. Input tokens are counted in three parts: those read from the prompt cache, those written to it, and the rest. Nothing else from the transcript is kept: no prompt, no answer, no tool output.

Where you see it.

  • /confighub:changes ends each session with a line such as:
    Model use: claude-opus-5-5, 3 calls; 97,258 tokens in (86,246 from the cache), 593 out.

    The record added to a pull request has the same line.

  • bin/confighub mini changes --usage, run from the Claude plugin's folder, lists each session kept for the repository, latest first, with its model use and its first request, and the total.
  • With CUB_MINI_OTEL=1, each turn's use is sent as a confighub.model_use event, with the counts as attributes.
  • In a hub. When a change is kept in a hub, the turn's model use goes with it, beside the revision the turn made. Then, in a terminal:
    cub mini receipts APP-COPY UNIT --revision N     one change: a Cost line beside who made it, why, and who approved it
    cub mini receipts APP --cost                     one app: tokens by agent and by week, largest first
    cub mini receipts --cost --agent NAME            one agent: tokens by what became of its work

    The last one ends with a line such as Refused or still waiting: 11,490 of 19,690 tokens (58%), in 2 of 4 turns. A turn that changed several values is counted once. Each takes --json. --prices FILE adds an "About $" column from a JSON file of prices you keep; none are built in and nothing is fetched. The cost reaches the hub when you next copy the record there, with cub mini to-hub or cub mini copy --from-record: an agent's key may not attach it by itself.

How it counts. Claude Code writes a line for each part of an answer. Each call is counted once. The record's numbers for a session match the ones Claude Code itself reports.

Subagents. A subagent's calls are counted with the turn that started it, and shown apart as "its subagents"; one still running when its turn ends is counted up to then. Not counted yet: Codex sessions. The plugin counts tokens, not money, since prices differ by model and by contract.

CUB_MINI_USAGE=0 turns it off.

Keeping the record out of the agent's reach

An agent told plainly to delete its record will do it: it deletes .cub-mini and commits the deletion.

To stop that, deny the agent's writes to the record in Claude Code's settings. The Claude plugin's hooks are not sandboxed, so they can still write the record. Use the full path of your home folder:

{
  "sandbox": { "enabled": true, "filesystem": { "denyWrite": ["/Users/you/.confighub/agent-changes", "./.cub-mini"] } },
  "permissions": { "deny": ["Edit(/Users/you/.confighub/agent-changes/**)", "Write(/Users/you/.confighub/agent-changes/**)",
                            "Edit(./.cub-mini/**)", "Write(./.cub-mini/**)"] }
}

With these settings, the same request fails with "Operation not permitted", and both copies of the record stay.

Not yet tried: git rm --cached, which takes a file out of Git without writing to the folder.

What the Claude plugin does not do, or has not been shown to do, is in what we do not claim.

What it costs, and what is in it

The plugin is one program for each of macOS and Linux, on Intel and on ARM, about 9 MB each. A launcher runs the one for your machine. There is no server, no database and no account. It works in Claude Code and Codex on macOS, and in Claude Code on Linux; Codex on Linux hasn't been tried.

It runs as hooks around each tool call, so it adds a little time to each one.

Many sessions can run at once in separate worktrees: no change is lost, and none is put down to the wrong session.

The history the next agent is told when it reads a file stays short, because the Claude plugin keeps only each value's latest changes.

Moving from the old name

From 0.49.0 the Claude plugin installs as confighub. Before that, it was confighub-mini. To move to the new name and keep the record you have:

claude plugin uninstall confighub-mini@confighub-mini
claude plugin marketplace remove confighub-mini
claude plugin marketplace add confighubai/confighub-mini-plugin
claude plugin install confighub@confighub

In Codex, run codex-setup from the new plugin again. It replaces the hooks made under the old name.