ConfigHub · Durable config for coding agents
Docs / examples/walkthroughs/starter-daytona.md Source on GitHub →

Run your own app in your Daytona sandbox with staging's settings

Your agent works in a Daytona sandbox that holds a clone of your app. Connect the app once from its folder, and your agent runs it in that sandbox with staging's settings. Production stays behind your approval, in the local hub on your machine or in a shared hub (on confighub.com or self-hosted) that cloud Daytona sandboxes can reach even when your laptop is asleep, so deleting the sandbox loses nothing.

1-Screen Claude Code Card — paste in Claude Code: "Try a batch limit of 240 in my Daytona sandbox because the queue spiked, verify it, and propose it for production."

╭─ ConfigHub · Daytona sandbox handoff ──────────────────────────╮
│ ├── 1. sandbox  ● daytona/dev-box  BATCH_SIZE: 120 → 240 ✓     │
│ ├── 2. teardown ✗ sandbox deleted  container & local disk wiped│
│ └── 3. durable  ⏳ prod waiting    staging=240 · prod=120 (1:1)│
│                 └── your gate: cub inbox approve APP            │
╰────────────────────────────────────────────────────────────────╯

Quick start

You need: Claude Code with the ConfigHub plugin, the daytona command signed in (daytona login), and a started sandbox that holds a copy of your app, as it does for your agent's work.

By handAsk your agent
Connect your app/confighub:staging in the app's folder, in Claude CodeYou type it yourself.
Run it in your sandboxcub env preview --staging --daytona SANDBOX or confighub mini exec --app APP --mode test --conn stripe=test:env://STRIPE_TEST_KEY --capture -- daytona exec -- CMD"Run this app in my Daytona sandbox dev-box in test mode, block live keys, and save tuned settings."
Try a changecub repo set APP KEY=VALUE --variant staging --change-desc "Why", then run it again"Try a batch limit of 240 in staging because the queue spiked, run it in the sandbox again, and propose it for production."
Approve or refusecub inbox approve APP or cub inbox refuse APP --reason "Why"You decide yourself.
Reach from cloud sandboxes (shared hub)cub context create shared --server https://hub.confighub.com && cub --context shared auth login (or your self-hosted hub URL), then copy the app up with cub local copy"Copy this app to my shared hub context so cloud Daytona sandboxes can reach staging without my laptop."

The first step downloads the local hub if it is not there. The sandbox gets staging's settings as environment variables, never a credential and no ConfigHub key.

Without ConfigHub: your agent edits the .env in the sandbox or passes -e to daytona create, production's values included, and the reasons go when the sandbox goes.

cub is ConfigHub's command-line tool. /confighub:staging downloads it with the hub, and the commands it prints give the full path to cub, so you can paste them as they are.

Deeper dive

The rest of this page is the full version: what the run in the sandbox does and leaves alone, the batch-job rehearsal of an agent that proposes from inside a sandbox, the move to a shared hub for review, what an agent leaves to the owner, and how this was tested.

Show the full walkthrough

Human

Your own app

  • cub env preview --staging --daytona SANDBOX asks Daytona to describe the sandbox, which must be the one named and started. It runs your app's own command, from package.json or the Procfile's web: line, or the one you give after --, in the sandbox's copy of the app with staging's settings as environment variables. The copy is the folder of the same name in the sandbox's home; name another with --sandbox-dir DIR. The app listens on staging's PORT, or 3000, or the one you give with --port.
  • Credentials and secret references in staging never reach the sandbox, and nothing is written to the hub. daytona preview-url SANDBOX --port PORT opens the app. cub env preview --staging --daytona SANDBOX --stop stops it and leaves the sandbox as it is.
  • Only staging runs in a sandbox. Your agent proposes production changes from your machine, where they wait for you, so the sandbox can be deleted at any time.

The batch-job rehearsal

This is the path for an agent that itself runs inside the sandbox, with a hub of its own there. Use an unpacked mini package that includes the Daytona starter. Start with the local rehearsal: it needs no Daytona account and tests the proposal, export, and shared review. It does not run a batch job. Use an empty working directory and keep its keys and evidence private. The shared step needs a disposable app name in an organization where you can create and remove test resources.

Steps

  1. Start a disposable mini with its own configuration.
    export MINI=/absolute/path/to/unpacked-confighub-mini
    export PATH="$MINI/bin:$PATH" CUB_MINI_STARTERS=on
    "$MINI/bin/confighub-mini-app" mini install-plugin "$HOME/.confighub"
    cub local start --name batch-sandbox --use
    export LOCAL_HUB=$(cub context get -o jq=.name)
    mkdir -p ~/starter-example/batch ~/starter-example/returned; cd ~/starter-example
  2. Connect the batch job. Read the starter and its defaults in the hub, then approve the packaged definitions. Production approval for this job is separate.
    printf 'DAYTONA_BATCH_LIMIT=120\n' > batch/daytona.env
    cp batch/daytona.env batch/app.env
    cub repo adopt batch
    cub unit get daytona --space starters-base -o jq=.Unit.ToolchainType
    cub variant approve starters-approved --all --note "Review the packaged starters"
    cub agent require-approval batch --variant live --agent batch-proposer
    cub local copy batch --to-file "$PWD/returned/baseline.tar.gz"
  3. In a real Daytona run, the first two steps run inside the sandbox under the owner account, using a Linux package of the sandbox's architecture. Put only the app folder and the restricted ConfigHub configuration in the separate proposer user's home. Sign that user in with its own key and the loopback URL. Do not give the proposer access to the Daytona CLI on your machine or the sandbox owner's OS account. This rehearsal checks the hub key, not OS isolation.
    CUB_CONFIG="$HOME/.confighub-agent-batch-proposer" CUB_CONTEXT=batch-proposer \
      "$MINI/examples/daytona-starter/propose" "$PWD/batch" "$PWD/returned"
    Proposal returned; sandbox production remains at 120.
  4. Back out of the experiment for this app: discard the local file edit and leave production alone. Export current settings and separately keep the reason. For a real sandbox, download the baseline, returned settings and proposal to the owner's machine before deleting that sandbox. The archive contains the current copies, not the pending order or its history.
    cp batch/daytona.env batch/app.env
    cub local copy batch --to-file "$PWD/returned/batch.tar.gz"
    test -s returned/proposal.txt
    cub unit data app --space batch-live | grep -Fx DAYTONA_BATCH_LIMIT=120
    DAYTONA_BATCH_LIMIT=120
  5. Move the stored app to a shared hub. From your own terminal sign in there. In the real sandbox path, import the baseline archive, verify the returned setting and reason, then reapply the change to the destination base. Importing a changed base first can leave no new diff to review.
    cub context create shared --server https://hub.confighub.com
    cub --context shared auth login
    export TEAM_APP="${WALKTHROUGH_PREFIX:-$USER-}batch"
    cub --context shared mini copy --from-file "$PWD/returned/baseline.tar.gz" --name "$TEAM_APP"
    cub --context shared changeworkflow get --space workflows "$TEAM_APP-live-approval" >/dev/null
    grep -F 'after a queue spike' returned/proposal.txt >/dev/null
    cub --context shared function set --space "$TEAM_APP-base" --unit app --toolchain AppConfig/Env \
      --change-desc "Increase the batch size after a queue spike." -- set-string-path '*' DAYTONA_BATCH_LIMIT 240
    cub --context shared changeorder create --space "$TEAM_APP-base" sandbox-batch \
      --in-scope-space "$TEAM_APP-live" --change-workflow "workflows/$TEAM_APP-live-approval" \
      --description "Increase the batch size after a queue spike."
    cub --context shared unit data app --space "$TEAM_APP-live" | grep -Fx DAYTONA_BATCH_LIMIT=120
  6. Remove the sandbox's app once you have verified the shared copy. When you have finished reviewing the disposable shared app, delete that copy and its workflow too.
    cub component delete --recursive --detach batch

For cleanup, remove only the app named by TEAM_APP from the shared hub, then its workflow, with cub --context shared component delete --recursive --detach "$TEAM_APP" and cub --context shared changeworkflow delete --space workflows "$TEAM_APP-live-approval". Stop the local rehearsal hub with cub local stop --name batch-sandbox. For the v0 Daytona CLI, the owner runs daytona delete YOUR_TEST_SANDBOX and checks daytona list. With another CLI version, check its delete command first.

Agent

For an unattached local app, use the app plugin you already have. In Claude Code run "$CONFIGHUB_PLUGIN_PROGRAM" mini get and use the local launcher it prints. Plain cub on the shell path may have no mini command. Its hosted context can be expired and the local setup will still work. For an attached app, use its existing connection.

If the person wants their app running in a sandbox, ask which sandbox if none is named, then run cub env preview --staging --daytona SANDBOX in the app's folder, after /confighub:staging has connected it. If the sandbox has no copy of the app, say so and let the person put it there. Read what it serves through daytona preview-url SANDBOX --port PORT. Change staging with cub repo set APP KEY=VALUE --variant staging --change-desc WHY and run it again; propose production changes with --variant live and give the person the approve line. The 120-to-240 exercise below is a separate job.

Ask: “Try a batch size of 240 because the queue spiked. Leave production at 120 and bring me back a proposal I can review.” Use only the supplied proposer context. Report what changed in staging, what live still holds, the reason, and where the owner can review it.

  • Deploy: run step 2's cub repo adopt batch. The starter approval, the proposer key and the baseline export are the owner's, so end with step 2's last three commands for them to run.
  • Update: run step 3 with the proposer context, and write the reason to returned/proposal.txt.
  • Move: a proposer key cannot sign in to or write to the team's shared hub, so do not try. Give the owner the exact commands of step 5, from the copy to the change order, and stop; they run them in their own terminal.
  • Delete: step 6, only once the team's shared hub holds the app.

Never approve a production change, create or delete a cloud sandbox, or report the original approval history as transferred; if a sandbox was deleted, use the downloaded files.

Testing

The own-app path was run on a real local hub with a stand-in for the daytona command, which runs the sandbox's commands in a folder on the same computer; no Daytona account was used. The run covered a sandbox Daytona does not describe, which runs nothing, the agent's staging change, the app serving that value from the sandbox, a credential in staging kept out of the sandbox and the output, stopping the run, and production refused for a sandbox.

For the batch-job rehearsal, the checks read the structured starter, the staging and live Units, and the shared hub's new pending order. The local scripted path tests configuration and the approval boundary. The separate real Daytona checks below test loopback, separate OS users and the returned archive. Neither path proves that a batch job ran.

Set up my batch job so I can try changes while keeping production at 120.

Try 240 because the queue spiked, and leave production at 120.

Put my local file back and keep the experiment for later.

Bring that proposal to the team's hub, with the reason, for me to review. The team's hub is the context shared, and the app's name there is in TEAM_APP.

Remove only my local copy once the team has it.

This proves: your own app runs in your sandbox with staging's settings, with no credential and no ConfigHub key there. For the rehearsal, the starter and the settings are stored and the experiment can become a new pending proposal. Verify the value and reason on the destination; a copied file by itself is insufficient.

Test results

Results, 14 November 2026, confighub mini 0.11.1-mini.5. Figures from this page's own test runs, shown here for whoever checks the page; they are not a promise.

  • Scripted run: passed, 87 seconds for the steps, within the page's budget of 240; each of the three planted faults (a changed quoted line, a budget of zero seconds, a check that holds on a fresh hub) was caught.
  • Environment, Published confighub mini 0.11.1-mini.5 with its own plugin (0.88.0), on this computer, with no Daytona account: the Daytona sandbox is a local stand-in for the test, and a shared hub on confighub.com (the Kubara organization) holds the shared hub. Approvals were scripted: the test script ran the person's approve commands. This is the no-account path; no real Daytona sandbox was started. After each run the runner removed the hubs it started and everything it made in the shared hub.
  • Agent runs: a pilot, 3 runs per arm on each of claude-sonnet-5-5, claude-opus-5-5. Arms: b is the Claude plugin, the local hub and this page as reading.
ArmModelChecks passedMedian secondsMedian costCommands left for the person (median)
bclaude-opus-5-515/1596.3$0.45512
bclaude-sonnet-5-515/1574.3$0.22111

No agent approved or refused a change to production.

The mini.7 pilots used a local stand-in and ten simulated readers per run. They tested the earlier reuse offer when production did not change. The revised offer waits until another change needs a sandbox trial. Only aggregate pilot results were kept, so there is no saved session to rejudge at that moment.

ArmModelPersonsOfferedNoticedWant the next step nowLaterIn the way
bclaude-opus-5-5300%100%n/an/a67%
bclaude-sonnet-5-5300%100%n/an/a87%

Rerun on the published confighub mini 0.11.1-mini.7 with plugin 0.90.0, 14 November 2026, no Daytona account, scripted approvals; the Claude plugin now reads an upload's waiting and kept lines through the page's propose script, so the offer is shown:

  • Scripted run: passed, 72 seconds for the steps, within the page's budget of 240; each of the three planted faults was caught.
  • Pilot, arm b, 3 runs on claude-sonnet-5-5 (15/15 checks, 7 to 26 seconds a task) and 2 complete runs on claude-opus-5-5 (10/10 checks); a third opus run was stopped to save cost and is not counted.
  • Simulated persons, not people, 10 per run, claude-haiku-5-5: the offer was shown to every person (100% offered) and noticed by all. Want it now: 0 of 50. Later: 24 of 50. No: 26 of 50. In the way: 80 to 90% of persons in each run.

Earlier records of this page, kept with their own date, package and scope:

  • Earlier pilot on mini.5, 14 November 2026, before the page asked the person to run the move to the shared hub: arm b, 3 runs per model, 13/15 checks on claude-opus-5-5 and 10/15 on claude-sonnet-5-5. The agents rightly declined to sign in to the team's shared hub with a proposer key, so move and delete failed in 4 of 6 runs; in one sonnet run the proposer key had not been made, so no 240 experiment existed.
  • Scripted run on the unreleased candidate, 13 November 2026: passed, 71 seconds for the steps, within the page's budget of 240.
  • The published package did not have the Daytona manifest or the structured catalog that the walkthrough expects. It stopped at the catalog check.
  • A separate run with the released Linux package ran in a real EU Daytona sandbox. The mini API and registry were loopback-only. A restricted proposer could not read the owner key or approve. The proposal changed the base from 120 to 240 and recorded its reason while live stayed at 120. After sandbox deletion, the value and reason were recovered and a fresh pending proposal was created on the parent mini. That was a scripted proposer, not an agent pilot or a running batch job.
  • A shared hub on confighub.com with released mini 0.11.1-mini.1: importing the already-changed archive did not leave a pending order. Importing the baseline and replaying 240 with the original reason did: the order was New and live still held 120. The shared app and approval workflow were removed. Upstream starter rules and version lineage were not transferred or verified.
  • A later local candidate used starters-approved/daytona@2 while starter v2 was pending (2 retries). After a scripted catalog approval, a new app used starters-approved/daytona@3 and got 3 retries. The package still contained v1. This checks the source of the starter; it does not approve or deploy a batch job.
  • The complete scripted walkthrough also passed on the merged-source candidate, including replay to a shared hub on confighub.com and the pending-order check. This was the local rehearsal with the real shared hub; it did not launch a new Daytona sandbox.
  • Downloaded mini-v0.11.1-mini.2 and verified its SHA-256. The scripted walkthrough passed in 79.9 seconds, including the hosted handoff. The scripted path is a local rehearsal, not a new Daytona sandbox run. A separate run of the checksum-verified Linux package on a real EU Daytona sandbox verified loopback listeners, owner-key isolation, refused proposer approval and unchanged live settings. The proposal and its reason were recovered after sandbox deletion. In the separate catalog check, adoption used approved v1 while v2 was pending, then used v2 from the hub after scripted catalog approval. The package still held v1.
  • Focused real Daytona Cloud check on published mini.9, 15 November 2026: a disposable EU Linux amd64 sandbox downloaded and verified the release. The shipped helper created a proposal under a key that could not approve or read the owner's key. Staging held 240; live stayed at 120. The hub showed the Git commit, the dirty checkout and the SHA-256 of the returned app.env archive. Recomputing the digest on the Mac matched what the hub showed; the extracted file held 240. The hub was removed and Daytona reported the sandbox absent. This checks the archive of the submitted settings, not an immutable snapshot of the whole sandbox or a running batch job.