Skip to content
ConfigHub for coding agents
Reference / examples/walkthroughs/tool-nono-daytona.md Source on GitHub

Run autonomous sandboxes safely with nono, Daytona, and mini exec

Run agents autonomously inside nono or Daytona without exposing live production secrets, and keep every winning setting change after the sandbox exits or is deleted.

nono enforces the kernel and OS filesystem/network boundary (blocking access to ~/.aws, ~/.ssh, and local production files), ConfigHub enforces the test-mode credential boundary (confighub mini exec --mode test refuses any sk_live_, rk_live_, pk_live_, or prod reference before boot), and --capture saves scrubbed diffs into ~/.confighub and cub mini waiting --card so nothing disappears when the sandbox is torn down.

1-Screen Claude Code Card: paste in Claude Code: "Lock STRIPE_MODE=test, boot my test suite inside a test-mode sandbox with .confighub/connections.yaml, block any live keys before execution, and propose any tuned batch settings into waiting."

╭─ ConfigHub · Safe sandbox mode (nono + Daytona) ──────────────────────╮
│ ├── 1. locks    ✓ mini lock STRIPE_MODE   (before-edit guard keeps it test) │
│ ├── 2. boot     ✓ --mode test             sk_live_* & prod blocked    │
│ ├── 3. OS box   ✓ nono + Daytona          host prod files unreadable  │
│ └── 4. capture  ⏳ waiting for you        tuned diffs saved on exit   │
│                 └── review: cub mini waiting --card                   │
╰───────────────────────────────────────────────────────────────────────╯

Quick start

You need: the ConfigHub plugin installed, an app folder with .env or app-config.json, and optionally nono or the daytona CLI (daytona login).

By handAsk your agent
Lock a safety keyconfighub mini lock STRIPE_MODE --reason "Keep test mode""Lock STRIPE_MODE in this folder so no agent can change it."
Boot a guarded test sandboxconfighub mini exec --app shop --mode test --connections .confighub/connections.yaml --capture --reason "Queue spike load test" -- npm test"Boot my tests in --mode test using .confighub/connections.yaml, refuse any live key, and capture tuned settings."
Pair with nono & Daytonanono run -- confighub mini exec --app shop --mode test --connections .confighub/connections.yaml --capture -- daytona exec -- npm test"Wrap my Daytona test run in nono with --mode test and save tuned diffs before exit."
Inspect surviving handoffscub mini waiting --card (or confighub mini exec --list)"Show any waiting sandbox handoffs or pending production changes."
Undo config or export diffconfighub mini undo --dry-run · cub mini changes --export-html diff.html"Preview a config-only undo or export a secret-redacted HTML diff report."

Without ConfigHub: a sandbox run can read real host secrets unless manually isolated, live keys only fail after booting against real APIs, and any tuned settings vanish when the container is deleted.

Deeper dive

The rest of this page shows the exact five steps to declare typed test connections, lock keys, verify that live production keys are blocked before boot, capture non-secret diffs across sandbox exit, and revert or export safely.

Show the full walkthrough

Human

For a developer or platform engineer running high-autonomy agent work locally under nono or in cloud Daytona containers.

What you need

The ConfigHub plugin binary (confighub on your plugin bin path), jq or python3 for inspecting JSON, and a scratch folder containing .env or app-config.json.

Steps

  1. Initialize a clean app folder and declare typed service connections in .confighub/connections.yaml with env://, 1password://, or vault:// references:
    mkdir -p sandbox-demo/.confighub && cd sandbox-demo
    printf '{"BATCH_SIZE":"120","STRIPE_MODE":"test"}\n' > app-config.json
    cat > .confighub/connections.yaml <<'YAML'
    app: sandbox-demo
    connections:
      stripe:
        sandbox:
          mode: test
          secret_ref: env://STRIPE_TEST_KEY
        prod:
          mode: live
          secret_ref: env://STRIPE_LIVE_KEY
    YAML
  2. Lock critical safety settings locally so coding-agent before-edit hooks block any overwrite until you explicitly unlock them:
    confighub mini lock STRIPE_MODE --reason "Keep sandbox runs in Stripe test mode"
    confighub mini card
  3. Verify the test-mode guardrail refuses to boot when a test slot accidentally holds a live credential (sk_live_*):
    STRIPE_TEST_KEY=sk_live_should_fail confighub mini exec --app sandbox-demo --mode test --capture -- sh -c 'echo should-not-run' || true
  4. Boot with a real test key (sk_test_*) and capture tuned configuration changes when the sandbox command exits:
    STRIPE_TEST_KEY=sk_test_safe_key confighub mini exec --app sandbox-demo --env sandbox --mode test --file app-config.json --capture --reason "Queue spike load test" -- sh -c 'printf "{\"BATCH_SIZE\":\"240\",\"STRIPE_MODE\":\"test\"}\n" > app-config.json'
    confighub mini exec --list
  5. Review, export a redacted report, or undo only configuration changes (leaving code edits intact), and unlock when ready:
    confighub mini changes --export-html sandbox-diff.html
    confighub mini undo --dry-run
    confighub mini lock --unlock STRIPE_MODE

    To pair with OS isolation or cloud sandboxes, prefix step 4 with nono run -- and run daytona exec -- <cmd> after -- (or run eval "$(confighub env shell --app sandbox-demo --env sandbox --mode test --capture-on-exit)" inside a persistent sandbox shell). When the folder is attached to a hub via .confighub-app, boot automatically pulls non-secret staging settings and --capture (including on SIGTERM) proposes tuned non-secret keys straight into cub mini waiting --card.

Agent

Never pass a prod secret reference or sk_live_, rk_live_, or pk_live_ credential into a sandbox run. When asked to lock a key, capture sandbox changes, or export diffs, run the corresponding confighub mini lock, confighub mini exec --mode test --capture, or confighub mini changes --export-html command, and never unlock a personal field lock without the person asking.

Testing

CheckCoverage
TestSandboxExecTestModeBlocksLiveKeyVerifies --mode test and --env sandbox|staging refuse sk_live_* credentials and prod refs before spawning any child process.
TestDeclarativeConnectionsManifestLoadAndGuardrailVerifies .confighub/connections.yaml, env://, 1password://, and vault:// resolution into child env only.
TestSandboxExecCaptureSyncCallbackAndPendingQueueVerifies scrubbed diff capture, secret redaction, pending queue, and hub sync handoff into waiting.

Run confighub mini exec --mode test with a sk_live_blocked STRIPE_TEST_KEY and verify it refuses before booting.

Boot sh -c 'printf "{\"BATCH_SIZE\":\"240\"}\n" > app-config.json' under confighub mini exec --mode test --capture and verify confighub mini exec --list shows BATCH_SIZE: 120 → 240.

This proves: a developer can lock safety keys before edits, resolve typed service connections from .confighub/connections.yaml, block live production credentials before sandbox boot, and retain scrubbed configuration diffs after an ephemeral sandbox exits without sending credentials to the hub.

Test results

30 November 2026: Go unit and hook tests (TestSandboxExec*, TestDeclarativeConnections*, TestFieldLocks*, TestUndo*, TestRenderWaitingCard*, TestPullSandboxConfig) pass on 0.11.24-mini.51 and plugin 0.99.34 (plus #1044 for boot-pull, SIGTERM capture, confighub env shell --capture-on-exit, and google-ax). A live EU Daytona sandbox run (daytona create + confighub mini exec --app shop --env sandbox --mode test --file app.env --capture -- daytona exec ...) verified pre-boot sk_live_ blocking, auto-proposed BATCH_SIZE: 120 → 240 into shop-base (shop-staging updated, shop-live waiting), displayed it in cub mini waiting --card, and deleted the sandbox cleanly.