How to Use Environment Configspublic

Last verified 13 Oct 2026

DigitalOcean Harness Runtime provides managed, hardware-isolated microVM sandboxes with built-in tools such as Chromium to run harnesses and execute arbitrary code. Rich lifecycle APIs preserve conversational history and working state across sessions, letting you pause, resume, and fork work to control costs and adapt to the nonlinear nature of agentic workflows. Scale complete agents such as Claude Code or use sandboxes independently for code execution, all through the same service. See What You Can Build for example use cases.

Starting a Harness Runtime session with doctl harness-runtime create --spec uploads the YAML spec each time and saves it as a new Environment Config with the session’s name. That config remains after the session ends. When you run the same setup repeatedly, save it once as a named Environment Config and start as many sessions from it as you need.

An Environment Config is immutable. It always produces the same environment, so a config ID always refers to one specific configuration.

Create an Environment Config

Create a config from a spec file and give it a name. To write the spec first, see Create an Environment Using a Coding Adapter.

doctl harness-runtime config create --spec codex-spec.yaml --name my-codex-setup

Credentials in a config are handled the same way as credentials in a session spec. Values you declare under secrets go to DigitalOcean Secrets Manager when the config is created. Values under env stay debug-readable inside the sandbox, so keep credentials out of env. For the full field list, see the Environment Spec Reference.

Because a config is immutable, changing a setup requires creating a new config from the updated spec.

Start a Session from an Environment Config

List the saved configurations to find the name or ID of the one you want:

doctl harness-runtime config list

Start a session from that config:

doctl harness-runtime config start-session <config-name-or-id> --name <your-session-name>

Alternatively, you can use the --from-config flag:

doctl harness-runtime create --from-config <config-name-or-id> --name <your-session-name>

The session runs the setup defined in the config. Attach to it, pause it, and remove it with the usual commands, described in Manage Harness Runtime Sessions.

Trace a Session Back to Its Config

Every session records the config it started from. To see the config for a single session, show the session:

doctl harness-runtime show <your-session-name>

To list every session a config has produced, pass the config ID:

doctl harness-runtime config list-sessions <config-id>

Delete an Environment Config

Delete a config you no longer need, or one that blocks revoking a GitHub connection. Find the config ID with doctl harness-runtime config list, then delete it:

doctl harness-runtime config delete <config-id>

You cannot delete a config while it has active sessions. List them with doctl harness-runtime config list-sessions <config-id>, remove each session, and then delete the config.

After you delete a config, no one on your team can start sessions from it.

We can't find any results for your search.

Try using different keywords or simplifying your search terms.