You cannot delete a config if there are active sessions using it.
How to Use Environment Configspublic
Last verified 21 Sep 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. When you run the same setup repeatedly, save it once as an 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-setupCredentials 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 listStart 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>