Skip to content

Environments

An environment is what new sandboxes start with:

  • Repositories: public or private, cloned into the home folder.
  • Variables: settings that aren’t secret, such as NODE_ENV.
  • Secrets: tokens and passwords.
  • A setup script: runs once in each new sandbox, after the repositories are cloned.
  • Tool servers (MCP): added to the agent’s settings.
  • House rules: instructions every agent reads.

Saving an environment makes a new version.

  • New sandboxes get the current version.
  • Sandboxes already made keep the version they started with, so a change never breaks a sandbox in the middle of its work.
  • Versions lists each version with who made it and when.

Secrets are sealed in your region and never shown again, to you or anyone else.

By default a secret never enters a sandbox.

  • The sandbox holds a stand-in, a value starting lnsec_.
  • On the way out, Stillbox swaps the stand-in for the real value, but only on requests to the services you name for that secret (for example github.com).
  • A stand-in copied out of the sandbox is worthless: it only works for that sandbox (and copies of it).

Some secrets can’t be swapped that way, such as a database password used over a database connection.

  • An owner can allow secrets inside sandboxes in Features.
  • A secret set to inside the sandbox is then put in it as it is.
  • Each time one is handed to a sandbox, it’s recorded in the audit log.

Rotation. Changing a secret’s value reaches every sandbox using the environment. No new version is needed.

  1. Add a secret holding an access token, for services such as github.com (or your GitLab host).
  2. Choose it as the repository’s access token.

The token stands in the repository’s address inside the sandbox, so git pull and git push work without the real token ever entering it.

This works through the credential broker: when the sandbox talks to github.com, Stillbox checks the connection, replaces the stand-in with the real token, and passes the request on. A stand-in sent anywhere else stays a stand-in.

Sandboxes made from an environment send their web traffic through Stillbox’s credential broker.

  • Traffic to a secret’s services (for example github.com, or a subdomain of it) is opened by Stillbox. Stand-ins in request headers, including inside a username and password, and in the address’s query are replaced with the real values. The request then goes on to the service, whose certificate Stillbox checks.
  • Everything else passes through untouched.

What the sandbox trusts. So it can open that traffic, a new sandbox trusts your region’s broker certificate (/usr/local/share/ca-certificates/stillbox-broker.crt). NODE_EXTRA_CA_CERTS, SSL_CERT_FILE and REQUESTS_CA_BUNDLE point at it, so Node, git, curl and Python work without changes.

Record. The first use of each secret in an hour is recorded in the audit log, with the service it went to.

Limits:

  • Stand-ins in request bodies aren’t replaced. Use a header, as git, REST APIs and tool servers do.
  • A program that pins a service’s certificate can’t use a stand-in for that service. For such a secret, use inside the sandbox.

Two kinds:

  • Remote: an address and headers.
  • Local: a command, its arguments and variables.

Secrets in tool servers. Write ${NAME} to use a secret or variable, for example Authorization: Bearer ${LINEAR_KEY}.

Which agents: they’re added to Claude Code, Codex and OpenCode. Hermes and OpenClaw get the repositories, variables, secrets and house rules for now.

Where the house rules go:

  • Claude Code: its personal instructions, ~/.claude/CLAUDE.md.
  • Codex: ~/.codex/AGENTS.md.
  • OpenCode: ~/.config/opencode/AGENTS.md.
  • Other agents: AGENTS.md in the home folder.

Anything already in those files is kept.

A new sandbox prepares its environment in the background.

Where to see it: the sandbox’s page shows each step, with any error. The setup script’s output is in ~/.stillbox/setup.log.

Run setup again re-runs the script, for example after fixing a secret.

Sleep and restarts don’t repeat setup.

Terminal window
stillbox environments create "Billing API" --file billing.json
printf %s "$GITHUB_TOKEN" | stillbox environments secret set env-… GITHUB_TOKEN --host github.com
stillbox create --environment env-…

billing.json:

{
"repositories": [{"url": "https://github.com/acme/billing", "branch": "main", "credential": "GITHUB_TOKEN"}],
"variables": {"NODE_ENV": "development"},
"setup_script": "cd ~/billing && npm ci",
"mcp_servers": [{"name": "linear", "url": "https://mcp.linear.app/mcp",
"headers": {"Authorization": "Bearer ${LINEAR_KEY}"}}],
"house_rules": "Run npm test before committing."
}
  • Members create, change and use environments, and set secrets.
  • Auditors can read environments but not secrets’ values.
  • Owners decide whether secrets may go inside sandboxes.