From ba5f4e7bc47f62b8df731def1e1b13e9439a6223 Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Tue, 29 Sep 2026 08:57:22 -0400 Subject: [PATCH 01/28] docs(adr): runner-owned policy for native Codex children Record the decision #6970 needs before any implementation: Codex review and retro children run under roles and models the runner provisions, a mandatory dispatch hook that admits only fresh-context V1 spawns of registered roles, and a spawn-time digest check on the hook and role files. Write protection of those files is an option, not chosen. Cross-reference the new ADR from the Accepted ADR 0104, whose persona frontmatter the Codex policy does not apply. Signed-off-by: Dharit Shah --- .../ADRs/0104-per-persona-model-resolution.md | 3 + .../0126-runner-owned-codex-child-policy.md | 87 +++++++++++++++++++ docs/architecture.md | 1 + 3 files changed, 91 insertions(+) create mode 100644 docs/ADRs/0126-runner-owned-codex-child-policy.md diff --git a/docs/ADRs/0104-per-persona-model-resolution.md b/docs/ADRs/0104-per-persona-model-resolution.md index 24c791b988..faf199adc7 100644 --- a/docs/ADRs/0104-per-persona-model-resolution.md +++ b/docs/ADRs/0104-per-persona-model-resolution.md @@ -17,6 +17,9 @@ Date: 2026-09-05 Accepted +Codex child model resolution and native role dispatch are defined in +[ADR 0126](0126-runner-owned-codex-child-policy.md). + ## Context Sub-agent skills (pr-review, retro-analysis) dispatch children by passing a diff --git a/docs/ADRs/0126-runner-owned-codex-child-policy.md b/docs/ADRs/0126-runner-owned-codex-child-policy.md new file mode 100644 index 0000000000..685f817d43 --- /dev/null +++ b/docs/ADRs/0126-runner-owned-codex-child-policy.md @@ -0,0 +1,87 @@ +--- +title: "126. Runner-owned policy for native Codex children" +status: Accepted +relates_to: + - agent-architecture + - security-threat-model +topics: + - runtime + - sub-agents + - security +--- + +# 126. Runner-owned policy for native Codex children + +Date: 2026-09-29 + +## Status + +Accepted + +## Context + +Review and retro dispatch sub-agents with fresh contexts and selected personas +([agent architecture](../problems/agent-architecture.md)). On Codex they run in one +context today: fullsend registers no roles, although Codex already offers its native +`spawn_agent` tool to parent models whose catalog entry selects collaboration V1 +([#6970](https://github.com/fullsend-ai/fullsend/issues/6970)). + +[ADR 0104](0104-per-persona-model-resolution.md) makes child models a runner decision +and planned Codex support for `agents[].subagents`. Its persona frontmatter does not +carry over: `model:` values are Claude aliases, and Codex has no per-child tool +allowlist, so ADR 0104's rule that an unservable `tools:` list fails Bootstrap would +reject every review persona. Codex also rereads a role's file and `$CODEX_HOME/hooks.json` +whenever a child starts, so the launch-time checks of +[ADR 0100](0100-codex-sandbox-hooks.md) do not cover children, and the model chooses +the spawn arguments: context inheritance, model, effort and resume. + +## Options + +1. **Single context (status quo).** No new mechanism; review and retro keep no + independent child contexts on Codex. +2. **Native children governed by instructions only.** Nothing enforces fresh context, + depth or model choice; a parent can fork its conversation into the challenger or + pick any OpenAI model. +3. **Native children under a runner-owned role and dispatch policy** (chosen). +4. **Option 3 plus write protection of the runtime's files.** Closes the + time-of-check window noted below. Each way to do it adds a platform requirement: + Landlock needs kernel 6.2+ and a Python outside the sandbox's writable paths, and + stops new top-level `$HOME` entries; a read-only OpenShell path is fixed at sandbox + creation, before the per-run files exist; roles baked into the image tie them to + image releases. A separate decision if the residual below is not acceptable. + +## Decision + +Codex children run under a policy the runner provisions and enforces. + +- Only an agent whose tools include `Agent` delegates, as on Claude Code and pi. + Bootstrap registers its skill personas plus a generic `default` and an + instruction-only `explore` role. Other agents run with Codex's multi-agent tools off. +- Child models resolve as in ADR 0104 without the frontmatter step: + `subagents.`, then `subagents.default`, then the parent's live model. Only + OpenAI model IDs are accepted, and an explicit model that cannot be served fails + rather than falling back. Persona `model:` and `tools:` frontmatter is reported, not + applied. +- A mandatory PreToolUse hook, installed even when optional security hooks are off, + admits only a V1 spawn of a registered role with `fork_context: false` and no model + or effort override. It rejects resume and any spawn from a child. Native + configuration limits depth to one and open children to four. +- Before admitting a spawn, the hook checks `hooks.json` and the role files against + digests the runner recorded at Bootstrap, as the ADR 0100 adapter does for each + hook script before invoking it. + +## Consequences + +- Review and retro can delegate on Codex once the paired instructions ship; a parent + model whose catalog entry selects collaboration V2 cannot delegate under this policy. +- Departures from ADR 0104 on Codex: persona `model:` is not applied, persona `tools:` + are instructions only (every child has the parent's shell and `apply_patch`), and an + unregistered role is always rejected because `default` and `explore` are always + registered. +- `code` and `fix` declare no `tools:`, so they also get roles, as on pi. +- The spawn-time check has ADR 0100's residual: a change that lands between the check + and the child's load goes undetected within the iteration. +- Token totals include children, attributed per native thread; Codex still reports no + dollar cost. +- Role loading, hook reload and collaboration tool names are revalidated on each Codex + CLI bump. diff --git a/docs/architecture.md b/docs/architecture.md index 9e4bcae143..4fd40dedab 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -243,6 +243,7 @@ flowchart TB - The `fullsend run` runner delegates in-sandbox agent execution to a `runtime.Runtime` interface; production orgs default to Claude Code, with [pi](https://github.com/earendil-works/pi) available as an opt-in second runtime (`runtime: pi`, Claude-on-Vertex through the same WIF credential path) and [codex](https://github.com/openai/codex) as a third (`runtime: codex`, OpenAI-only through a custom model provider whose bearer token comes from a runner-seeded file, with the sandbox tool hooks behind a translating adapter — [ADR 0099](ADRs/0099-codex-agent-runtime.md) and [ADR 0100](ADRs/0100-codex-sandbox-hooks.md)). Runtime selection is configured per repo with `runtime:` in `.fullsend/config.yaml` (per-agent `runtime`/`model`/`effort`/`subagents` on the agent's `agents:` entry sit above it and below the `--runtime`/`--model`/`--effort` flags and `FULLSEND_*` variables, [ADR 0091](ADRs/0091-per-agent-runtime-model-effort.md)) and resolved via `runtime.ResolveForAgent()`. Test-only runtimes — **dummy** (scripted operations) and **dummy-playback** (playlist-based replay of canned results) — execute in the real OpenShell sandbox for behaviour tests without inference. Bootstrap uses a portable `BootstrapInput` interface with optional extensions such as `SandboxHooksBootstrap` for the runtime-neutral sandbox tool hooks ([ADR 0090](ADRs/0090-runtime-neutral-sandbox-hooks-contract.md)); runtimes declare further capabilities through small optional interfaces (`DebugLogNamer`, `ContextBridger`) rather than `Name()` checks in the runner. Transcript and debug artifact handling use a separate `TranscriptHandler` interface. See [runtimes.md](runtimes.md) for the per-runtime security feature matrix required when adding a new backend. - Plugins are runtime-scoped harness resources: a harness declares `plugins:` as one list of directories in its own repository (same trust and fetch path as skills), and each entry's format decides which runtime loads it — a `plugin.json` bundle is Claude Code's, a directory pi's `-e` loader resolves is uploaded and loaded after a tree-hash preflight computed from the host copy. Each runtime names and skips the entries in the other format, so the list survives a runtime switch. Because `--no-extensions` plus explicit `-e` closes the set of code that can register tools, no per-tool declaration is needed ([ADR 0094](ADRs/0094-pi-extensions-are-harness-resources.md)). +- Native Codex children run under a runner-owned policy: Bootstrap registers roles and resolves their models, and a mandatory dispatch hook admits only fresh-context V1 spawns of registered roles after checking the hook and role files against runner-held digests ([ADR 0126](ADRs/0126-runner-owned-codex-child-policy.md)). ### Behaviour testing From 66a8f947cff2a6f873d303c75b6143eb5d39cb01 Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Tue, 29 Sep 2026 09:22:28 -0400 Subject: [PATCH 02/28] docs(adr): state that the Codex dispatch hook fails closed A policy violation, digest mismatch, missing file, unreadable input or hook error denies the spawn with exit 2, the only exit Codex treats as a block. Name the timeout residual ADR 0100 already records. Signed-off-by: Dharit Shah --- docs/ADRs/0126-runner-owned-codex-child-policy.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/ADRs/0126-runner-owned-codex-child-policy.md b/docs/ADRs/0126-runner-owned-codex-child-policy.md index 685f817d43..52450d45d3 100644 --- a/docs/ADRs/0126-runner-owned-codex-child-policy.md +++ b/docs/ADRs/0126-runner-owned-codex-child-policy.md @@ -69,6 +69,9 @@ Codex children run under a policy the runner provisions and enforces. - Before admitting a spawn, the hook checks `hooks.json` and the role files against digests the runner recorded at Bootstrap, as the ADR 0100 adapter does for each hook script before invoking it. +- The hook fails closed: a policy violation, a digest mismatch, a missing file, + unreadable input or any error in the hook denies the spawn with exit 2 and a reason, + the only exit Codex treats as a block. Bootstrap fails if it cannot install the hook. ## Consequences @@ -79,8 +82,9 @@ Codex children run under a policy the runner provisions and enforces. unregistered role is always rejected because `default` and `explore` are always registered. - `code` and `fix` declare no `tools:`, so they also get roles, as on pi. -- The spawn-time check has ADR 0100's residual: a change that lands between the check - and the child's load goes undetected within the iteration. +- The spawn-time check has ADR 0100's residuals: a change that lands between the check + and the child's load goes undetected within the iteration, and a handler Codex cannot + complete, such as one that times out, is recorded as failed and does not block. - Token totals include children, attributed per native thread; Codex still reports no dollar cost. - Role loading, hook reload and collaboration tool names are revalidated on each Codex From de5760cadec6ba2eb56a4943e763c665e0b7abb5 Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Tue, 29 Sep 2026 09:28:38 -0400 Subject: [PATCH 03/28] docs(adr): trim the Landlock option to its platform requirements Signed-off-by: Dharit Shah --- docs/ADRs/0126-runner-owned-codex-child-policy.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/ADRs/0126-runner-owned-codex-child-policy.md b/docs/ADRs/0126-runner-owned-codex-child-policy.md index 52450d45d3..a642fd2321 100644 --- a/docs/ADRs/0126-runner-owned-codex-child-policy.md +++ b/docs/ADRs/0126-runner-owned-codex-child-policy.md @@ -45,8 +45,8 @@ the spawn arguments: context inheritance, model, effort and resume. 3. **Native children under a runner-owned role and dispatch policy** (chosen). 4. **Option 3 plus write protection of the runtime's files.** Closes the time-of-check window noted below. Each way to do it adds a platform requirement: - Landlock needs kernel 6.2+ and a Python outside the sandbox's writable paths, and - stops new top-level `$HOME` entries; a read-only OpenShell path is fixed at sandbox + Landlock needs kernel 6.2+ and stops new top-level `$HOME` entries; a read-only + OpenShell path is fixed at sandbox creation, before the per-run files exist; roles baked into the image tie them to image releases. A separate decision if the residual below is not acceptable. From 5a6f3d744150a6f191d8d925b1c02cbde3dbf4f7 Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Tue, 29 Sep 2026 09:31:36 -0400 Subject: [PATCH 04/28] docs(adr): name an interpreter that fails to start as a non-blocking hook residual Signed-off-by: Dharit Shah --- docs/ADRs/0126-runner-owned-codex-child-policy.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/ADRs/0126-runner-owned-codex-child-policy.md b/docs/ADRs/0126-runner-owned-codex-child-policy.md index a642fd2321..d8481256db 100644 --- a/docs/ADRs/0126-runner-owned-codex-child-policy.md +++ b/docs/ADRs/0126-runner-owned-codex-child-policy.md @@ -84,7 +84,8 @@ Codex children run under a policy the runner provisions and enforces. - `code` and `fix` declare no `tools:`, so they also get roles, as on pi. - The spawn-time check has ADR 0100's residuals: a change that lands between the check and the child's load goes undetected within the iteration, and a handler Codex cannot - complete, such as one that times out, is recorded as failed and does not block. + complete, such as one that times out or whose interpreter fails to start, is recorded + as failed and does not block. - Token totals include children, attributed per native thread; Codex still reports no dollar cost. - Role loading, hook reload and collaboration tool names are revalidated on each Codex From 4da197dfd7bed8544f7b1a14e48606bc868a99f1 Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Tue, 29 Sep 2026 11:51:19 -0400 Subject: [PATCH 05/28] docs(adr): write each Codex child's configured model into its role file Signed-off-by: Dharit Shah --- docs/ADRs/0126-runner-owned-codex-child-policy.md | 8 +++++--- docs/architecture.md | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/ADRs/0126-runner-owned-codex-child-policy.md b/docs/ADRs/0126-runner-owned-codex-child-policy.md index d8481256db..f7d9133120 100644 --- a/docs/ADRs/0126-runner-owned-codex-child-policy.md +++ b/docs/ADRs/0126-runner-owned-codex-child-policy.md @@ -58,7 +58,9 @@ Codex children run under a policy the runner provisions and enforces. Bootstrap registers its skill personas plus a generic `default` and an instruction-only `explore` role. Other agents run with Codex's multi-agent tools off. - Child models resolve as in ADR 0104 without the frontmatter step: - `subagents.`, then `subagents.default`, then the parent's live model. Only + `subagents.`, then `subagents.default`, then the parent's live model. + Bootstrap generates each role file and writes a configured model into it; a role + with nothing configured carries no model, so its child inherits the parent's. Only OpenAI model IDs are accepted, and an explicit model that cannot be served fails rather than falling back. Persona `model:` and `tools:` frontmatter is reported, not applied. @@ -88,5 +90,5 @@ Codex children run under a policy the runner provisions and enforces. as failed and does not block. - Token totals include children, attributed per native thread; Codex still reports no dollar cost. -- Role loading, hook reload and collaboration tool names are revalidated on each Codex - CLI bump. +- Role loading, child model inheritance, hook reload and collaboration tool names are + revalidated on each Codex CLI bump. diff --git a/docs/architecture.md b/docs/architecture.md index 4fd40dedab..40730355e6 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -243,7 +243,7 @@ flowchart TB - The `fullsend run` runner delegates in-sandbox agent execution to a `runtime.Runtime` interface; production orgs default to Claude Code, with [pi](https://github.com/earendil-works/pi) available as an opt-in second runtime (`runtime: pi`, Claude-on-Vertex through the same WIF credential path) and [codex](https://github.com/openai/codex) as a third (`runtime: codex`, OpenAI-only through a custom model provider whose bearer token comes from a runner-seeded file, with the sandbox tool hooks behind a translating adapter — [ADR 0099](ADRs/0099-codex-agent-runtime.md) and [ADR 0100](ADRs/0100-codex-sandbox-hooks.md)). Runtime selection is configured per repo with `runtime:` in `.fullsend/config.yaml` (per-agent `runtime`/`model`/`effort`/`subagents` on the agent's `agents:` entry sit above it and below the `--runtime`/`--model`/`--effort` flags and `FULLSEND_*` variables, [ADR 0091](ADRs/0091-per-agent-runtime-model-effort.md)) and resolved via `runtime.ResolveForAgent()`. Test-only runtimes — **dummy** (scripted operations) and **dummy-playback** (playlist-based replay of canned results) — execute in the real OpenShell sandbox for behaviour tests without inference. Bootstrap uses a portable `BootstrapInput` interface with optional extensions such as `SandboxHooksBootstrap` for the runtime-neutral sandbox tool hooks ([ADR 0090](ADRs/0090-runtime-neutral-sandbox-hooks-contract.md)); runtimes declare further capabilities through small optional interfaces (`DebugLogNamer`, `ContextBridger`) rather than `Name()` checks in the runner. Transcript and debug artifact handling use a separate `TranscriptHandler` interface. See [runtimes.md](runtimes.md) for the per-runtime security feature matrix required when adding a new backend. - Plugins are runtime-scoped harness resources: a harness declares `plugins:` as one list of directories in its own repository (same trust and fetch path as skills), and each entry's format decides which runtime loads it — a `plugin.json` bundle is Claude Code's, a directory pi's `-e` loader resolves is uploaded and loaded after a tree-hash preflight computed from the host copy. Each runtime names and skips the entries in the other format, so the list survives a runtime switch. Because `--no-extensions` plus explicit `-e` closes the set of code that can register tools, no per-tool declaration is needed ([ADR 0094](ADRs/0094-pi-extensions-are-harness-resources.md)). -- Native Codex children run under a runner-owned policy: Bootstrap registers roles and resolves their models, and a mandatory dispatch hook admits only fresh-context V1 spawns of registered roles after checking the hook and role files against runner-held digests ([ADR 0126](ADRs/0126-runner-owned-codex-child-policy.md)). +- Native Codex children run under a runner-owned policy: Bootstrap registers roles and writes each configured model into its role file, and a mandatory dispatch hook admits only fresh-context V1 spawns of registered roles after checking `hooks.json` and the role files against runner-held digests ([ADR 0126](ADRs/0126-runner-owned-codex-child-policy.md)). ### Behaviour testing From 28a73f0ac3ae7713a5a5bcfcedd0b665b5fc8cee Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Tue, 29 Sep 2026 11:51:28 -0400 Subject: [PATCH 06/28] docs(adr): give Codex children no default model or environment override Signed-off-by: Dharit Shah --- docs/ADRs/0126-runner-owned-codex-child-policy.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/ADRs/0126-runner-owned-codex-child-policy.md b/docs/ADRs/0126-runner-owned-codex-child-policy.md index f7d9133120..cd254f6eaa 100644 --- a/docs/ADRs/0126-runner-owned-codex-child-policy.md +++ b/docs/ADRs/0126-runner-owned-codex-child-policy.md @@ -58,12 +58,12 @@ Codex children run under a policy the runner provisions and enforces. Bootstrap registers its skill personas plus a generic `default` and an instruction-only `explore` role. Other agents run with Codex's multi-agent tools off. - Child models resolve as in ADR 0104 without the frontmatter step: - `subagents.`, then `subagents.default`, then the parent's live model. - Bootstrap generates each role file and writes a configured model into it; a role - with nothing configured carries no model, so its child inherits the parent's. Only - OpenAI model IDs are accepted, and an explicit model that cannot be served fails - rather than falling back. Persona `model:` and `tools:` frontmatter is reported, not - applied. + `subagents.`, then `subagents.default`, then the parent's live model, with + no Codex-specific default model or environment override. Bootstrap generates each + role file and writes a configured model into it; a role with nothing configured + carries no model, so its child inherits the parent's. Only OpenAI model IDs are + accepted, and an explicit model that cannot be served fails rather than falling + back. Persona `model:` and `tools:` frontmatter is reported, not applied. - A mandatory PreToolUse hook, installed even when optional security hooks are off, admits only a V1 spawn of a registered role with `fork_context: false` and no model or effort override. It rejects resume and any spawn from a child. Native From 6f7da7a9d47b74de1621c2f9f1ea7cc84fbca058 Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Tue, 29 Sep 2026 11:51:36 -0400 Subject: [PATCH 07/28] docs(adr): make Codex delegation opt-in through subagents Signed-off-by: Dharit Shah --- .../0126-runner-owned-codex-child-policy.md | 20 +++++++++++-------- docs/architecture.md | 2 +- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/docs/ADRs/0126-runner-owned-codex-child-policy.md b/docs/ADRs/0126-runner-owned-codex-child-policy.md index cd254f6eaa..0cb28471cc 100644 --- a/docs/ADRs/0126-runner-owned-codex-child-policy.md +++ b/docs/ADRs/0126-runner-owned-codex-child-policy.md @@ -54,9 +54,11 @@ the spawn arguments: context inheritance, model, effort and resume. Codex children run under a policy the runner provisions and enforces. -- Only an agent whose tools include `Agent` delegates, as on Claude Code and pi. - Bootstrap registers its skill personas plus a generic `default` and an - instruction-only `explore` role. Other agents run with Codex's multi-agent tools off. +- An agent delegates only when its tools include `Agent` (an absent `tools:` includes + it, as on Claude Code and pi) and its merged `agents[]` entry names a model under at + least one `subagents` key. Bootstrap then registers its skill personas plus a generic + `default` and an instruction-only `explore` role. Other agents run with Codex's + multi-agent tools off. - Child models resolve as in ADR 0104 without the frontmatter step: `subagents.`, then `subagents.default`, then the parent's live model, with no Codex-specific default model or environment override. Bootstrap generates each @@ -77,13 +79,15 @@ Codex children run under a policy the runner provisions and enforces. ## Consequences -- Review and retro can delegate on Codex once the paired instructions ship; a parent - model whose catalog entry selects collaboration V2 cannot delegate under this policy. +- Review and retro can delegate on Codex once the paired instructions ship and their + entries name a `subagents` model; a parent model whose catalog entry selects + collaboration V2 cannot delegate under this policy. - Departures from ADR 0104 on Codex: persona `model:` is not applied, persona `tools:` are instructions only (every child has the parent's shell and `apply_patch`), and an - unregistered role is always rejected because `default` and `explore` are always - registered. -- `code` and `fix` declare no `tools:`, so they also get roles, as on pi. + unregistered role is always rejected, because a delegating agent always has `default` + and `explore` registered. +- An agent whose entry names no `subagents` model stays single-context on Codex, unlike + on Claude Code and pi. - The spawn-time check has ADR 0100's residuals: a change that lands between the check and the child's load goes undetected within the iteration, and a handler Codex cannot complete, such as one that times out or whose interpreter fails to start, is recorded diff --git a/docs/architecture.md b/docs/architecture.md index 40730355e6..d9225d62c9 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -243,7 +243,7 @@ flowchart TB - The `fullsend run` runner delegates in-sandbox agent execution to a `runtime.Runtime` interface; production orgs default to Claude Code, with [pi](https://github.com/earendil-works/pi) available as an opt-in second runtime (`runtime: pi`, Claude-on-Vertex through the same WIF credential path) and [codex](https://github.com/openai/codex) as a third (`runtime: codex`, OpenAI-only through a custom model provider whose bearer token comes from a runner-seeded file, with the sandbox tool hooks behind a translating adapter — [ADR 0099](ADRs/0099-codex-agent-runtime.md) and [ADR 0100](ADRs/0100-codex-sandbox-hooks.md)). Runtime selection is configured per repo with `runtime:` in `.fullsend/config.yaml` (per-agent `runtime`/`model`/`effort`/`subagents` on the agent's `agents:` entry sit above it and below the `--runtime`/`--model`/`--effort` flags and `FULLSEND_*` variables, [ADR 0091](ADRs/0091-per-agent-runtime-model-effort.md)) and resolved via `runtime.ResolveForAgent()`. Test-only runtimes — **dummy** (scripted operations) and **dummy-playback** (playlist-based replay of canned results) — execute in the real OpenShell sandbox for behaviour tests without inference. Bootstrap uses a portable `BootstrapInput` interface with optional extensions such as `SandboxHooksBootstrap` for the runtime-neutral sandbox tool hooks ([ADR 0090](ADRs/0090-runtime-neutral-sandbox-hooks-contract.md)); runtimes declare further capabilities through small optional interfaces (`DebugLogNamer`, `ContextBridger`) rather than `Name()` checks in the runner. Transcript and debug artifact handling use a separate `TranscriptHandler` interface. See [runtimes.md](runtimes.md) for the per-runtime security feature matrix required when adding a new backend. - Plugins are runtime-scoped harness resources: a harness declares `plugins:` as one list of directories in its own repository (same trust and fetch path as skills), and each entry's format decides which runtime loads it — a `plugin.json` bundle is Claude Code's, a directory pi's `-e` loader resolves is uploaded and loaded after a tree-hash preflight computed from the host copy. Each runtime names and skips the entries in the other format, so the list survives a runtime switch. Because `--no-extensions` plus explicit `-e` closes the set of code that can register tools, no per-tool declaration is needed ([ADR 0094](ADRs/0094-pi-extensions-are-harness-resources.md)). -- Native Codex children run under a runner-owned policy: Bootstrap registers roles and writes each configured model into its role file, and a mandatory dispatch hook admits only fresh-context V1 spawns of registered roles after checking `hooks.json` and the role files against runner-held digests ([ADR 0126](ADRs/0126-runner-owned-codex-child-policy.md)). +- Native Codex children run under a runner-owned policy: for an agent whose entry names a `subagents` model, Bootstrap registers roles and writes each configured model into its role file, and a mandatory dispatch hook admits only fresh-context V1 spawns of registered roles after checking `hooks.json` and the role files against runner-held digests ([ADR 0126](ADRs/0126-runner-owned-codex-child-policy.md)). ### Behaviour testing From adb26d54be510acd2a76b2445f22f11af3467db0 Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Tue, 29 Sep 2026 11:51:44 -0400 Subject: [PATCH 08/28] docs(adr): turn Codex delegation off when harness security is disabled Signed-off-by: Dharit Shah --- .../ADRs/0126-runner-owned-codex-child-policy.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/ADRs/0126-runner-owned-codex-child-policy.md b/docs/ADRs/0126-runner-owned-codex-child-policy.md index 0cb28471cc..5f038d28a8 100644 --- a/docs/ADRs/0126-runner-owned-codex-child-policy.md +++ b/docs/ADRs/0126-runner-owned-codex-child-policy.md @@ -55,10 +55,10 @@ the spawn arguments: context inheritance, model, effort and resume. Codex children run under a policy the runner provisions and enforces. - An agent delegates only when its tools include `Agent` (an absent `tools:` includes - it, as on Claude Code and pi) and its merged `agents[]` entry names a model under at - least one `subagents` key. Bootstrap then registers its skill personas plus a generic - `default` and an instruction-only `explore` role. Other agents run with Codex's - multi-agent tools off. + it, as on Claude Code and pi), its merged `agents[]` entry names a model under at + least one `subagents` key, and harness security is enabled. Bootstrap then registers + its skill personas plus a generic `default` and an instruction-only `explore` role. + Other agents run with Codex's multi-agent tools off. - Child models resolve as in ADR 0104 without the frontmatter step: `subagents.`, then `subagents.default`, then the parent's live model, with no Codex-specific default model or environment override. Bootstrap generates each @@ -66,10 +66,10 @@ Codex children run under a policy the runner provisions and enforces. carries no model, so its child inherits the parent's. Only OpenAI model IDs are accepted, and an explicit model that cannot be served fails rather than falling back. Persona `model:` and `tools:` frontmatter is reported, not applied. -- A mandatory PreToolUse hook, installed even when optional security hooks are off, - admits only a V1 spawn of a registered role with `fork_context: false` and no model - or effort override. It rejects resume and any spawn from a child. Native - configuration limits depth to one and open children to four. +- A mandatory PreToolUse hook, installed whenever harness security is enabled, even with + every individual sandbox hook disabled, admits only a V1 spawn of a registered role with + `fork_context: false` and no model or effort override. It rejects resume and any spawn + from a child. Native configuration limits depth to one and open children to four. - Before admitting a spawn, the hook checks `hooks.json` and the role files against digests the runner recorded at Bootstrap, as the ADR 0100 adapter does for each hook script before invoking it. From f4f7baf08cb316a7f2aeefdcd24bb24963f32bc6 Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Tue, 29 Sep 2026 11:51:52 -0400 Subject: [PATCH 09/28] docs(adr): drop per-thread attribution from Codex token totals Signed-off-by: Dharit Shah --- docs/ADRs/0126-runner-owned-codex-child-policy.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/ADRs/0126-runner-owned-codex-child-policy.md b/docs/ADRs/0126-runner-owned-codex-child-policy.md index 5f038d28a8..15f6791078 100644 --- a/docs/ADRs/0126-runner-owned-codex-child-policy.md +++ b/docs/ADRs/0126-runner-owned-codex-child-policy.md @@ -92,7 +92,6 @@ Codex children run under a policy the runner provisions and enforces. and the child's load goes undetected within the iteration, and a handler Codex cannot complete, such as one that times out or whose interpreter fails to start, is recorded as failed and does not block. -- Token totals include children, attributed per native thread; Codex still reports no - dollar cost. +- Token totals include children; Codex still reports no dollar cost. - Role loading, child model inheritance, hook reload and collaboration tool names are revalidated on each Codex CLI bump. From 1e62fb8f339359e7d8425e676058498cd2c2c7c0 Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Tue, 29 Sep 2026 11:52:01 -0400 Subject: [PATCH 10/28] docs(adr): mark the Codex child policy in architecture.md as not yet implemented Signed-off-by: Dharit Shah --- docs/architecture.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/architecture.md b/docs/architecture.md index d9225d62c9..a08c070cb8 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -243,7 +243,7 @@ flowchart TB - The `fullsend run` runner delegates in-sandbox agent execution to a `runtime.Runtime` interface; production orgs default to Claude Code, with [pi](https://github.com/earendil-works/pi) available as an opt-in second runtime (`runtime: pi`, Claude-on-Vertex through the same WIF credential path) and [codex](https://github.com/openai/codex) as a third (`runtime: codex`, OpenAI-only through a custom model provider whose bearer token comes from a runner-seeded file, with the sandbox tool hooks behind a translating adapter — [ADR 0099](ADRs/0099-codex-agent-runtime.md) and [ADR 0100](ADRs/0100-codex-sandbox-hooks.md)). Runtime selection is configured per repo with `runtime:` in `.fullsend/config.yaml` (per-agent `runtime`/`model`/`effort`/`subagents` on the agent's `agents:` entry sit above it and below the `--runtime`/`--model`/`--effort` flags and `FULLSEND_*` variables, [ADR 0091](ADRs/0091-per-agent-runtime-model-effort.md)) and resolved via `runtime.ResolveForAgent()`. Test-only runtimes — **dummy** (scripted operations) and **dummy-playback** (playlist-based replay of canned results) — execute in the real OpenShell sandbox for behaviour tests without inference. Bootstrap uses a portable `BootstrapInput` interface with optional extensions such as `SandboxHooksBootstrap` for the runtime-neutral sandbox tool hooks ([ADR 0090](ADRs/0090-runtime-neutral-sandbox-hooks-contract.md)); runtimes declare further capabilities through small optional interfaces (`DebugLogNamer`, `ContextBridger`) rather than `Name()` checks in the runner. Transcript and debug artifact handling use a separate `TranscriptHandler` interface. See [runtimes.md](runtimes.md) for the per-runtime security feature matrix required when adding a new backend. - Plugins are runtime-scoped harness resources: a harness declares `plugins:` as one list of directories in its own repository (same trust and fetch path as skills), and each entry's format decides which runtime loads it — a `plugin.json` bundle is Claude Code's, a directory pi's `-e` loader resolves is uploaded and loaded after a tree-hash preflight computed from the host copy. Each runtime names and skips the entries in the other format, so the list survives a runtime switch. Because `--no-extensions` plus explicit `-e` closes the set of code that can register tools, no per-tool declaration is needed ([ADR 0094](ADRs/0094-pi-extensions-are-harness-resources.md)). -- Native Codex children run under a runner-owned policy: for an agent whose entry names a `subagents` model, Bootstrap registers roles and writes each configured model into its role file, and a mandatory dispatch hook admits only fresh-context V1 spawns of registered roles after checking `hooks.json` and the role files against runner-held digests ([ADR 0126](ADRs/0126-runner-owned-codex-child-policy.md)). +- Native Codex children run under a runner-owned policy: for an agent whose entry names a `subagents` model, Bootstrap registers roles and writes each configured model into its role file, and a mandatory dispatch hook admits only fresh-context V1 spawns of registered roles after checking `hooks.json` and the role files against runner-held digests ([ADR 0126](ADRs/0126-runner-owned-codex-child-policy.md)); not yet implemented, so review and retro still run in one context on Codex ([#6970](https://github.com/fullsend-ai/fullsend/issues/6970)). ### Behaviour testing From 06152c7824b8e0b9129818819aa81c5e882c0ae3 Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Tue, 29 Sep 2026 15:03:41 -0400 Subject: [PATCH 11/28] docs(adr): let every agent with the Agent tool delegate on Codex Signed-off-by: Dharit Shah --- .../0126-runner-owned-codex-child-policy.md | 17 +++++++---------- docs/architecture.md | 2 +- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/docs/ADRs/0126-runner-owned-codex-child-policy.md b/docs/ADRs/0126-runner-owned-codex-child-policy.md index 15f6791078..4a8109d43a 100644 --- a/docs/ADRs/0126-runner-owned-codex-child-policy.md +++ b/docs/ADRs/0126-runner-owned-codex-child-policy.md @@ -54,11 +54,10 @@ the spawn arguments: context inheritance, model, effort and resume. Codex children run under a policy the runner provisions and enforces. -- An agent delegates only when its tools include `Agent` (an absent `tools:` includes - it, as on Claude Code and pi), its merged `agents[]` entry names a model under at - least one `subagents` key, and harness security is enabled. Bootstrap then registers - its skill personas plus a generic `default` and an instruction-only `explore` role. - Other agents run with Codex's multi-agent tools off. +- An agent delegates when its tools include `Agent` (an absent `tools:` includes it, as + on Claude Code and pi) and harness security is enabled. Bootstrap then registers its + skill personas plus a generic `default` and an instruction-only `explore` role. Other + agents run with Codex's multi-agent tools off. - Child models resolve as in ADR 0104 without the frontmatter step: `subagents.`, then `subagents.default`, then the parent's live model, with no Codex-specific default model or environment override. Bootstrap generates each @@ -79,15 +78,13 @@ Codex children run under a policy the runner provisions and enforces. ## Consequences -- Review and retro can delegate on Codex once the paired instructions ship and their - entries name a `subagents` model; a parent model whose catalog entry selects - collaboration V2 cannot delegate under this policy. +- Review and retro can delegate on Codex once the paired instructions ship; a parent + model whose catalog entry selects collaboration V2 cannot delegate under this policy. - Departures from ADR 0104 on Codex: persona `model:` is not applied, persona `tools:` are instructions only (every child has the parent's shell and `apply_patch`), and an unregistered role is always rejected, because a delegating agent always has `default` and `explore` registered. -- An agent whose entry names no `subagents` model stays single-context on Codex, unlike - on Claude Code and pi. +- `code` and `fix` declare no `tools:`, so they also get roles, as on pi. - The spawn-time check has ADR 0100's residuals: a change that lands between the check and the child's load goes undetected within the iteration, and a handler Codex cannot complete, such as one that times out or whose interpreter fails to start, is recorded diff --git a/docs/architecture.md b/docs/architecture.md index a08c070cb8..ce135e1f92 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -243,7 +243,7 @@ flowchart TB - The `fullsend run` runner delegates in-sandbox agent execution to a `runtime.Runtime` interface; production orgs default to Claude Code, with [pi](https://github.com/earendil-works/pi) available as an opt-in second runtime (`runtime: pi`, Claude-on-Vertex through the same WIF credential path) and [codex](https://github.com/openai/codex) as a third (`runtime: codex`, OpenAI-only through a custom model provider whose bearer token comes from a runner-seeded file, with the sandbox tool hooks behind a translating adapter — [ADR 0099](ADRs/0099-codex-agent-runtime.md) and [ADR 0100](ADRs/0100-codex-sandbox-hooks.md)). Runtime selection is configured per repo with `runtime:` in `.fullsend/config.yaml` (per-agent `runtime`/`model`/`effort`/`subagents` on the agent's `agents:` entry sit above it and below the `--runtime`/`--model`/`--effort` flags and `FULLSEND_*` variables, [ADR 0091](ADRs/0091-per-agent-runtime-model-effort.md)) and resolved via `runtime.ResolveForAgent()`. Test-only runtimes — **dummy** (scripted operations) and **dummy-playback** (playlist-based replay of canned results) — execute in the real OpenShell sandbox for behaviour tests without inference. Bootstrap uses a portable `BootstrapInput` interface with optional extensions such as `SandboxHooksBootstrap` for the runtime-neutral sandbox tool hooks ([ADR 0090](ADRs/0090-runtime-neutral-sandbox-hooks-contract.md)); runtimes declare further capabilities through small optional interfaces (`DebugLogNamer`, `ContextBridger`) rather than `Name()` checks in the runner. Transcript and debug artifact handling use a separate `TranscriptHandler` interface. See [runtimes.md](runtimes.md) for the per-runtime security feature matrix required when adding a new backend. - Plugins are runtime-scoped harness resources: a harness declares `plugins:` as one list of directories in its own repository (same trust and fetch path as skills), and each entry's format decides which runtime loads it — a `plugin.json` bundle is Claude Code's, a directory pi's `-e` loader resolves is uploaded and loaded after a tree-hash preflight computed from the host copy. Each runtime names and skips the entries in the other format, so the list survives a runtime switch. Because `--no-extensions` plus explicit `-e` closes the set of code that can register tools, no per-tool declaration is needed ([ADR 0094](ADRs/0094-pi-extensions-are-harness-resources.md)). -- Native Codex children run under a runner-owned policy: for an agent whose entry names a `subagents` model, Bootstrap registers roles and writes each configured model into its role file, and a mandatory dispatch hook admits only fresh-context V1 spawns of registered roles after checking `hooks.json` and the role files against runner-held digests ([ADR 0126](ADRs/0126-runner-owned-codex-child-policy.md)); not yet implemented, so review and retro still run in one context on Codex ([#6970](https://github.com/fullsend-ai/fullsend/issues/6970)). +- Native Codex children run under a runner-owned policy: Bootstrap registers roles for an agent with the `Agent` tool and writes each configured model into its role file, and a mandatory dispatch hook admits only fresh-context V1 spawns of registered roles after checking `hooks.json` and the role files against runner-held digests ([ADR 0126](ADRs/0126-runner-owned-codex-child-policy.md)); not yet implemented, so review and retro still run in one context on Codex ([#6970](https://github.com/fullsend-ai/fullsend/issues/6970)). ### Behaviour testing From 0695d04a699f59a4acb32378dbffba22cee76f4b Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Tue, 29 Sep 2026 15:03:49 -0400 Subject: [PATCH 12/28] docs(adr): resolve Codex child models as decided on #6970 Signed-off-by: Dharit Shah --- .../0126-runner-owned-codex-child-policy.md | 25 ++++++++++--------- docs/architecture.md | 2 +- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/docs/ADRs/0126-runner-owned-codex-child-policy.md b/docs/ADRs/0126-runner-owned-codex-child-policy.md index 4a8109d43a..e77fe35de4 100644 --- a/docs/ADRs/0126-runner-owned-codex-child-policy.md +++ b/docs/ADRs/0126-runner-owned-codex-child-policy.md @@ -58,13 +58,13 @@ Codex children run under a policy the runner provisions and enforces. on Claude Code and pi) and harness security is enabled. Bootstrap then registers its skill personas plus a generic `default` and an instruction-only `explore` role. Other agents run with Codex's multi-agent tools off. -- Child models resolve as in ADR 0104 without the frontmatter step: - `subagents.`, then `subagents.default`, then the parent's live model, with - no Codex-specific default model or environment override. Bootstrap generates each - role file and writes a configured model into it; a role with nothing configured - carries no model, so its child inherits the parent's. Only OpenAI model IDs are - accepted, and an explicit model that cannot be served fails rather than falling - back. Persona `model:` and `tools:` frontmatter is reported, not applied. +- Child models resolve in the order decided on #6970: `subagents.`, then + `FULLSEND_CODEX_SUBAGENT_MODEL`, then `subagents.default`, then `gpt-5.6-luna`. + Bootstrap generates each role file. A persona with its own entry carries that model + in its role file; every other child runs the run-level default, which Bootstrap sets + as `agents.default_subagent_model`. Only OpenAI model IDs are accepted, and an + explicit model that cannot be served fails rather than falling back. Persona `model:` + and `tools:` frontmatter is reported, not applied. - A mandatory PreToolUse hook, installed whenever harness security is enabled, even with every individual sandbox hook disabled, admits only a V1 spawn of a registered role with `fork_context: false` and no model or effort override. It rejects resume and any spawn @@ -80,15 +80,16 @@ Codex children run under a policy the runner provisions and enforces. - Review and retro can delegate on Codex once the paired instructions ship; a parent model whose catalog entry selects collaboration V2 cannot delegate under this policy. -- Departures from ADR 0104 on Codex: persona `model:` is not applied, persona `tools:` - are instructions only (every child has the parent's shell and `apply_patch`), and an - unregistered role is always rejected, because a delegating agent always has `default` - and `explore` registered. +- Departures from ADR 0104 on Codex: persona `model:` is not applied, the chain adds + `FULLSEND_CODEX_SUBAGENT_MODEL` and ends at `gpt-5.6-luna` instead of the parent's + live model, persona `tools:` are instructions only (every child has the parent's + shell and `apply_patch`), and an unregistered role is always rejected, because a + delegating agent always has `default` and `explore` registered. - `code` and `fix` declare no `tools:`, so they also get roles, as on pi. - The spawn-time check has ADR 0100's residuals: a change that lands between the check and the child's load goes undetected within the iteration, and a handler Codex cannot complete, such as one that times out or whose interpreter fails to start, is recorded as failed and does not block. - Token totals include children; Codex still reports no dollar cost. -- Role loading, child model inheritance, hook reload and collaboration tool names are +- Role loading, child model binding, hook reload and collaboration tool names are revalidated on each Codex CLI bump. diff --git a/docs/architecture.md b/docs/architecture.md index ce135e1f92..90633b4fd5 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -243,7 +243,7 @@ flowchart TB - The `fullsend run` runner delegates in-sandbox agent execution to a `runtime.Runtime` interface; production orgs default to Claude Code, with [pi](https://github.com/earendil-works/pi) available as an opt-in second runtime (`runtime: pi`, Claude-on-Vertex through the same WIF credential path) and [codex](https://github.com/openai/codex) as a third (`runtime: codex`, OpenAI-only through a custom model provider whose bearer token comes from a runner-seeded file, with the sandbox tool hooks behind a translating adapter — [ADR 0099](ADRs/0099-codex-agent-runtime.md) and [ADR 0100](ADRs/0100-codex-sandbox-hooks.md)). Runtime selection is configured per repo with `runtime:` in `.fullsend/config.yaml` (per-agent `runtime`/`model`/`effort`/`subagents` on the agent's `agents:` entry sit above it and below the `--runtime`/`--model`/`--effort` flags and `FULLSEND_*` variables, [ADR 0091](ADRs/0091-per-agent-runtime-model-effort.md)) and resolved via `runtime.ResolveForAgent()`. Test-only runtimes — **dummy** (scripted operations) and **dummy-playback** (playlist-based replay of canned results) — execute in the real OpenShell sandbox for behaviour tests without inference. Bootstrap uses a portable `BootstrapInput` interface with optional extensions such as `SandboxHooksBootstrap` for the runtime-neutral sandbox tool hooks ([ADR 0090](ADRs/0090-runtime-neutral-sandbox-hooks-contract.md)); runtimes declare further capabilities through small optional interfaces (`DebugLogNamer`, `ContextBridger`) rather than `Name()` checks in the runner. Transcript and debug artifact handling use a separate `TranscriptHandler` interface. See [runtimes.md](runtimes.md) for the per-runtime security feature matrix required when adding a new backend. - Plugins are runtime-scoped harness resources: a harness declares `plugins:` as one list of directories in its own repository (same trust and fetch path as skills), and each entry's format decides which runtime loads it — a `plugin.json` bundle is Claude Code's, a directory pi's `-e` loader resolves is uploaded and loaded after a tree-hash preflight computed from the host copy. Each runtime names and skips the entries in the other format, so the list survives a runtime switch. Because `--no-extensions` plus explicit `-e` closes the set of code that can register tools, no per-tool declaration is needed ([ADR 0094](ADRs/0094-pi-extensions-are-harness-resources.md)). -- Native Codex children run under a runner-owned policy: Bootstrap registers roles for an agent with the `Agent` tool and writes each configured model into its role file, and a mandatory dispatch hook admits only fresh-context V1 spawns of registered roles after checking `hooks.json` and the role files against runner-held digests ([ADR 0126](ADRs/0126-runner-owned-codex-child-policy.md)); not yet implemented, so review and retro still run in one context on Codex ([#6970](https://github.com/fullsend-ai/fullsend/issues/6970)). +- Native Codex children run under a runner-owned policy: Bootstrap registers roles for an agent with the `Agent` tool and binds each child's model (a persona's own entry in its role file, the run-level default otherwise), and a mandatory dispatch hook admits only fresh-context V1 spawns of registered roles after checking `hooks.json` and the role files against runner-held digests ([ADR 0126](ADRs/0126-runner-owned-codex-child-policy.md)); not yet implemented, so review and retro still run in one context on Codex ([#6970](https://github.com/fullsend-ai/fullsend/issues/6970)). ### Behaviour testing From f3dc2452ca3eaf6254721ae6f2ad6ac2aa1a03f6 Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Tue, 29 Sep 2026 15:38:25 -0400 Subject: [PATCH 13/28] docs(adr): state how the Codex child hook denies a spawn Exit 2 blocks a tool call only with a reason on stderr. Codex records exit 2 without a reason, and any other non-zero exit, as a failed hook and lets the call proceed. Observed on Codex 0.157.0 and 0.159.0. Signed-off-by: Dharit Shah --- docs/ADRs/0126-runner-owned-codex-child-policy.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/ADRs/0126-runner-owned-codex-child-policy.md b/docs/ADRs/0126-runner-owned-codex-child-policy.md index e77fe35de4..b3af032528 100644 --- a/docs/ADRs/0126-runner-owned-codex-child-policy.md +++ b/docs/ADRs/0126-runner-owned-codex-child-policy.md @@ -73,8 +73,9 @@ Codex children run under a policy the runner provisions and enforces. digests the runner recorded at Bootstrap, as the ADR 0100 adapter does for each hook script before invoking it. - The hook fails closed: a policy violation, a digest mismatch, a missing file, - unreadable input or any error in the hook denies the spawn with exit 2 and a reason, - the only exit Codex treats as a block. Bootstrap fails if it cannot install the hook. + unreadable input or any error in the hook denies the spawn by exiting 2 with a reason + on stderr. Codex lets the call proceed after exit 2 without a reason or any other + non-zero exit. Bootstrap fails if it cannot install the hook. ## Consequences From e6ccd5640d2967f9bee0f13198d0de7f932ffbe8 Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Wed, 30 Sep 2026 11:30:26 -0400 Subject: [PATCH 14/28] docs(adr): rename ADR 0126 to a fullsend-owned mechanism for Codex sub-agents Title and file name follow the maintainer's wording on #7827. The two links to the file are updated; the body is unchanged. Signed-off-by: Dharit Shah --- docs/ADRs/0104-per-persona-model-resolution.md | 2 +- ...child-policy.md => 0126-fullsend-owned-codex-subagents.md} | 4 ++-- docs/architecture.md | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) rename docs/ADRs/{0126-runner-owned-codex-child-policy.md => 0126-fullsend-owned-codex-subagents.md} (97%) diff --git a/docs/ADRs/0104-per-persona-model-resolution.md b/docs/ADRs/0104-per-persona-model-resolution.md index faf199adc7..44531c362a 100644 --- a/docs/ADRs/0104-per-persona-model-resolution.md +++ b/docs/ADRs/0104-per-persona-model-resolution.md @@ -18,7 +18,7 @@ Date: 2026-09-05 Accepted Codex child model resolution and native role dispatch are defined in -[ADR 0126](0126-runner-owned-codex-child-policy.md). +[ADR 0126](0126-fullsend-owned-codex-subagents.md). ## Context diff --git a/docs/ADRs/0126-runner-owned-codex-child-policy.md b/docs/ADRs/0126-fullsend-owned-codex-subagents.md similarity index 97% rename from docs/ADRs/0126-runner-owned-codex-child-policy.md rename to docs/ADRs/0126-fullsend-owned-codex-subagents.md index b3af032528..e4126ac1a3 100644 --- a/docs/ADRs/0126-runner-owned-codex-child-policy.md +++ b/docs/ADRs/0126-fullsend-owned-codex-subagents.md @@ -1,5 +1,5 @@ --- -title: "126. Runner-owned policy for native Codex children" +title: "126. Fullsend-owned mechanism for Codex sub-agents" status: Accepted relates_to: - agent-architecture @@ -10,7 +10,7 @@ topics: - security --- -# 126. Runner-owned policy for native Codex children +# 126. Fullsend-owned mechanism for Codex sub-agents Date: 2026-09-29 diff --git a/docs/architecture.md b/docs/architecture.md index 90633b4fd5..208d4670c9 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -243,7 +243,7 @@ flowchart TB - The `fullsend run` runner delegates in-sandbox agent execution to a `runtime.Runtime` interface; production orgs default to Claude Code, with [pi](https://github.com/earendil-works/pi) available as an opt-in second runtime (`runtime: pi`, Claude-on-Vertex through the same WIF credential path) and [codex](https://github.com/openai/codex) as a third (`runtime: codex`, OpenAI-only through a custom model provider whose bearer token comes from a runner-seeded file, with the sandbox tool hooks behind a translating adapter — [ADR 0099](ADRs/0099-codex-agent-runtime.md) and [ADR 0100](ADRs/0100-codex-sandbox-hooks.md)). Runtime selection is configured per repo with `runtime:` in `.fullsend/config.yaml` (per-agent `runtime`/`model`/`effort`/`subagents` on the agent's `agents:` entry sit above it and below the `--runtime`/`--model`/`--effort` flags and `FULLSEND_*` variables, [ADR 0091](ADRs/0091-per-agent-runtime-model-effort.md)) and resolved via `runtime.ResolveForAgent()`. Test-only runtimes — **dummy** (scripted operations) and **dummy-playback** (playlist-based replay of canned results) — execute in the real OpenShell sandbox for behaviour tests without inference. Bootstrap uses a portable `BootstrapInput` interface with optional extensions such as `SandboxHooksBootstrap` for the runtime-neutral sandbox tool hooks ([ADR 0090](ADRs/0090-runtime-neutral-sandbox-hooks-contract.md)); runtimes declare further capabilities through small optional interfaces (`DebugLogNamer`, `ContextBridger`) rather than `Name()` checks in the runner. Transcript and debug artifact handling use a separate `TranscriptHandler` interface. See [runtimes.md](runtimes.md) for the per-runtime security feature matrix required when adding a new backend. - Plugins are runtime-scoped harness resources: a harness declares `plugins:` as one list of directories in its own repository (same trust and fetch path as skills), and each entry's format decides which runtime loads it — a `plugin.json` bundle is Claude Code's, a directory pi's `-e` loader resolves is uploaded and loaded after a tree-hash preflight computed from the host copy. Each runtime names and skips the entries in the other format, so the list survives a runtime switch. Because `--no-extensions` plus explicit `-e` closes the set of code that can register tools, no per-tool declaration is needed ([ADR 0094](ADRs/0094-pi-extensions-are-harness-resources.md)). -- Native Codex children run under a runner-owned policy: Bootstrap registers roles for an agent with the `Agent` tool and binds each child's model (a persona's own entry in its role file, the run-level default otherwise), and a mandatory dispatch hook admits only fresh-context V1 spawns of registered roles after checking `hooks.json` and the role files against runner-held digests ([ADR 0126](ADRs/0126-runner-owned-codex-child-policy.md)); not yet implemented, so review and retro still run in one context on Codex ([#6970](https://github.com/fullsend-ai/fullsend/issues/6970)). +- Native Codex children run under a runner-owned policy: Bootstrap registers roles for an agent with the `Agent` tool and binds each child's model (a persona's own entry in its role file, the run-level default otherwise), and a mandatory dispatch hook admits only fresh-context V1 spawns of registered roles after checking `hooks.json` and the role files against runner-held digests ([ADR 0126](ADRs/0126-fullsend-owned-codex-subagents.md)); not yet implemented, so review and retro still run in one context on Codex ([#6970](https://github.com/fullsend-ai/fullsend/issues/6970)). ### Behaviour testing From 24e1dcede985a0c9ceed3d0e74d48ca1c7e8affb Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Thu, 1 Oct 2026 09:14:40 -0400 Subject: [PATCH 15/28] docs(adr): answer the review of ADR 0126 on V2 tool names, the checker residual and model checks - The hook's matcher is a suffix pattern over the spawn and resume tool names, so it runs under every collaboration namespace and admits only the exact V1 spawn; a V2 parent gets the multi-agent tools turned off at Bootstrap. Resume is a separate tool, not a spawn argument. - The residual is a rewritten checker within an iteration, which Option 4 closes; the spawn-time digest check covers mid-iteration role edits only. - The model chain records why the environment variable sits where it does and why gpt-5.6-luna is the floor; Bootstrap checks resolved child models against the pinned CLI's bundled catalog. - Behaviour claims are tied to rust-v0.157.0; ADR 0100 points to 0126. Signed-off-by: Dharit Shah --- docs/ADRs/0100-codex-sandbox-hooks.md | 3 + .../0126-fullsend-owned-codex-subagents.md | 59 +++++++++++++------ 2 files changed, 44 insertions(+), 18 deletions(-) diff --git a/docs/ADRs/0100-codex-sandbox-hooks.md b/docs/ADRs/0100-codex-sandbox-hooks.md index 3722fbc284..6792b1e5c9 100644 --- a/docs/ADRs/0100-codex-sandbox-hooks.md +++ b/docs/ADRs/0100-codex-sandbox-hooks.md @@ -18,6 +18,9 @@ Date: 2026-09-02 Accepted +The hook contract is extended to native Codex children by +[ADR 0126](0126-fullsend-owned-codex-subagents.md). + ## Context [ADR 0090](0090-runtime-neutral-sandbox-hooks-contract.md) made the sandbox tool hooks — Tirith, diff --git a/docs/ADRs/0126-fullsend-owned-codex-subagents.md b/docs/ADRs/0126-fullsend-owned-codex-subagents.md index e4126ac1a3..9987580f58 100644 --- a/docs/ADRs/0126-fullsend-owned-codex-subagents.md +++ b/docs/ADRs/0126-fullsend-owned-codex-subagents.md @@ -32,8 +32,12 @@ carry over: `model:` values are Claude aliases, and Codex has no per-child tool allowlist, so ADR 0104's rule that an unservable `tools:` list fails Bootstrap would reject every review persona. Codex also rereads a role's file and `$CODEX_HOME/hooks.json` whenever a child starts, so the launch-time checks of -[ADR 0100](0100-codex-sandbox-hooks.md) do not cover children, and the model chooses -the spawn arguments: context inheritance, model, effort and resume. +[ADR 0100](0100-codex-sandbox-hooks.md) do not cover children. The model chooses the +spawn arguments (context inheritance, model, effort) and can reopen a closed child +through a separate resume tool. The spawn and resume tools carry different names under +each collaboration version (`spawn_agent` and `multi_agent_v1resume_agent` under V1, +`collaborationspawn_agent` under V2 on `rust-v0.157.0`), so a hook keyed on one exact +name misses the others. ## Options @@ -55,20 +59,31 @@ the spawn arguments: context inheritance, model, effort and resume. Codex children run under a policy the runner provisions and enforces. - An agent delegates when its tools include `Agent` (an absent `tools:` includes it, as - on Claude Code and pi) and harness security is enabled. Bootstrap then registers its - skill personas plus a generic `default` and an instruction-only `explore` role. Other - agents run with Codex's multi-agent tools off. + on Claude Code and pi), harness security is enabled, and the parent model's catalog + entry selects collaboration V1. Bootstrap then registers its skill personas plus a + generic `default` and an instruction-only `explore` role. Every other agent, a V2 + parent included, runs with Codex's multi-agent tools off (`[agents] enabled = false`). - Child models resolve in the order decided on #6970: `subagents.`, then `FULLSEND_CODEX_SUBAGENT_MODEL`, then `subagents.default`, then `gpt-5.6-luna`. - Bootstrap generates each role file. A persona with its own entry carries that model - in its role file; every other child runs the run-level default, which Bootstrap sets - as `agents.default_subagent_model`. Only OpenAI model IDs are accepted, and an - explicit model that cannot be served fails rather than falling back. Persona `model:` - and `tools:` frontmatter is reported, not applied. + The environment variable sits above the repository default because it is the + per-run operator override (a validation pass or a cost cap) and below a persona's + own entry because that entry is a deliberate per-persona choice. `gpt-5.6-luna` is + the floor for two reasons: #6970 chose the cheap tier of the current family, and it + is the only listed model whose catalog entry selects V1 on `rust-v0.157.0`, so a + catalog that can delegate at all serves it. Bootstrap generates each role file. A + persona with its own entry carries that model in its role file; every other child + runs the run-level default, which Bootstrap sets as `agents.default_subagent_model`. + Only OpenAI model IDs are accepted. Bootstrap reads the pinned CLI's bundled catalog + (`codex debug models --bundled`, offline) and fails when a resolved child model is not + in it, because Codex checks the run-level default only at each spawn and a role-file + model not at all. Persona `model:` and `tools:` frontmatter is reported, not applied. - A mandatory PreToolUse hook, installed whenever harness security is enabled, even with every individual sandbox hook disabled, admits only a V1 spawn of a registered role with `fork_context: false` and no model or effort override. It rejects resume and any spawn - from a child. Native configuration limits depth to one and open children to four. + from a child. Its matcher is a pattern on the tool-name suffix (`spawn_agent` or + `resume_agent`), not an exact name, so it runs for every namespace the CLI prefixes + (`multi_agent_v1…`, `collaboration…`) and admits only the exact V1 name. Native + configuration limits depth to one and open children to four. - Before admitting a spawn, the hook checks `hooks.json` and the role files against digests the runner recorded at Bootstrap, as the ADR 0100 adapter does for each hook script before invoking it. @@ -80,17 +95,25 @@ Codex children run under a policy the runner provisions and enforces. ## Consequences - Review and retro can delegate on Codex once the paired instructions ship; a parent - model whose catalog entry selects collaboration V2 cannot delegate under this policy. + model whose catalog entry selects collaboration V2 runs in one context, as today. - Departures from ADR 0104 on Codex: persona `model:` is not applied, the chain adds `FULLSEND_CODEX_SUBAGENT_MODEL` and ends at `gpt-5.6-luna` instead of the parent's live model, persona `tools:` are instructions only (every child has the parent's shell and `apply_patch`), and an unregistered role is always rejected, because a delegating agent always has `default` and `explore` registered. - `code` and `fix` declare no `tools:`, so they also get roles, as on pi. -- The spawn-time check has ADR 0100's residuals: a change that lands between the check - and the child's load goes undetected within the iteration, and a handler Codex cannot - complete, such as one that times out or whose interpreter fails to start, is recorded - as failed and does not block. +- The residual is a rewritten checker, not only a race: the hook adapter lives under + the agent-writable `$CODEX_HOME` and is integrity-checked before each iteration, so + within an iteration the parent can replace it with one that admits everything, + digest check included. The spawn-time digest check therefore adds coverage only + against a mid-iteration role or `hooks.json` edit that leaves the adapter untouched; + tampering between iterations is caught by the launch-time guard either way. Option 4 + closes this. As in ADR 0100, a handler Codex cannot complete, such as one that times + out or whose interpreter fails to start, is recorded as failed and does not block. - Token totals include children; Codex still reports no dollar cost. -- Role loading, child model binding, hook reload and collaboration tool names are - revalidated on each Codex CLI bump. +- Role loading, child model binding, hook reload, the spawn and resume tool names, the + catalog's V1 entries and the floor model are revalidated on each Codex CLI bump. + +Verified against `rust-v0.157.0` (the sandbox image pin): role-file and `hooks.json` +reload at child start, the spawn arguments, the tool names above, the exact-or-regex +matcher rule, `codex debug models --bundled`, and the catalog's V1 entries. From 2225144881826d0cd6b7aac01b48e446e15d0bb6 Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Thu, 1 Oct 2026 10:43:17 -0400 Subject: [PATCH 16/28] docs(adr): state the Codex child hook's fail-open outcomes and make its matcher deny-by-default The Decision said the hook fails closed on any error while the Consequences said a handler Codex cannot complete does not block. Now the Decision names the one outcome Codex honours as a block (exit 2 with a reason), the paths the handler controls that end there, the adapter's time discipline that turns a slow check into a deny, and the outcomes that fail open; the Consequences tie those to the rewritten-checker residual Option 4 closes. The matcher was an allowlist of two suffixes. It now covers the two namespaces Codex gives its multi-agent tools (every hook name but the bare V1 spawn is namespace and name joined) plus the bare suffixes, and the handler is deny-by-default inside that set: the V1 spawn under policy, the V1 wait, close and send_input passed through, everything else denied. The per-bump revalidation now diffs the multi-agent tool set and the hook-name rule at the source. Signed-off-by: Dharit Shah --- .../0126-fullsend-owned-codex-subagents.md | 46 ++++++++++++------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/docs/ADRs/0126-fullsend-owned-codex-subagents.md b/docs/ADRs/0126-fullsend-owned-codex-subagents.md index 9987580f58..b53fa57f3a 100644 --- a/docs/ADRs/0126-fullsend-owned-codex-subagents.md +++ b/docs/ADRs/0126-fullsend-owned-codex-subagents.md @@ -36,8 +36,9 @@ whenever a child starts, so the launch-time checks of spawn arguments (context inheritance, model, effort) and can reopen a closed child through a separate resume tool. The spawn and resume tools carry different names under each collaboration version (`spawn_agent` and `multi_agent_v1resume_agent` under V1, -`collaborationspawn_agent` under V2 on `rust-v0.157.0`), so a hook keyed on one exact -name misses the others. +`collaborationspawn_agent` under V2 on `rust-v0.157.0`; every multi-agent tool but the V1 +spawn is its namespace and its name joined), so a hook keyed on one exact name misses the +others. ## Options @@ -80,17 +81,26 @@ Codex children run under a policy the runner provisions and enforces. - A mandatory PreToolUse hook, installed whenever harness security is enabled, even with every individual sandbox hook disabled, admits only a V1 spawn of a registered role with `fork_context: false` and no model or effort override. It rejects resume and any spawn - from a child. Its matcher is a pattern on the tool-name suffix (`spawn_agent` or - `resume_agent`), not an exact name, so it runs for every namespace the CLI prefixes - (`multi_agent_v1…`, `collaboration…`) and admits only the exact V1 name. Native - configuration limits depth to one and open children to four. + from a child. Its matcher covers the two namespaces Codex gives its multi-agent tools + (`multi_agent_v1…`, `collaboration…`) and any bare name ending in `spawn_agent` or + `resume_agent`; inside that set the handler is deny-by-default: it admits the V1 spawn + under the policy above, passes the V1 `wait_agent`, `close_agent` and `send_input` + through, and denies every other name, the resume, the V2 tools and any tool a later + CLI adds to either namespace included. A dispatch tool outside both namespaces would + not reach the hook; the per-bump revalidation diffs the multi-agent tool set at the + source for one, and Codex's own depth and open-children limits still apply to it. + Native configuration limits depth to one and open children to four. - Before admitting a spawn, the hook checks `hooks.json` and the role files against digests the runner recorded at Bootstrap, as the ADR 0100 adapter does for each hook script before invoking it. -- The hook fails closed: a policy violation, a digest mismatch, a missing file, - unreadable input or any error in the hook denies the spawn by exiting 2 with a reason - on stderr. Codex lets the call proceed after exit 2 without a reason or any other - non-zero exit. Bootstrap fails if it cannot install the hook. +- The hook denies by exiting 2 with a reason on stderr, the outcome Codex honours as a + block. Every path the handler controls ends that way: a policy violation, a digest + mismatch, a missing file, unreadable input or any exception, and the reason is never + empty. It keeps the ADR 0100 adapter's time discipline, so a check that cannot finish + inside the handler timeout denies instead of being killed. What the handler does not + control fails open: Codex records a handler it cannot complete, one that times out or + whose interpreter fails to start, as failed and lets the spawn proceed, as under + ADR 0100. Bootstrap fails if it cannot install the hook. ## Consequences @@ -107,13 +117,17 @@ Codex children run under a policy the runner provisions and enforces. within an iteration the parent can replace it with one that admits everything, digest check included. The spawn-time digest check therefore adds coverage only against a mid-iteration role or `hooks.json` edit that leaves the adapter untouched; - tampering between iterations is caught by the launch-time guard either way. Option 4 - closes this. As in ADR 0100, a handler Codex cannot complete, such as one that times - out or whose interpreter fails to start, is recorded as failed and does not block. + tampering between iterations is caught by the launch-time guard either way. The + fail-open outcomes of the Decision, a handler that times out or whose interpreter fails + to start, are the same residual: within an iteration the parent reaches them only + through the same tampering as the rewritten checker. Option 4 closes both. - Token totals include children; Codex still reports no dollar cost. -- Role loading, child model binding, hook reload, the spawn and resume tool names, the +- Role loading, child model binding, hook reload, the multi-agent tool set and the rule + that forms hook names from it, the hook outcomes Codex honours as a block, the catalog's V1 entries and the floor model are revalidated on each Codex CLI bump. Verified against `rust-v0.157.0` (the sandbox image pin): role-file and `hooks.json` -reload at child start, the spawn arguments, the tool names above, the exact-or-regex -matcher rule, `codex debug models --bundled`, and the catalog's V1 entries. +reload at child start, the spawn arguments, the V1 tool set and the hook-name rule, the +exact-or-regex matcher rule, the hook outcomes (exit 2 with a reason blocks; exit 2 +without one, another exit, an `async` handler or a timeout does not), +`codex debug models --bundled`, and the catalog's V1 entries. From cec3a4cd1dac967971d34303f24e1ca66d8c2cd9 Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Thu, 1 Oct 2026 11:48:18 -0400 Subject: [PATCH 17/28] docs(adr): mirror Codex's V1 resolution in the parent gate and bound the spawn guard's reads The gate counts a catalog entry without a version as V1, the version Codex's multi_agent feature supplies by default, and the Consequences state which parents delegate at the pinned CLI. The hook sets its own deadline inside Codex's handler timeout and hashes only a regular file under a size cap through the ADR 0100 adapter's reader; starvation is the fail-open path that remains under Option 4. Signed-off-by: Dharit Shah --- .../0126-fullsend-owned-codex-subagents.md | 50 ++++++++++++------- 1 file changed, 32 insertions(+), 18 deletions(-) diff --git a/docs/ADRs/0126-fullsend-owned-codex-subagents.md b/docs/ADRs/0126-fullsend-owned-codex-subagents.md index b53fa57f3a..aca9772d50 100644 --- a/docs/ADRs/0126-fullsend-owned-codex-subagents.md +++ b/docs/ADRs/0126-fullsend-owned-codex-subagents.md @@ -23,7 +23,7 @@ Accepted Review and retro dispatch sub-agents with fresh contexts and selected personas ([agent architecture](../problems/agent-architecture.md)). On Codex they run in one context today: fullsend registers no roles, although Codex already offers its native -`spawn_agent` tool to parent models whose catalog entry selects collaboration V1 +`spawn_agent` tool to parent models it resolves to collaboration V1 ([#6970](https://github.com/fullsend-ai/fullsend/issues/6970)). [ADR 0104](0104-per-persona-model-resolution.md) makes child models a runner decision @@ -60,10 +60,13 @@ others. Codex children run under a policy the runner provisions and enforces. - An agent delegates when its tools include `Agent` (an absent `tools:` includes it, as - on Claude Code and pi), harness security is enabled, and the parent model's catalog - entry selects collaboration V1. Bootstrap then registers its skill personas plus a - generic `default` and an instruction-only `explore` role. Every other agent, a V2 - parent included, runs with Codex's multi-agent tools off (`[agents] enabled = false`). + on Claude Code and pi), harness security is enabled, and Codex resolves the parent + model to collaboration V1: its catalog entry selects V1, or carries no version and + Codex's `multi_agent` feature, on by default at the pin and untouched by the runner's + configuration, supplies V1. Bootstrap then registers its skill personas plus a + generic `default` and an instruction-only `explore` role. Every other agent runs with + Codex's multi-agent tools off (`[agents] enabled = false`), a parent whose entry + selects V2 or that is not in the bundled catalog included. - Child models resolve in the order decided on #6970: `subagents.`, then `FULLSEND_CODEX_SUBAGENT_MODEL`, then `subagents.default`, then `gpt-5.6-luna`. The environment variable sits above the repository default because it is the @@ -96,16 +99,23 @@ Codex children run under a policy the runner provisions and enforces. - The hook denies by exiting 2 with a reason on stderr, the outcome Codex honours as a block. Every path the handler controls ends that way: a policy violation, a digest mismatch, a missing file, unreadable input or any exception, and the reason is never - empty. It keeps the ADR 0100 adapter's time discipline, so a check that cannot finish - inside the handler timeout denies instead of being killed. What the handler does not - control fails open: Codex records a handler it cannot complete, one that times out or - whose interpreter fails to start, as failed and lets the spawn proceed, as under - ADR 0100. Bootstrap fails if it cannot install the hook. + empty. It sets its own deadline inside Codex's handler timeout and denies when the + deadline passes, and it reads a file for hashing only through the ADR 0100 adapter's + reader, which refuses anything but a regular file under a size cap, checked on the + open descriptor, so a path swapped for a FIFO or an oversized file is denied rather + than read. What the handler does not control fails open: Codex records a handler it + cannot complete, one whose interpreter fails to start or one starved of CPU or I/O + until the timeout kills it, as failed and lets the spawn proceed, as under ADR 0100. + Bootstrap fails if it cannot install the hook. ## Consequences -- Review and retro can delegate on Codex once the paired instructions ship; a parent - model whose catalog entry selects collaboration V2 runs in one context, as today. +- Review and retro can delegate on Codex once the paired instructions ship. At + `rust-v0.157.0` the parents that qualify are `gpt-5.6-luna`, the one listed entry that + selects V1, and `gpt-5.5` (with the hidden `gpt-5.4`), whose entries carry no version; + every `gpt-6` model and the other `gpt-5.6` tiers select V2 and run in one context, as + today. At the pin that is the main outcome, not an edge case: #6970 was probed on + 0.152.1, where V1 was the default, and the per-bump revalidation is where it changes. - Departures from ADR 0104 on Codex: persona `model:` is not applied, the chain adds `FULLSEND_CODEX_SUBAGENT_MODEL` and ends at `gpt-5.6-luna` instead of the parent's live model, persona `tools:` are instructions only (every child has the parent's @@ -117,17 +127,21 @@ Codex children run under a policy the runner provisions and enforces. within an iteration the parent can replace it with one that admits everything, digest check included. The spawn-time digest check therefore adds coverage only against a mid-iteration role or `hooks.json` edit that leaves the adapter untouched; - tampering between iterations is caught by the launch-time guard either way. The - fail-open outcomes of the Decision, a handler that times out or whose interpreter fails - to start, are the same residual: within an iteration the parent reaches them only - through the same tampering as the rewritten checker. Option 4 closes both. + tampering between iterations is caught by the launch-time guard either way. Of the + Decision's fail-open outcomes, an interpreter that fails to start is the same residual, + reached within an iteration only through the same tampering, and Option 4 closes both. + Starvation is not: a parent's background processes can hold CPU or I/O until Codex's + timeout kills the handler without touching a protected file, so it is the fail-open + path that remains under Option 4. - Token totals include children; Codex still reports no dollar cost. - Role loading, child model binding, hook reload, the multi-agent tool set and the rule that forms hook names from it, the hook outcomes Codex honours as a block, the - catalog's V1 entries and the floor model are revalidated on each Codex CLI bump. + catalog's V1 entries, the version Codex supplies to an entry that carries none and the + floor model are revalidated on each Codex CLI bump. Verified against `rust-v0.157.0` (the sandbox image pin): role-file and `hooks.json` reload at child start, the spawn arguments, the V1 tool set and the hook-name rule, the exact-or-regex matcher rule, the hook outcomes (exit 2 with a reason blocks; exit 2 without one, another exit, an `async` handler or a timeout does not), -`codex debug models --bundled`, and the catalog's V1 entries. +`codex debug models --bundled`, the catalog's V1 entries and the version Codex supplies +to an entry that carries none (`multi_agent`, on by default). From dd7bd922a8313cfd131c1248a5febc57dc752fd1 Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Thu, 1 Oct 2026 12:29:30 -0400 Subject: [PATCH 18/28] docs(adr): revalidate against rust-v0.159.3, the sandbox image pin The pin moved from 0.157.0 to 0.159.3 (#7747). The crates the ADR relies on are unchanged between the probed 0.159.0 and 0.159.3 except for Windows process creation; the catalog adds gpt-6.1-sol (V2) and drops the hidden gpt-5.4, so the delegating parents at the pin are gpt-5.6-luna and gpt-5.5. Signed-off-by: Dharit Shah --- docs/ADRs/0126-fullsend-owned-codex-subagents.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/docs/ADRs/0126-fullsend-owned-codex-subagents.md b/docs/ADRs/0126-fullsend-owned-codex-subagents.md index aca9772d50..509f388f39 100644 --- a/docs/ADRs/0126-fullsend-owned-codex-subagents.md +++ b/docs/ADRs/0126-fullsend-owned-codex-subagents.md @@ -36,7 +36,7 @@ whenever a child starts, so the launch-time checks of spawn arguments (context inheritance, model, effort) and can reopen a closed child through a separate resume tool. The spawn and resume tools carry different names under each collaboration version (`spawn_agent` and `multi_agent_v1resume_agent` under V1, -`collaborationspawn_agent` under V2 on `rust-v0.157.0`; every multi-agent tool but the V1 +`collaborationspawn_agent` under V2 on `rust-v0.159.3`; every multi-agent tool but the V1 spawn is its namespace and its name joined), so a hook keyed on one exact name misses the others. @@ -73,7 +73,7 @@ Codex children run under a policy the runner provisions and enforces. per-run operator override (a validation pass or a cost cap) and below a persona's own entry because that entry is a deliberate per-persona choice. `gpt-5.6-luna` is the floor for two reasons: #6970 chose the cheap tier of the current family, and it - is the only listed model whose catalog entry selects V1 on `rust-v0.157.0`, so a + is the only listed model whose catalog entry selects V1 on `rust-v0.159.3`, so a catalog that can delegate at all serves it. Bootstrap generates each role file. A persona with its own entry carries that model in its role file; every other child runs the run-level default, which Bootstrap sets as `agents.default_subagent_model`. @@ -111,8 +111,8 @@ Codex children run under a policy the runner provisions and enforces. ## Consequences - Review and retro can delegate on Codex once the paired instructions ship. At - `rust-v0.157.0` the parents that qualify are `gpt-5.6-luna`, the one listed entry that - selects V1, and `gpt-5.5` (with the hidden `gpt-5.4`), whose entries carry no version; + `rust-v0.159.3` the parents that qualify are `gpt-5.6-luna`, the one listed entry that + selects V1, and `gpt-5.5`, whose entry carries no version; every `gpt-6` model and the other `gpt-5.6` tiers select V2 and run in one context, as today. At the pin that is the main outcome, not an edge case: #6970 was probed on 0.152.1, where V1 was the default, and the per-bump revalidation is where it changes. @@ -139,9 +139,11 @@ Codex children run under a policy the runner provisions and enforces. catalog's V1 entries, the version Codex supplies to an entry that carries none and the floor model are revalidated on each Codex CLI bump. -Verified against `rust-v0.157.0` (the sandbox image pin): role-file and `hooks.json` +Verified against `rust-v0.159.3` (the sandbox image pin): role-file and `hooks.json` reload at child start, the spawn arguments, the V1 tool set and the hook-name rule, the exact-or-regex matcher rule, the hook outcomes (exit 2 with a reason blocks; exit 2 without one, another exit, an `async` handler or a timeout does not), `codex debug models --bundled`, the catalog's V1 entries and the version Codex supplies -to an entry that carries none (`multi_agent`, on by default). +to an entry that carries none (`multi_agent`, on by default). The checks ran on the 0.157.0 +and 0.159.0 binaries and, for 0.159.3, at the source tag, where the crates involved differ +from 0.159.0 only in Windows process creation and the catalog. From ffb37dada3bba733a7b4bb5a7382a2d4283923be Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Thu, 1 Oct 2026 12:47:51 -0400 Subject: [PATCH 19/28] docs(adr): verify against the rust-v0.159.3 binary The 2026-09-29 mock probes were rerun on the 0.159.3 CLI: 145 scenarios, the hook outcomes, tool names and matcher rule unchanged, and the bundled catalog dump equal to the source tag. Signed-off-by: Dharit Shah --- docs/ADRs/0126-fullsend-owned-codex-subagents.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/ADRs/0126-fullsend-owned-codex-subagents.md b/docs/ADRs/0126-fullsend-owned-codex-subagents.md index 509f388f39..28f94cdfa3 100644 --- a/docs/ADRs/0126-fullsend-owned-codex-subagents.md +++ b/docs/ADRs/0126-fullsend-owned-codex-subagents.md @@ -144,6 +144,5 @@ reload at child start, the spawn arguments, the V1 tool set and the hook-name ru exact-or-regex matcher rule, the hook outcomes (exit 2 with a reason blocks; exit 2 without one, another exit, an `async` handler or a timeout does not), `codex debug models --bundled`, the catalog's V1 entries and the version Codex supplies -to an entry that carries none (`multi_agent`, on by default). The checks ran on the 0.157.0 -and 0.159.0 binaries and, for 0.159.3, at the source tag, where the crates involved differ -from 0.159.0 only in Windows process creation and the catalog. +to an entry that carries none (`multi_agent`, on by default). The checks ran on the +0.157.0, 0.159.0 and 0.159.3 binaries. From 9bb059c526af294742a9a2ef2c899ec4b5514439 Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Thu, 1 Oct 2026 13:37:22 -0400 Subject: [PATCH 20/28] docs(adr): name the chain's source, child-spec translation, spawn rules and the digest window Answers the review bot's six low findings on ffb37dad. The child model chain is attributed to the maintainer's comments on #6970 (2026-09-03 decision, 2026-09-25 implementation request), which replaced the issue body's parent-model default; child specs take the parent's model translation before the catalog check; fork_context must be present and false, a model or reasoning_effort key denies, a child is recognised by the agent_id in its hook payload; the pass-through names are given as hook names; the digest check's window before Codex's reread at child start is named; the architecture bullet carries the full gate. Signed-off-by: Dharit Shah --- .../0126-fullsend-owned-codex-subagents.md | 29 ++++++++++++------- docs/architecture.md | 2 +- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/docs/ADRs/0126-fullsend-owned-codex-subagents.md b/docs/ADRs/0126-fullsend-owned-codex-subagents.md index 28f94cdfa3..f95b2b4228 100644 --- a/docs/ADRs/0126-fullsend-owned-codex-subagents.md +++ b/docs/ADRs/0126-fullsend-owned-codex-subagents.md @@ -67,8 +67,10 @@ Codex children run under a policy the runner provisions and enforces. generic `default` and an instruction-only `explore` role. Every other agent runs with Codex's multi-agent tools off (`[agents] enabled = false`), a parent whose entry selects V2 or that is not in the bundled catalog included. -- Child models resolve in the order decided on #6970: `subagents.`, then - `FULLSEND_CODEX_SUBAGENT_MODEL`, then `subagents.default`, then `gpt-5.6-luna`. +- Child models resolve in the order the maintainer decided on #6970 (the decision of + 2026-09-03 and the implementation request of 2026-09-25, which replaced the issue body's + parent-model default): `subagents.`, then `FULLSEND_CODEX_SUBAGENT_MODEL`, then + `subagents.default`, then `gpt-5.6-luna`. The environment variable sits above the repository default because it is the per-run operator override (a validation pass or a cost cap) and below a persona's own entry because that entry is a deliberate per-persona choice. `gpt-5.6-luna` is @@ -77,18 +79,21 @@ Codex children run under a policy the runner provisions and enforces. catalog that can delegate at all serves it. Bootstrap generates each role file. A persona with its own entry carries that model in its role file; every other child runs the run-level default, which Bootstrap sets as `agents.default_subagent_model`. - Only OpenAI model IDs are accepted. Bootstrap reads the pinned CLI's bundled catalog - (`codex debug models --bundled`, offline) and fails when a resolved child model is not - in it, because Codex checks the run-level default only at each spawn and a role-file - model not at all. Persona `model:` and `tools:` frontmatter is reported, not applied. + Only OpenAI model IDs are accepted, through the same translation as the parent's model + (an `openai/` prefix is stripped, a Claude alias rejected). Bootstrap reads the pinned + CLI's bundled catalog (`codex debug models --bundled`, offline) and fails when a + resolved child model is not in it, because Codex checks the run-level default only at + each spawn and a role-file model not at all. Persona `model:` and `tools:` frontmatter + is reported, not applied. - A mandatory PreToolUse hook, installed whenever harness security is enabled, even with every individual sandbox hook disabled, admits only a V1 spawn of a registered role with - `fork_context: false` and no model or effort override. It rejects resume and any spawn - from a child. Its matcher covers the two namespaces Codex gives its multi-agent tools + `fork_context` present and false and no `model` or `reasoning_effort` key, whatever its + value. It rejects resume and any spawn from a child, which it recognises by the + `agent_id` Codex puts only in a child's hook payload. Its matcher covers the two namespaces Codex gives its multi-agent tools (`multi_agent_v1…`, `collaboration…`) and any bare name ending in `spawn_agent` or `resume_agent`; inside that set the handler is deny-by-default: it admits the V1 spawn under the policy above, passes the V1 `wait_agent`, `close_agent` and `send_input` - through, and denies every other name, the resume, the V2 tools and any tool a later + through (as hook names, `multi_agent_v1` joined with each), and denies every other name, the resume, the V2 tools and any tool a later CLI adds to either namespace included. A dispatch tool outside both namespaces would not reach the hook; the per-bump revalidation diffs the multi-agent tool set at the source for one, and Codex's own depth and open-children limits still apply to it. @@ -126,8 +131,10 @@ Codex children run under a policy the runner provisions and enforces. the agent-writable `$CODEX_HOME` and is integrity-checked before each iteration, so within an iteration the parent can replace it with one that admits everything, digest check included. The spawn-time digest check therefore adds coverage only - against a mid-iteration role or `hooks.json` edit that leaves the adapter untouched; - tampering between iterations is caught by the launch-time guard either way. Of the + against a mid-iteration role or `hooks.json` edit made before the check and leaving the + adapter untouched; an edit between the check and Codex's reread at child start is the + time-of-check window Option 4 names; tampering between iterations is caught by the + launch-time guard either way. Of the Decision's fail-open outcomes, an interpreter that fails to start is the same residual, reached within an iteration only through the same tampering, and Option 4 closes both. Starvation is not: a parent's background processes can hold CPU or I/O until Codex's diff --git a/docs/architecture.md b/docs/architecture.md index 9d27358fb7..faa2544e53 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -243,7 +243,7 @@ flowchart TB - The `fullsend run` runner delegates in-sandbox agent execution to a `runtime.Runtime` interface; production orgs default to Claude Code, with [pi](https://github.com/earendil-works/pi) available as an opt-in second runtime (`runtime: pi`, Claude-on-Vertex through the same WIF credential path) and [codex](https://github.com/openai/codex) as a third (`runtime: codex`, OpenAI-only through a custom model provider whose bearer token comes from a runner-seeded file, with the sandbox tool hooks behind a translating adapter — [ADR 0099](ADRs/0099-codex-agent-runtime.md) and [ADR 0100](ADRs/0100-codex-sandbox-hooks.md)). Runtime selection is configured per repo with `runtime:` in `.fullsend/config.yaml` (per-agent `runtime`/`model`/`effort`/`subagents` on the agent's `agents:` entry sit above it and below the `--runtime`/`--model`/`--effort` flags and `FULLSEND_*` variables, [ADR 0091](ADRs/0091-per-agent-runtime-model-effort.md)) and resolved via `runtime.ResolveForAgent()`. Test-only runtimes — **dummy** (scripted operations) and **dummy-playback** (playlist-based replay of canned results) — execute in the real OpenShell sandbox for behaviour tests without inference. Bootstrap uses a portable `BootstrapInput` interface with optional extensions such as `SandboxHooksBootstrap` for the runtime-neutral sandbox tool hooks ([ADR 0090](ADRs/0090-runtime-neutral-sandbox-hooks-contract.md)); runtimes declare further capabilities through small optional interfaces (`DebugLogNamer`, `ContextBridger`) rather than `Name()` checks in the runner. Transcript and debug artifact handling use a separate `TranscriptHandler` interface. See [runtimes.md](runtimes.md) for the per-runtime security feature matrix required when adding a new backend. - Plugins are runtime-scoped harness resources: a harness declares `plugins:` as one list of directories in its own repository (same trust and fetch path as skills), and each entry's format decides which runtime loads it — a `plugin.json` bundle is Claude Code's, a directory pi's `-e` loader resolves is uploaded and loaded after a tree-hash preflight computed from the host copy. Each runtime names and skips the entries in the other format, so the list survives a runtime switch. Because `--no-extensions` plus explicit `-e` closes the set of code that can register tools, no per-tool declaration is needed ([ADR 0094](ADRs/0094-pi-extensions-are-harness-resources.md)). -- Native Codex children run under a runner-owned policy: Bootstrap registers roles for an agent with the `Agent` tool and binds each child's model (a persona's own entry in its role file, the run-level default otherwise), and a mandatory dispatch hook admits only fresh-context V1 spawns of registered roles after checking `hooks.json` and the role files against runner-held digests ([ADR 0126](ADRs/0126-fullsend-owned-codex-subagents.md)); not yet implemented, so review and retro still run in one context on Codex ([#6970](https://github.com/fullsend-ai/fullsend/issues/6970)). +- Native Codex children run under a runner-owned policy: Bootstrap registers roles for an agent with the `Agent` tool, under harness security, whose parent model Codex resolves to collaboration V1 (a V2 or unlisted parent keeps the multi-agent tools off), and binds each child's model (a persona's own entry in its role file, the run-level default otherwise), and a mandatory dispatch hook admits only fresh-context V1 spawns of registered roles after checking `hooks.json` and the role files against runner-held digests ([ADR 0126](ADRs/0126-fullsend-owned-codex-subagents.md)); not yet implemented, so review and retro still run in one context on Codex ([#6970](https://github.com/fullsend-ai/fullsend/issues/6970)). ### Behaviour testing From 84a6c663bb8fd7a06e74089290e078c6d0116db7 Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Thu, 1 Oct 2026 13:39:28 -0400 Subject: [PATCH 21/28] docs(adr): rewrap the hook bullet Signed-off-by: Dharit Shah --- .../ADRs/0126-fullsend-owned-codex-subagents.md | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/ADRs/0126-fullsend-owned-codex-subagents.md b/docs/ADRs/0126-fullsend-owned-codex-subagents.md index f95b2b4228..e865a66f50 100644 --- a/docs/ADRs/0126-fullsend-owned-codex-subagents.md +++ b/docs/ADRs/0126-fullsend-owned-codex-subagents.md @@ -89,14 +89,15 @@ Codex children run under a policy the runner provisions and enforces. every individual sandbox hook disabled, admits only a V1 spawn of a registered role with `fork_context` present and false and no `model` or `reasoning_effort` key, whatever its value. It rejects resume and any spawn from a child, which it recognises by the - `agent_id` Codex puts only in a child's hook payload. Its matcher covers the two namespaces Codex gives its multi-agent tools - (`multi_agent_v1…`, `collaboration…`) and any bare name ending in `spawn_agent` or - `resume_agent`; inside that set the handler is deny-by-default: it admits the V1 spawn - under the policy above, passes the V1 `wait_agent`, `close_agent` and `send_input` - through (as hook names, `multi_agent_v1` joined with each), and denies every other name, the resume, the V2 tools and any tool a later - CLI adds to either namespace included. A dispatch tool outside both namespaces would - not reach the hook; the per-bump revalidation diffs the multi-agent tool set at the - source for one, and Codex's own depth and open-children limits still apply to it. + `agent_id` Codex puts only in a child's hook payload. Its matcher covers the two + namespaces Codex gives its multi-agent tools (`multi_agent_v1…`, `collaboration…`) and + any bare name ending in `spawn_agent` or `resume_agent`; inside that set the handler is + deny-by-default: it admits the V1 spawn under the policy above, passes the V1 + `wait_agent`, `close_agent` and `send_input` through (as hook names, `multi_agent_v1` + joined with each), and denies every other name, the resume, the V2 tools and any tool a + later CLI adds to either namespace included. A dispatch tool outside both namespaces + would not reach the hook; the per-bump revalidation diffs the multi-agent tool set at + the source for one, and Codex's own depth and open-children limits still apply to it. Native configuration limits depth to one and open children to four. - Before admitting a spawn, the hook checks `hooks.json` and the role files against digests the runner recorded at Bootstrap, as the ADR 0100 adapter does for each From 72e37c09234d557db0bb4260d49b33c5f2fb3310 Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Thu, 1 Oct 2026 14:11:39 -0400 Subject: [PATCH 22/28] docs(adr): config.toml is read once at launch; children keep the parent's tools Answers the review bot's two findings on 84a6c663. The run-level default lives in config.toml, which Codex reads once at launch and never again (probe i-y3-default on 0.159.0 and 0.159.3: the default rewritten after launch, a later model-less child still ran the launch value), so the spawn-time digest set needs no config key and the launch-time guard covers it; the Decision says so and no longer reads as if Codex reread the default at each spawn. The Consequences state that an unrestricted child is an accepted limit of Option 3, not a control left out. Signed-off-by: Dharit Shah --- .../0126-fullsend-owned-codex-subagents.md | 27 +++++++++++-------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/docs/ADRs/0126-fullsend-owned-codex-subagents.md b/docs/ADRs/0126-fullsend-owned-codex-subagents.md index e865a66f50..4fbddbe4b1 100644 --- a/docs/ADRs/0126-fullsend-owned-codex-subagents.md +++ b/docs/ADRs/0126-fullsend-owned-codex-subagents.md @@ -82,9 +82,9 @@ Codex children run under a policy the runner provisions and enforces. Only OpenAI model IDs are accepted, through the same translation as the parent's model (an `openai/` prefix is stripped, a Claude alias rejected). Bootstrap reads the pinned CLI's bundled catalog (`codex debug models --bundled`, offline) and fails when a - resolved child model is not in it, because Codex checks the run-level default only at - each spawn and a role-file model not at all. Persona `model:` and `tools:` frontmatter - is reported, not applied. + resolved child model is not in it, because Codex validates the run-level default + against its catalog only when a spawn uses it, and a role-file model never. Persona + `model:` and `tools:` frontmatter is reported, not applied. - A mandatory PreToolUse hook, installed whenever harness security is enabled, even with every individual sandbox hook disabled, admits only a V1 spawn of a registered role with `fork_context` present and false and no `model` or `reasoning_effort` key, whatever its @@ -101,7 +101,9 @@ Codex children run under a policy the runner provisions and enforces. Native configuration limits depth to one and open children to four. - Before admitting a spawn, the hook checks `hooks.json` and the role files against digests the runner recorded at Bootstrap, as the ADR 0100 adapter does for each - hook script before invoking it. + hook script before invoking it. `config.toml`, which carries the run-level default, + is not in that set: Codex reads it once at launch and never again, so a rewrite after + launch cannot reach a child, and the launch-time guard covers it between iterations. - The hook denies by exiting 2 with a reason on stderr, the outcome Codex honours as a block. Every path the handler controls ends that way: a policy violation, a digest mismatch, a missing file, unreadable input or any exception, and the reason is never @@ -126,7 +128,10 @@ Codex children run under a policy the runner provisions and enforces. `FULLSEND_CODEX_SUBAGENT_MODEL` and ends at `gpt-5.6-luna` instead of the parent's live model, persona `tools:` are instructions only (every child has the parent's shell and `apply_patch`), and an unregistered role is always rejected, because a - delegating agent always has `default` and `explore` registered. + delegating agent always has `default` and `explore` registered. The unrestricted + child is an accepted limit of Option 3, not a control left out: Codex has no per-child + tool allowlist, so a review or retro child can do what its parent can, under the same + hooks. - `code` and `fix` declare no `tools:`, so they also get roles, as on pi. - The residual is a rewritten checker, not only a race: the hook adapter lives under the agent-writable `$CODEX_HOME` and is integrity-checked before each iteration, so @@ -148,9 +153,9 @@ Codex children run under a policy the runner provisions and enforces. floor model are revalidated on each Codex CLI bump. Verified against `rust-v0.159.3` (the sandbox image pin): role-file and `hooks.json` -reload at child start, the spawn arguments, the V1 tool set and the hook-name rule, the -exact-or-regex matcher rule, the hook outcomes (exit 2 with a reason blocks; exit 2 -without one, another exit, an `async` handler or a timeout does not), -`codex debug models --bundled`, the catalog's V1 entries and the version Codex supplies -to an entry that carries none (`multi_agent`, on by default). The checks ran on the -0.157.0, 0.159.0 and 0.159.3 binaries. +reload at child start, `config.toml` read once at launch, the spawn arguments, the V1 +tool set and the hook-name rule, the exact-or-regex matcher rule, the hook outcomes +(exit 2 with a reason blocks; exit 2 without one, another exit, an `async` handler or a +timeout does not), `codex debug models --bundled`, the catalog's V1 entries and the +version Codex supplies to an entry that carries none (`multi_agent`, on by default). The +checks ran on the 0.157.0, 0.159.0 and 0.159.3 binaries. From fabd43f2a4d180335ee84fa1491f6477083d123b Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Thu, 1 Oct 2026 14:37:47 -0400 Subject: [PATCH 23/28] docs(adr): name today's unpoliced spawn tools and the runner's child-usage fold Answers waynesun09's two comments of 2026-10-01 18:1xZ. Today a V1 parent has spawn_agent and a V2 parent collaborationspawn_agent with no runner policy (the config template has no [agents] table; #7829 turns both off until this mechanism ships), so the Context says so, Option 1 is "turn the tools off" rather than "status quo", Option 2 is named as the state on main, and the Consequences call the V2 outcome "with the multi-agent tools off", a new restriction. codex exec forwards token updates for the primary thread only, so the Consequences state that the runner reads each child's rollout after the run and folds its last cumulative token_count into the run totals, per model. Signed-off-by: Dharit Shah --- .../0126-fullsend-owned-codex-subagents.md | 34 ++++++++++++------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/docs/ADRs/0126-fullsend-owned-codex-subagents.md b/docs/ADRs/0126-fullsend-owned-codex-subagents.md index 4fbddbe4b1..d3797b5acb 100644 --- a/docs/ADRs/0126-fullsend-owned-codex-subagents.md +++ b/docs/ADRs/0126-fullsend-owned-codex-subagents.md @@ -22,8 +22,10 @@ Accepted Review and retro dispatch sub-agents with fresh contexts and selected personas ([agent architecture](../problems/agent-architecture.md)). On Codex they run in one -context today: fullsend registers no roles, although Codex already offers its native -`spawn_agent` tool to parent models it resolves to collaboration V1 +context today only because nothing asks for a child: fullsend registers no roles, while +Codex offers a native spawn tool to every parent, `spawn_agent` under collaboration V1 +and `collaborationspawn_agent` under V2, neither policed by the runner (#7829 turns both +off until this mechanism ships) ([#6970](https://github.com/fullsend-ai/fullsend/issues/6970)). [ADR 0104](0104-per-persona-model-resolution.md) makes child models a runner decision @@ -42,11 +44,11 @@ others. ## Options -1. **Single context (status quo).** No new mechanism; review and retro keep no - independent child contexts on Codex. -2. **Native children governed by instructions only.** Nothing enforces fresh context, - depth or model choice; a parent can fork its conversation into the challenger or - pick any OpenAI model. +1. **Single context.** Turn Codex's multi-agent tools off for every agent (#7829 does + this until a decision) and keep no independent child contexts for review and retro. +2. **Native children governed by instructions only** (the state on `main` with the tools + on). Nothing enforces fresh context, depth or model choice; a parent can fork its + conversation into the challenger or pick any OpenAI model. 3. **Native children under a runner-owned role and dispatch policy** (chosen). 4. **Option 3 plus write protection of the runtime's files.** Closes the time-of-check window noted below. Each way to do it adds a platform requirement: @@ -121,9 +123,11 @@ Codex children run under a policy the runner provisions and enforces. - Review and retro can delegate on Codex once the paired instructions ship. At `rust-v0.159.3` the parents that qualify are `gpt-5.6-luna`, the one listed entry that selects V1, and `gpt-5.5`, whose entry carries no version; - every `gpt-6` model and the other `gpt-5.6` tiers select V2 and run in one context, as - today. At the pin that is the main outcome, not an edge case: #6970 was probed on - 0.152.1, where V1 was the default, and the per-bump revalidation is where it changes. + every `gpt-6` model and the other `gpt-5.6` tiers select V2 and run in one context, + with the multi-agent tools off, a new restriction for them rather than a continuation, + since a V2 parent has its spawn tool today. At the pin that is the main outcome, not an + edge case: #6970 was probed on 0.152.1, where V1 was the default, and the per-bump + revalidation is where it changes. - Departures from ADR 0104 on Codex: persona `model:` is not applied, the chain adds `FULLSEND_CODEX_SUBAGENT_MODEL` and ends at `gpt-5.6-luna` instead of the parent's live model, persona `tools:` are instructions only (every child has the parent's @@ -146,7 +150,10 @@ Codex children run under a policy the runner provisions and enforces. Starvation is not: a parent's background processes can hold CPU or I/O until Codex's timeout kills the handler without touching a protected file, so it is the fail-open path that remains under Option 4. -- Token totals include children; Codex still reports no dollar cost. +- Token totals include children, which is runner work: `codex exec` forwards token + updates for the primary thread and turn only and its JSONL total is that thread's, so + the runner reads each child's rollout after the run and folds its last cumulative + `token_count` into the run totals, per model. Codex still reports no dollar cost. - Role loading, child model binding, hook reload, the multi-agent tool set and the rule that forms hook names from it, the hook outcomes Codex honours as a block, the catalog's V1 entries, the version Codex supplies to an entry that carries none and the @@ -157,5 +164,6 @@ reload at child start, `config.toml` read once at launch, the spawn arguments, t tool set and the hook-name rule, the exact-or-regex matcher rule, the hook outcomes (exit 2 with a reason blocks; exit 2 without one, another exit, an `async` handler or a timeout does not), `codex debug models --bundled`, the catalog's V1 entries and the -version Codex supplies to an entry that carries none (`multi_agent`, on by default). The -checks ran on the 0.157.0, 0.159.0 and 0.159.3 binaries. +version Codex supplies to an entry that carries none (`multi_agent`, on by default), and +the `exec` usage stream carrying the primary thread only. The checks ran on the 0.157.0, +0.159.0 and 0.159.3 binaries. From a01fb60002cdd2b3d702d8e1874e3600c960ddf3 Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Thu, 1 Oct 2026 14:40:45 -0400 Subject: [PATCH 24/28] docs(adr): state the open-children overflow and the allowlist name map Answers the review bot's two findings on 72e37c09. Codex rejects a spawn past the open-children limit rather than queuing it (probe s-four on 0.159.3: "agent thread limit reached"; the next spawn succeeds after a close), so the paired instructions dispatch at most four children at a time and the runner adds no queue. The ADR 0100 adapter reports the V1 wait, close, send_input and resume calls as Agent, the name it gives the spawn, so an org's tool allowlist treats the whole delegation as one tool; the map joins the per-bump hook-name revalidation. Signed-off-by: Dharit Shah --- docs/ADRs/0126-fullsend-owned-codex-subagents.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/ADRs/0126-fullsend-owned-codex-subagents.md b/docs/ADRs/0126-fullsend-owned-codex-subagents.md index d3797b5acb..aa903cfa5b 100644 --- a/docs/ADRs/0126-fullsend-owned-codex-subagents.md +++ b/docs/ADRs/0126-fullsend-owned-codex-subagents.md @@ -100,7 +100,14 @@ Codex children run under a policy the runner provisions and enforces. later CLI adds to either namespace included. A dispatch tool outside both namespaces would not reach the hook; the per-bump revalidation diffs the multi-agent tool set at the source for one, and Codex's own depth and open-children limits still apply to it. - Native configuration limits depth to one and open children to four. + Native configuration limits depth to one and open children to four. A spawn past the + limit is rejected, not queued (`agent thread limit reached`), and a finished child holds + its slot until closed, so the paired instructions dispatch at most four children at a + time and close each finished child before the next spawn; the runner adds no queue. + For the ADR 0100 sandbox hooks, the adapter reports the V1 wait, close, send_input and + resume calls under the Claude name it already gives the spawn, `Agent`, so an org's tool + allowlist that admits `Agent` admits the whole delegation and one that does not blocks + it at the first spawn; the map is revalidated with the hook names on each bump. - Before admitting a spawn, the hook checks `hooks.json` and the role files against digests the runner recorded at Bootstrap, as the ADR 0100 adapter does for each hook script before invoking it. `config.toml`, which carries the run-level default, @@ -120,7 +127,8 @@ Codex children run under a policy the runner provisions and enforces. ## Consequences -- Review and retro can delegate on Codex once the paired instructions ship. At +- Review and retro can delegate on Codex once the paired instructions ship, in waves of + at most four children. At `rust-v0.159.3` the parents that qualify are `gpt-5.6-luna`, the one listed entry that selects V1, and `gpt-5.5`, whose entry carries no version; every `gpt-6` model and the other `gpt-5.6` tiers select V2 and run in one context, From 6c0ad3a0d625f1cdf8d69bf821ced3dca01292f3 Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Thu, 1 Oct 2026 15:44:17 -0400 Subject: [PATCH 25/28] docs(adr): scope the fail-open path, keep resume off the Agent map, parent-only pass-through Answers the review bot's six findings on a01fb600. The fail-open path unenforces the whole admission policy for the one call it lets through, whatever the tool or arguments, and the opt-in allowlist is no backstop; the matcher is stated as three clauses with admission by the exact hook name spawn_agent; wait, close and send_input pass through from the parent only, and at depth one Codex offers a child no multi-agent tool; resume stays off the Agent map so the allowlist still blocks it when the hook cannot run; the four-children rule allows four at once and a close only before a spawn that would exceed four; the child marker, depth and open-children limits join the per-bump revalidation and the Verified list. Signed-off-by: Dharit Shah --- .../0126-fullsend-owned-codex-subagents.md | 69 +++++++++++-------- 1 file changed, 42 insertions(+), 27 deletions(-) diff --git a/docs/ADRs/0126-fullsend-owned-codex-subagents.md b/docs/ADRs/0126-fullsend-owned-codex-subagents.md index aa903cfa5b..00d5abe336 100644 --- a/docs/ADRs/0126-fullsend-owned-codex-subagents.md +++ b/docs/ADRs/0126-fullsend-owned-codex-subagents.md @@ -91,23 +91,28 @@ Codex children run under a policy the runner provisions and enforces. every individual sandbox hook disabled, admits only a V1 spawn of a registered role with `fork_context` present and false and no `model` or `reasoning_effort` key, whatever its value. It rejects resume and any spawn from a child, which it recognises by the - `agent_id` Codex puts only in a child's hook payload. Its matcher covers the two - namespaces Codex gives its multi-agent tools (`multi_agent_v1…`, `collaboration…`) and - any bare name ending in `spawn_agent` or `resume_agent`; inside that set the handler is - deny-by-default: it admits the V1 spawn under the policy above, passes the V1 - `wait_agent`, `close_agent` and `send_input` through (as hook names, `multi_agent_v1` - joined with each), and denies every other name, the resume, the V2 tools and any tool a - later CLI adds to either namespace included. A dispatch tool outside both namespaces - would not reach the hook; the per-bump revalidation diffs the multi-agent tool set at - the source for one, and Codex's own depth and open-children limits still apply to it. - Native configuration limits depth to one and open children to four. A spawn past the + `agent_id` Codex puts only in a child's hook payload. Its matcher is the union of three + clauses: names starting `multi_agent_v1`, names starting `collaboration` (the two + namespaces Codex gives its multi-agent tools) and bare names ending in `spawn_agent` or + `resume_agent`; inside that set the handler is deny-by-default: it admits the exact + hook name `spawn_agent` under the policy above, passes the V1 `wait_agent`, + `close_agent` and `send_input` through (as hook names, `multi_agent_v1` joined with + each) when the caller is the parent, and denies every other name and every call from a + child: the resume, the V2 tools (`collaborationspawn_agent` included, whatever clause + it matches) and any tool a later CLI adds to either namespace. A tool matching none of + the three clauses never reaches the hook; the per-bump revalidation diffs the + multi-agent tool set at the source for one, and Codex's own depth and open-children + limits still apply to it. Native configuration limits depth to one and open children + to four; at depth one Codex offers a child no multi-agent tool at all. A spawn past the limit is rejected, not queued (`agent thread limit reached`), and a finished child holds - its slot until closed, so the paired instructions dispatch at most four children at a - time and close each finished child before the next spawn; the runner adds no queue. - For the ADR 0100 sandbox hooks, the adapter reports the V1 wait, close, send_input and - resume calls under the Claude name it already gives the spawn, `Agent`, so an org's tool - allowlist that admits `Agent` admits the whole delegation and one that does not blocks - it at the first spawn; the map is revalidated with the hook names on each bump. + its slot until closed, so the paired instructions run up to four children at once and + close a finished child before a spawn that would exceed four open; the runner adds no + queue. For the ADR 0100 sandbox hooks, the adapter reports the V1 wait, close and + send_input calls under the Claude name it already gives the spawn, `Agent`, so an org's + tool allowlist that admits `Agent` admits an admitted delegation's control calls and + one that does not blocks it at the first spawn; resume stays unmapped, so that + allowlist still blocks it when the dispatch hook cannot run. The map is revalidated + with the hook names on each bump. - Before admitting a spawn, the hook checks `hooks.json` and the role files against digests the runner recorded at Bootstrap, as the ADR 0100 adapter does for each hook script before invoking it. `config.toml`, which carries the run-level default, @@ -120,15 +125,18 @@ Codex children run under a policy the runner provisions and enforces. deadline passes, and it reads a file for hashing only through the ADR 0100 adapter's reader, which refuses anything but a regular file under a size cap, checked on the open descriptor, so a path swapped for a FIFO or an oversized file is denied rather - than read. What the handler does not control fails open: Codex records a handler it - cannot complete, one whose interpreter fails to start or one starved of CPU or I/O - until the timeout kills it, as failed and lets the spawn proceed, as under ADR 0100. - Bootstrap fails if it cannot install the hook. + than read. What the handler does not control fails open, for every call the matcher + reaches and whatever its arguments: Codex records a handler it cannot complete, one + whose interpreter fails to start or one starved of CPU or I/O until the timeout kills + it, as failed and lets the call proceed, as under ADR 0100, so on that path a resume, a + V2 spawn, a spawn with a forbidden argument or of an unregistered role, or a spawn from + a child goes through unpoliced, and the opt-in tool allowlist, off by default, is no + backstop for it. Bootstrap fails if it cannot install the hook. ## Consequences -- Review and retro can delegate on Codex once the paired instructions ship, in waves of - at most four children. At +- Review and retro can delegate on Codex once the paired instructions ship, with up to + four children open at a time. At `rust-v0.159.3` the parents that qualify are `gpt-5.6-luna`, the one listed entry that selects V1, and `gpt-5.5`, whose entry carries no version; every `gpt-6` model and the other `gpt-5.6` tiers select V2 and run in one context, @@ -157,19 +165,26 @@ Codex children run under a policy the runner provisions and enforces. reached within an iteration only through the same tampering, and Option 4 closes both. Starvation is not: a parent's background processes can hold CPU or I/O until Codex's timeout kills the handler without touching a protected file, so it is the fail-open - path that remains under Option 4. + path that remains under Option 4, and on it the whole admission policy is unenforced + for one call: a resume, a V2 spawn, a spawn with a forbidden argument, of an + unregistered role or from a child. - Token totals include children, which is runner work: `codex exec` forwards token updates for the primary thread and turn only and its JSONL total is that thread's, so the runner reads each child's rollout after the run and folds its last cumulative `token_count` into the run totals, per model. Codex still reports no dollar cost. - Role loading, child model binding, hook reload, the multi-agent tool set and the rule - that forms hook names from it, the hook outcomes Codex honours as a block, the + that forms hook names from it, the hook outcomes Codex honours as a block, the child + marker in hook payloads (`agent_id` in a child's, absent from the parent's), depth one + with no multi-agent tool for a child, four open children with overflow rejected, the catalog's V1 entries, the version Codex supplies to an entry that carries none and the - floor model are revalidated on each Codex CLI bump. + floor model are revalidated on each Codex CLI bump; a bump that changes the payload + shape ships with the hook updated, or the child-spawn rule fails open. Verified against `rust-v0.159.3` (the sandbox image pin): role-file and `hooks.json` -reload at child start, `config.toml` read once at launch, the spawn arguments, the V1 -tool set and the hook-name rule, the exact-or-regex matcher rule, the hook outcomes +reload at child start, `config.toml` read once at launch, the spawn arguments, the child +marker in hook payloads, depth one with no multi-agent tool for a child, four open +children with overflow rejected, the V1 tool set and the hook-name rule, the +exact-or-regex matcher rule, the hook outcomes (exit 2 with a reason blocks; exit 2 without one, another exit, an `async` handler or a timeout does not), `codex debug models --bundled`, the catalog's V1 entries and the version Codex supplies to an entry that carries none (`multi_agent`, on by default), and From 095c62ef5b6393309d8f658395c635d36525e8a6 Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Thu, 1 Oct 2026 16:10:48 -0400 Subject: [PATCH 26/28] docs(adr): fail the run on a spawn without a recorded admission Answers the review bot's low finding on 6c0ad3a0, which asked for a decision on the fail-open path before implementation. Codex's exec stream drops hook outcomes and its rollout does not persist them (exec/src/event_processor_with_jsonl_output.rs, rollout/src/policy.rs), so the runner cannot see a failed guard directly; instead the guard records each admission with the spawn's tool_use_id in the findings log and the runner, which already reads every child's rollout, fails the run when a child has no admission, as it fails a run whose audit log does not verify. A resume on that path is the residual that remains. The switch ships after the cross-check. Signed-off-by: Dharit Shah --- .../0126-fullsend-owned-codex-subagents.md | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/docs/ADRs/0126-fullsend-owned-codex-subagents.md b/docs/ADRs/0126-fullsend-owned-codex-subagents.md index 00d5abe336..3336ad464b 100644 --- a/docs/ADRs/0126-fullsend-owned-codex-subagents.md +++ b/docs/ADRs/0126-fullsend-owned-codex-subagents.md @@ -131,7 +131,14 @@ Codex children run under a policy the runner provisions and enforces. it, as failed and lets the call proceed, as under ADR 0100, so on that path a resume, a V2 spawn, a spawn with a forbidden argument or of an unregistered role, or a spawn from a child goes through unpoliced, and the opt-in tool allowlist, off by default, is no - backstop for it. Bootstrap fails if it cannot install the hook. + backstop for it. The runner closes that path for spawns after the fact: the hook + records each admission in the findings log with the spawn's `tool_use_id`, and after + the run the runner, which reads every child's rollout for usage, fails the run when a + child has no admission, as it fails a run whose audit log does not verify. Codex's + `exec` stream drops hook outcomes and its rollout does not persist them, so the + children themselves are the evidence. A resume on that path reopens an admitted child + and is the residual that remains. The switch that turns the tools on ships after the + cross-check. Bootstrap fails if it cannot install the hook. ## Consequences @@ -167,7 +174,8 @@ Codex children run under a policy the runner provisions and enforces. timeout kills the handler without touching a protected file, so it is the fail-open path that remains under Option 4, and on it the whole admission policy is unenforced for one call: a resume, a V2 spawn, a spawn with a forbidden argument, of an - unregistered role or from a child. + unregistered role or from a child. A spawn on that path fails the run after the fact + through the admission cross-check; a resume does not, and that is what remains. - Token totals include children, which is runner work: `codex exec` forwards token updates for the primary thread and turn only and its JSONL total is that thread's, so the runner reads each child's rollout after the run and folds its last cumulative @@ -177,8 +185,10 @@ Codex children run under a policy the runner provisions and enforces. marker in hook payloads (`agent_id` in a child's, absent from the parent's), depth one with no multi-agent tool for a child, four open children with overflow rejected, the catalog's V1 entries, the version Codex supplies to an entry that carries none and the - floor model are revalidated on each Codex CLI bump; a bump that changes the payload - shape ships with the hook updated, or the child-spawn rule fails open. + floor model, and the `exec` stream dropping hook outcomes with the rollout not + persisting them, are revalidated on each Codex CLI bump; a bump that changes the + payload shape ships with the hook updated, or the child-spawn rule fails open, and one + that exposes hook outcomes lets the runner read them directly. Verified against `rust-v0.159.3` (the sandbox image pin): role-file and `hooks.json` reload at child start, `config.toml` read once at launch, the spawn arguments, the child @@ -187,6 +197,7 @@ children with overflow rejected, the V1 tool set and the hook-name rule, the exact-or-regex matcher rule, the hook outcomes (exit 2 with a reason blocks; exit 2 without one, another exit, an `async` handler or a timeout does not), `codex debug models --bundled`, the catalog's V1 entries and the -version Codex supplies to an entry that carries none (`multi_agent`, on by default), and -the `exec` usage stream carrying the primary thread only. The checks ran on the 0.157.0, -0.159.0 and 0.159.3 binaries. +version Codex supplies to an entry that carries none (`multi_agent`, on by default), the +`exec` usage stream carrying the primary thread only, and `exec --json` dropping hook +outcomes with the rollout not persisting them. The checks ran on the 0.157.0, 0.159.0 +and 0.159.3 binaries. From 349cde20bddc9aa3ff173bec55b7f7cd035856ca Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Thu, 1 Oct 2026 16:12:52 -0400 Subject: [PATCH 27/28] docs(adr): leave the fail-open abort choice to the implementation PRs waynesun09, 2026-10-01: an implementation-time choice, not an ADR defect; #7829 keeps the multi-agent tools off until the hook ships, and whether a Failed/timeout dispatch outcome aborts the run is for the implementation PRs under #6970. The ADR keeps the two verified facts an implementation needs (exec --json drops hook outcomes; the rollout does not persist them) and no longer decides the cross-check itself. Signed-off-by: Dharit Shah --- docs/ADRs/0126-fullsend-owned-codex-subagents.md | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/docs/ADRs/0126-fullsend-owned-codex-subagents.md b/docs/ADRs/0126-fullsend-owned-codex-subagents.md index 3336ad464b..1673178736 100644 --- a/docs/ADRs/0126-fullsend-owned-codex-subagents.md +++ b/docs/ADRs/0126-fullsend-owned-codex-subagents.md @@ -131,14 +131,11 @@ Codex children run under a policy the runner provisions and enforces. it, as failed and lets the call proceed, as under ADR 0100, so on that path a resume, a V2 spawn, a spawn with a forbidden argument or of an unregistered role, or a spawn from a child goes through unpoliced, and the opt-in tool allowlist, off by default, is no - backstop for it. The runner closes that path for spawns after the fact: the hook - records each admission in the findings log with the spawn's `tool_use_id`, and after - the run the runner, which reads every child's rollout for usage, fails the run when a - child has no admission, as it fails a run whose audit log does not verify. Codex's - `exec` stream drops hook outcomes and its rollout does not persist them, so the - children themselves are the evidence. A resume on that path reopens an admitted child - and is the residual that remains. The switch that turns the tools on ships after the - cross-check. Bootstrap fails if it cannot install the hook. + backstop for it. Whether that outcome should also fail the run at the runner is an + implementation choice under #6970, not decided here; Codex's `exec` stream drops hook + outcomes and its rollout does not persist them, so an implementation that wants it + works from the findings log and the children's rollouts. Until the hook ships, #7829 + keeps the multi-agent tools off. Bootstrap fails if it cannot install the hook. ## Consequences @@ -174,8 +171,7 @@ Codex children run under a policy the runner provisions and enforces. timeout kills the handler without touching a protected file, so it is the fail-open path that remains under Option 4, and on it the whole admission policy is unenforced for one call: a resume, a V2 spawn, a spawn with a forbidden argument, of an - unregistered role or from a child. A spawn on that path fails the run after the fact - through the admission cross-check; a resume does not, and that is what remains. + unregistered role or from a child. - Token totals include children, which is runner work: `codex exec` forwards token updates for the primary thread and turn only and its JSONL total is that thread's, so the runner reads each child's rollout after the run and folds its last cumulative From e9dd839226d598c9c72aed24a9c436a4fc51cd4a Mon Sep 17 00:00:00 2001 From: Dharit Shah Date: Thu, 1 Oct 2026 16:33:02 -0400 Subject: [PATCH 28/28] docs(adr): name the host-captured evidence an abort check would use Answers the review bot's medium finding on 095c62ef: the findings log and the children's rollouts are agent-writable, so they cannot establish that an unadmitted spawn fails the run. The claim itself is already gone (the abort choice is left to the implementation PRs); this commit replaces the pointer to those two stores with the exec stream's collab_tool_call items (a spawn's sender and receiver thread ids and status), which the host captures outside the sandbox, and notes that the stream carries no item for a resume. Signed-off-by: Dharit Shah --- .../ADRs/0126-fullsend-owned-codex-subagents.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/ADRs/0126-fullsend-owned-codex-subagents.md b/docs/ADRs/0126-fullsend-owned-codex-subagents.md index 1673178736..244204acb1 100644 --- a/docs/ADRs/0126-fullsend-owned-codex-subagents.md +++ b/docs/ADRs/0126-fullsend-owned-codex-subagents.md @@ -132,10 +132,13 @@ Codex children run under a policy the runner provisions and enforces. V2 spawn, a spawn with a forbidden argument or of an unregistered role, or a spawn from a child goes through unpoliced, and the opt-in tool allowlist, off by default, is no backstop for it. Whether that outcome should also fail the run at the runner is an - implementation choice under #6970, not decided here; Codex's `exec` stream drops hook - outcomes and its rollout does not persist them, so an implementation that wants it - works from the findings log and the children's rollouts. Until the hook ships, #7829 - keeps the multi-agent tools off. Bootstrap fails if it cannot install the hook. + implementation choice under #6970, not decided here. Codex's `exec` stream drops hook + outcomes and its rollout does not persist them, and the findings log and the children's + rollouts are agent-writable, so an implementation that wants it works from the stream's + `collab_tool_call` items (a spawn's sender and receiver thread ids and status), which + the host captures outside the sandbox; the stream carries no item for a resume. Until + the hook ships, #7829 keeps the multi-agent tools off. Bootstrap fails if it cannot + install the hook. ## Consequences @@ -194,6 +197,6 @@ exact-or-regex matcher rule, the hook outcomes (exit 2 with a reason blocks; exit 2 without one, another exit, an `async` handler or a timeout does not), `codex debug models --bundled`, the catalog's V1 entries and the version Codex supplies to an entry that carries none (`multi_agent`, on by default), the -`exec` usage stream carrying the primary thread only, and `exec --json` dropping hook -outcomes with the rollout not persisting them. The checks ran on the 0.157.0, 0.159.0 -and 0.159.3 binaries. +`exec` usage stream carrying the primary thread only, and `exec --json` carrying a +`collab_tool_call` item per spawn but no hook outcome, with the rollout not persisting +hook outcomes either. The checks ran on the 0.157.0, 0.159.0 and 0.159.3 binaries.