The three runtimes
A runtime type decides whose execution model serves a run. The three runtimes, their capabilities, when each becomes ready, and the execution policy.
A runtime type (runtime.type) decides whose execution model serves a run. There are exactly three: DSH Native, Star Harness, and Codex (STUDIO_RUNTIME_TYPES in src/runtime-contract.mjs:6).
This page covers each runtime's ownership and capabilities, what has to be true before each one is selectable, and the execution-policy layer that constrains what a run may write.
Why a runtime is not an "engine option"
Reading a runtime as "a different model backend" runs into an immediate contradiction: the same agent definition exposes different capabilities on the three runtimes — some support replay, some support child tasks, some neither. That is a difference in execution ownership, not in configuration.
| What you want to do | What it requires |
|---|---|
| Replay a past run | The runtime supports replay (Codex and DSH Native do; Star Harness does not) |
| Have the agent split out child tasks | The runtime supports child-tasks (Star Harness only) |
| Resume an unfinished turn from history | The runtime supports resume (Star Harness only) |
| Deploy the agent as a resident managed runtime | The runtime is deployable (DSH Native and Codex only) |
Choosing a runtime is therefore not a style preference; it decides what you can do later. The runtime is locked at creation and cannot be changed — switching runtimes means creating a new agent.
Star Harness must be installed first
Only Star Harness is pluggable among the three: it is delivered as three npm packages (@kingsoftcloud/agentkit-harness-core / -node / -ui, currently 0.0.25), and Studio depends on them one-way — they do not depend on Studio in return.
| Runtime | Ready when | What you see before that |
|---|---|---|
dsh-native | Ready with Studio | — |
codex | The official Codex plugin is installed and enabled | Run targets shows "Provider not registered" and creation will not offer it |
harness | Installed on the plugin page + enabled + at least one usable workspace | Run targets shows "Not enabled", and the creation button is disabled with "Install and enable Star Harness on the plugin page" |
The check is canCreate from starHarnessStatus() (creatableRuntime in src/client/pages/agent-form.mjs:78). For the full procedure see Install, upgrade, and bind Star Harness.
The runtime is locked at creation and cannot be changed — switching runtimes means creating a new agent. Editing an existing Star Harness agent is unaffected by the install state, because creatableRuntime admits editing.
Star Harness has two retired aliases
Historical documentation also called Star Harness "AgentKit Harness" and "Native Harness". Both are retired. Write Star Harness (harness).
The three runtimes
| Item | DSH Native | Star Harness | Codex |
|---|---|---|---|
| Value | dsh-native | harness | codex |
| UI name | DSH Native Harness | Star Harness | Codex Agent |
| Execution owner | DSH itself | The KSADK Harness native kernel | The Codex App Server adapter inside Studio |
| Execution model | native | native-kernel | codex-app-server |
| Contract | agentkit.studio.runtime/v1 | The DSH native turn contract | studio.codex.adapter/v1 |
| Event owner | DSH session | The native run store | The Studio Codex adapter |
| Stream owner | dsh-agent/assistant-stream | native-model-port | codex-turn/item |
| Default for new agents | Yes | No | No |

点击放大 · 滚轮缩放 · 拖拽平移How to read this: the executor is not the transcript owner — within one runtime, "who runs the model loop" and "who persists the event log" are different entities. Across all four lanes only cancel is shared; every other capability belongs to one implementation and cannot be enabled by configuration.
Capability matrix
| Capability | DSH Native | Star Harness | Codex |
|---|---|---|---|
session | ✅ | — | ✅ |
session-events | ✅ | — | — |
stream | ✅ | — | ✅ |
cancel | ✅ | ✅ | ✅ |
replay | ✅ | — | ✅ |
persistence | ✅ | — | — |
build-binding | ✅ | — | ✅ |
native-run | — | ✅ | — |
durable-receipts | — | ✅ | — |
tool-approval | — | ✅ | — |
resume | — | ✅ | — |
child-tasks | — | ✅ | — |
Only cancel is supported by all three. Capability entries are not feature flags and cannot be switched on by configuration — they are part of each runtime's implementation.
Hard rules beyond the runtime
| Rule | Allowed values | Out-of-range result |
|---|---|---|
| Creating an agent | The 3 official values | RUNTIME_UNSUPPORTED |
| Team template roles | DSH Native and Star Harness only | TEAM_TEMPLATE_RUNTIME_UNSUPPORTED |
| Team run members (runtime) | Local DSH Native and Star Harness only | TEAM_AGENT_UNSUPPORTED |
| Managed deployment | DSH Native and Codex only | Never appears in the deployable list |
| Managed manifest declaration | The 3 official values | MANAGED_RUNTIME_IDENTITY_MISMATCH |
"Teams exclude Codex members" and "managed deployments exclude Star Harness" are two independent restrictions. Do not merge them into "some scenarios are limited".
Execution policy: the layer that limits writes
The runtime decides who executes; execution policy decides where execution may write. The two are orthogonal.
| Mode | Rank | Meaning | Default |
|---|---|---|---|
read-only | 0 | Read only, no workspace writes | The unattended-run default |
workspace-write | 1 | May write the workspace | Yes (cloud execution default) |
danger-full-access | 2 | Full access | A ceiling, not a default |
The ranking runs from least to most privileged. Three hard rules:
- Narrowing only, never widening. A requested mode above the deployed ceiling is clamped to the ceiling rather than rejected — so a policy change does not break requests already in flight.
- The ceiling defaults to the maximum. Cloud execution defaults to
workspace-writewith a ceiling ofdanger-full-access, so all three modes are selectable by default. - Unattended means read-only. The unattended execution policy is
read-onlywithapprovalPolicy: neverand approval source marked as a runtime policy — nobody can approve, so only reading is possible.
Besides the permission mode, a policy also carries an approval policy whose only values are ask and never. A Star Harness agent additionally carries a native permission policy (mode strict, loose, or custom) that only adds tool constraints and never grants a Host capability. New Star Harness agents default to strict.
Related tasks
Create and edit an agent
Pick a runtime in the creation form and confirm how the capabilities differ.
Approvals and permission policy
Move execution policy from its default to a production setting.
Deploy to the cloud
The managed runtime accepts only two of the three values.
Related reference
| What you need | Which page |
|---|---|
| The raw capability enumeration and contract versions | Runtime and entity contract |
RUNTIME_* error codes | Errors |
| How the three runtimes differ in deployment form | Runtimes compared |
| Execution-policy environment variables | Environment |