Remaining work from the design doc rsworkspace/docs/spwan-agent-cross-runner.md, confirmed via a two-sided adversarial audit against the real implementation (commit 97b5993b, worktree swarm/20260618T212853Z-0d60/spawn-cross-runner). No todo!/unimplemented!/stubs in the spawn paths.
Already implemented (verified — do not redo)
- PR1–PR9: DONE.
model + find_by_model fail-loud on multi-match + unavailable-model error (registry.rs, spawn_routing.rs); spawn Bridge retargeted to the resolved prefix with a per-prefix cache; spawn_depth via meta, persisted atomically + MAX_SPAWN_DEPTH=3 guard before spawning (G4); shared plain-NATS forwarding primitive + session_id rewrite + dead HTTP path removed (spawn_handler.rs) (G1); multi-level cancel cascade (G5); bounded structured result with transcript_ref/branch_ref with a real producer (publish_transcript) (G6); isolated workspace fail-loud + uncommitted overlay + change-aware teardown + GC by TTL/parent-close (G7); prefix-qualified disambiguation (PR6); tracked handle (status/result subjects) + collect_spawn + idempotency (reuse_or_insert) (PR7); async concurrency + per-parent caps + per-spawn tool allowlist enforced destination-side (PR8); identity + OTel + emitted protobuf accounting event (PR9). Protos under proto/trogonai/spawn/v1/. Typed config.
- Kill-switch / feature-flag (ADR-0007):
cross_provider_enabled / env SPAWN_CROSS_PROVIDER_ENABLED, enforced by cross_provider_gate (same-runner always allowed).
- G8 two layers: registry pre-check (error) + runtime failure → handle
Failed.
Verification status: cargo build --workspace ✅ compiles clean; unit tests ✅ (runner-tools+registry 258, runners 802, spawn-specific 41 — 0 failures).
Remaining work
Codex (PR10 — partial by design)
Cross-runner environment (G3)
Hosted plane (deferred — HARD dependency for hosted)
Other deferred
Optional optimizations (not v1)
Verification (pending: needs infra/credentials) — belongs to THIS issue
Note (not a bug, worth tracking)
- The
status/result/accounting messages are protobuf types but are serialized with serde_json::to_vec on the internal {prefix}.spawn.* subjects, whereas the doc says "binary on internal paths". The contract stays typed (drift-proof); it is an encoding detail, not a missing feature.
Design doc: rsworkspace/docs/spwan-agent-cross-runner.md · Implementation: commit 97b5993b · Related: #291
Remaining work from the design doc
rsworkspace/docs/spwan-agent-cross-runner.md, confirmed via a two-sided adversarial audit against the real implementation (commit97b5993b, worktreeswarm/20260618T212853Z-0d60/spawn-cross-runner). Notodo!/unimplemented!/stubs in the spawn paths.Already implemented (verified — do not redo)
model+find_by_modelfail-loud on multi-match + unavailable-model error (registry.rs,spawn_routing.rs); spawn Bridge retargeted to the resolved prefix with a per-prefix cache;spawn_depthviameta, persisted atomically +MAX_SPAWN_DEPTH=3guard before spawning (G4); shared plain-NATS forwarding primitive +session_idrewrite + dead HTTP path removed (spawn_handler.rs) (G1); multi-level cancel cascade (G5); bounded structured result withtranscript_ref/branch_refwith a real producer (publish_transcript) (G6);isolatedworkspace fail-loud + uncommitted overlay + change-aware teardown + GC by TTL/parent-close (G7); prefix-qualified disambiguation (PR6); tracked handle (status/result subjects) +collect_spawn+ idempotency (reuse_or_insert) (PR7); async concurrency + per-parent caps + per-spawn tool allowlist enforced destination-side (PR8); identity + OTel + emitted protobuf accounting event (PR9). Protos underproto/trogonai/spawn/v1/. Typed config.cross_provider_enabled/ envSPAWN_CROSS_PROVIDER_ENABLED, enforced bycross_provider_gate(same-runner always allowed).Failed.Verification status:
cargo build --workspace✅ compiles clean; unit tests ✅ (runner-tools+registry 258, runners 802, spawn-specific 41 — 0 failures).Remaining work
Codex (PR10 — partial by design)
spawn_agent(andcollect_spawn) as MCP tools to the Codex CLI subprocess. Today it only works as a destination.SpawnMeta:new_session(trogon-codex-runner/src/agent.rs:339) ignoresreq.meta→ it does not honorspawn_depth, per-spawnallowed_tools, identity, or destination-side provisioning. (G7 isolation still holds via the parent'sworkingDirectory.)Cross-runner environment (G3)
SpawnMeta(proto + domain) has nomcp/egressfields. The "do not propagate" default is implemented; the opt-in mechanism to propagate specific MCP servers / egress policy when a task needs them is missing.Hosted plane (deferred — HARD dependency for hosted)
meta, accounting, caps), but the plane that triggers/enforces them is missing.serve_spawn_quota_cancelhook (spawn_cancel.rs) exists but is not wired into any runnermain→ inert until (a) a runner serves it and (b) the gateway's quota trigger exists.Other deferred
clone_workspace_atclones from a localrepo_rootand is gated off (destination_provisioning=false). The remote descriptor (repo + ref + sync from another host) is missing. v1 = shared FS.supports_toolsin registry/runner; v1 assumes "advertised ≡ tool-capable".acp_prefix/modelsare still untyped JSON inmetadata(registry.rs:205). Migrate-when-touched.Optional optimizations (not v1)
Verification (pending: needs infra/credentials) — belongs to THIS issue
spawn_forwarding_integration.rs): run with NATS/Docker up (streaming with rewrittensession_id+spawn_idattribution; status/result on the handle subjects). Not executed today without a server.session/updatebetween providers (a parent of one provider correctly receives chunks from a child of another). Does not exist — the current integration test only exercises plain-NATS forwarding + handle subjects with a mock, not the normalized cross-providernew_session/promptpath.acp.grok → claude-opus-4-6,acp → grok-4,acp → openai/gpt-4o. Requires the runners up withANTHROPIC_TOKEN/XAI_API_KEY/OPENROUTER_API_KEY(ask before using credentials). Not to be confused with Test mid-session model switching end-to-end (incl. real credentials) #359 (that is the E2E for mid-session model switching, a different feature).Note (not a bug, worth tracking)
status/result/accounting messages are protobuf types but are serialized withserde_json::to_vecon the internal{prefix}.spawn.*subjects, whereas the doc says "binary on internal paths". The contract stays typed (drift-proof); it is an encoding detail, not a missing feature.Design doc:
rsworkspace/docs/spwan-agent-cross-runner.md· Implementation: commit97b5993b· Related: #291