You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/design/agent-workflows/projects/runner-selfhosting-cleanup/README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ The normal deployment uses one runner service. That runner can support both loca
27
27
- API and web get provider availability from the same environment value, set once per deployment by the hosting templates. A discovery endpoint is deferred (RSH-7).
28
28
- Daytona configuration belongs under the runner namespace. Code-evaluator Daytona configuration is separate.
29
29
- The runner never discovers an operator's home directory or automatically uploads Pi or Claude OAuth state.
30
-
- Subscription authentication is an explicit local self-hosting setup: a read-only Compose volume mount taught in a tutorial. There is no bootstrap manifest in version 1 (RSH-4).
30
+
- Subscription authentication is an explicit local self-hosting setup: a read-write Compose volume mount taught in a tutorial. The harness runs directly out of the mount so it can refresh its own OAuth token; there is no per-run copy and no bootstrap manifest in version 1 (RSH-4).
31
31
- Runtime customization (extra binaries, certificates, dependencies) happens through operator-built images and the shipped Daytona snapshot scripts, not runner configuration.
32
32
- Remote subscription authentication is unsupported until the relevant provider explicitly approves the integration and Agenta defines a safe product contract.
33
33
- Pi installation is detected and repaired by the runtime. There is no deployment-wide "Pi is installed" boolean.
@@ -50,7 +50,7 @@ The normal deployment uses one runner service. That runner can support both loca
50
50
- Runner provider selection and configuration.
51
51
- Runner-specific Daytona names and validation.
52
52
- Runner-to-Services routing and authentication.
53
-
- Local subscription setup through explicit read-only mounts.
53
+
- Local subscription setup through explicit read-write mounts.
54
54
- Removal of automatic Daytona OAuth upload.
55
55
- Removal of deployment-wide runtime facts and hidden policy switches.
56
56
- A structured warning when a durable mount degrades.
Copy file name to clipboardExpand all lines: docs/design/agent-workflows/projects/runner-selfhosting-cleanup/context.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ DAYTONA_JWT_TOKEN and DAYTONA_ORGANIZATION_ID.
50
50
51
51
Nothing was wrong with the user's Daytona account. The request reached a runner deployment that was not configured for Daytona. The setup made it easy to split capabilities accidentally.
52
52
53
-
The target local QA deployment is one trusted development runner with both providers enabled and explicit read-only local subscription mounts. This is a development convenience, not a production multi-tenant topology. A local harness shares the runner container and can inspect other same-user processes through `/proc`.
53
+
The target local QA deployment is one trusted development runner with both providers enabled and explicit read-write local subscription mounts. This is a development convenience, not a production multi-tenant topology. A local harness shares the runner container and can inspect other same-user processes through `/proc`.
Copy file name to clipboardExpand all lines: docs/design/agent-workflows/projects/runner-selfhosting-cleanup/interface.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -187,20 +187,24 @@ The two problems this replaces the manifest for:
187
187
188
188
### Local subscription mounts
189
189
190
-
The operator mounts credential state read-only into the runner container and points the harness config variable at it. The Compose files ship commented examples:
190
+
The operator mounts credential state read-write into the runner container and points the harness config variable at it. The Compose files ship commented examples:
191
191
192
192
~~~yaml
193
193
runner:
194
194
# Opt-in: use your own harness subscription for local runs.
195
195
# volumes:
196
-
# - ~/.pi:/agenta/harness/pi:ro
196
+
# - ~/.pi:/agenta/harness/pi:rw
197
197
# environment:
198
198
# - PI_CODING_AGENT_DIR=/agenta/harness/pi
199
199
~~~
200
200
201
201
Rules:
202
202
203
-
- Mounts are read-only. The runner copies the state into a per-run directory so harness writes never touch the operator's source credential.
203
+
- Mounts are read-write, and the harness runs directly out of the mount. There is no per-run copy of the credential state.
204
+
205
+
A subscription login is an OAuth login: the harness refreshes its access token mid-run and writes the new one back to its own config directory. A read-only mount plus a per-run copy discarded that refresh, so as soon as the provider rotated the refresh token the next run failed and the operator had to log in again by hand. Letting the harness own its token lifecycle, exactly as it does on a normal local install, is the only shape that survives rotation.
206
+
207
+
The tradeoff: harness writes land in the operator's login directory (refreshed tokens, and any skills or system prompt a run installs), and concurrent local subscription runs share that directory the same way two local harness sessions do. This path is single-trusted-operator only, so both are acceptable.
204
208
- A `runtime_provided` local run without the matching mount fails with an error naming the missing configuration.
205
209
- Mounted subscription state never leaves the runner container. Daytona runs never receive it.
206
210
- One personal subscription belongs to one operator. The docs state this is a single-tenant convenience.
@@ -250,7 +254,7 @@ The fail-loud contract (a required mount failure fails the run, no silent durabl
250
254
251
255
### Docker Compose
252
256
253
-
The runner service enumerates only runner variables. It has no shared `env_file`. The examples include commented, opt-in read-only volumes for subscription inputs (section 6).
257
+
The runner service enumerates only runner variables. It has no shared `env_file`. The examples include commented, opt-in read-write volumes for subscription inputs (section 6).
254
258
255
259
One runner service can enable `local,daytona`; there is no second subscription runner in the default stack.
Copy file name to clipboardExpand all lines: docs/design/agent-workflows/projects/runner-selfhosting-cleanup/open-issues.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ No implementation or tutorial should precede that decision.
26
26
27
27
## RSH-4: Declarative bootstrap assets, hooks, and network plugins
28
28
29
-
Version 1 ships no bootstrap manifest at all: local subscription state arrives through an operator-owned read-only Compose mount, and runtime customization happens through images and snapshots. If operator demand shows a real need for declarative per-run file assets (typed manifest, validation, Daytona upload of non-auth files), design it then, together with hooks: repository checkout, VPN enrollment, certificate rotation, custom initialization.
29
+
Version 1 ships no bootstrap manifest at all: local subscription state arrives through an operator-owned read-write Compose mount, and runtime customization happens through images and snapshots. If operator demand shows a real need for declarative per-run file assets (typed manifest, validation, Daytona upload of non-auth files), design it then, together with hooks: repository checkout, VPN enrollment, certificate rotation, custom initialization.
Copy file name to clipboardExpand all lines: docs/design/agent-workflows/projects/runner-selfhosting-cleanup/research.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ That couples three unrelated decisions:
34
34
2. the runner happens to have Pi state;
35
35
3. the state should be copied to a third-party remote sandbox.
36
36
37
-
The target removes this inference. Local subscription use requires an explicit read-only mount. Daytona runtime-provided subscription authentication is unsupported in version 1.
37
+
The target removes this inference. Local subscription use requires an explicit read-write mount. Daytona runtime-provided subscription authentication is unsupported in version 1.
Copy file name to clipboardExpand all lines: docs/design/agent-workflows/projects/runner-selfhosting-cleanup/status.md
+47-3Lines changed: 47 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ Last updated: 2026-07-13
9
9
Owner review plus a second reviewing agent converged on a re-scope for the MVP release. All four owner comments were adopted:
10
10
11
11
- Cut the runner `GET /capabilities` endpoint. API and runner read the same enabled-provider value from one deployment entry (the API already had this pattern via `AGENTA_SANDBOX_LOCAL_ALLOWED`). Deferred as RSH-7.
12
-
- Cut the declarative bootstrap manifest. Local subscriptions use an operator-owned read-only Compose mount; runtime customization uses custom images and the existing Daytona snapshot scripts. Deferred as RSH-4.
12
+
- Cut the declarative bootstrap manifest. Local subscriptions use an operator-owned read-write Compose mount; runtime customization uses custom images and the existing Daytona snapshot scripts. Deferred as RSH-4.
13
13
- Cut the fail-loud mount rework. Version 1 keeps best-effort behavior plus one structured degradation warning. Deferred as RSH-11.
14
14
- Confirmed customization is owned by the operator through scripts and images, not runner environment machinery.
15
15
@@ -46,10 +46,54 @@ The managed-deployment migration is assessed in a private working note outside t
46
46
47
47
-[ ] Phase 0: local QA and snapshot repair.
48
48
-[ ] Phase 1: canonical names and typed runner configuration.
49
-
-[] Phase 2: runner environment narrowing.
50
-
-[] Phase 3: subscription cleanup.
49
+
-[x] Phase 2: runner environment narrowing.
50
+
-[x] Phase 3: subscription cleanup.
51
51
-[ ] Phase 4: hosting layout and public documentation.
52
52
53
+
## Phases 2 + 3 landed (2026-07-14)
54
+
55
+
Shipped in `fix/runner-env-narrowing` (stacked on `refactor/runner-config-names`):
56
+
57
+
- Deleted `shouldUploadOwnLogin` + `uploadPiAuthToSandbox` and their tests. The runner no longer
58
+
discovers its own Pi login and uploads it to a Daytona sandbox.
59
+
-`buildRunPlan` rejects Daytona + `runtime_provided`, and rejects a local `runtime_provided` run
60
+
whose subscription mount (`PI_CODING_AGENT_DIR` / `CLAUDE_CONFIG_DIR`) is unset, before any
61
+
sandbox side effect.
62
+
- Local `runtime_provided` Pi and Claude runs read and write the operator's read-write mounted
63
+
login DIRECTLY: no per-run copy. The harness refreshes its own OAuth token and the new token
64
+
persists to the mount, so a rotated refresh token no longer breaks the next run. Tradeoff:
65
+
concurrent local subscription runs share the harness config dir (single-trusted-operator path).
66
+
- Removed the static `AGENTA_API_KEY` exporter fallback in `tracing/otel.ts`; export auth rides
67
+
the per-run caller credential.
68
+
- One structured `mount degraded kind=<k> cause=<c>` warning at each durable-null site
- Helm: `AGENTA_RUNNER_TOKEN` wired via `agentRunner.auth.tokenSecretRef` in
71
+
`runner-deployment.yaml` + `_helpers.tpl` (both ends), values.yaml/schema examples, and a
72
+
rendered-chart secret-absence test (`hosting/kubernetes/helm/tests/`) wired into CI.
73
+
- Compose: commented opt-in read-write subscription mount examples on the OSS + EE runner service.
74
+
75
+
No-ops on this base (deletions already satisfied, nothing to remove): `commonEnv` is absent from
76
+
the runner deployment (the #5286 include that would add it is not an ancestor of this base),
77
+
`AGENTA_RUNNER_INHERIT_ALL_PROVIDER_KEYS` has zero code occurrences, and
78
+
`AGENTA_SESSION_HARNESS_MOUNTS` was already removed from `services/runner/src` in phase 1.
79
+
80
+
## Deferred to post-release: credentialMode strictness flip
81
+
82
+
The interface's required-`credentialMode` contract (interface.md section 5) is NOT free on this
83
+
base, so the flip is deliberately deferred and this slice keeps the existing inference branch.
84
+
85
+
The caller audit (research.md / the env-narrowing spec section 9) found one structural path that
86
+
omits the field: a **model-less agent template** in the SDK agent handler. When `_agent_model_ref`
87
+
returns `None` (`sdks/python/agenta/sdk/agents/handler.py`, model-less template branch), no
88
+
`resolved_connection` is threaded, so `wire_resolved_connection()` returns `{}` and the run request
89
+
carries no `credentialMode` / `provider` / `deployment`. Every model-configured caller sends all
90
+
three via `ResolvedConnection.to_wire()`.
91
+
92
+
Post-release work to unblock the flip: thread a sentinel `ResolvedConnection` (credential_mode
93
+
`"none"`, or `"runtime_provided"` for a self-managed harness) when `model_ref is None` in
94
+
`handler.py`, confirm across the matrix, then make `credentialMode` required in `buildRunPlan` and
95
+
delete the inference branch. `AGENTA_RUNNER_INHERIT_ALL_PROVIDER_KEYS` is already deleted (no-op).
96
+
53
97
## Review guidance
54
98
55
99
The draft PR has inline decision threads on the most consequential choices. Resolve those before implementation. Small naming edits can land directly in this workspace; changes that alter credential movement, remote subscription support, or mount behavior should update the interface, plan, and QA documents together.
0 commit comments