Repository navigation
feat(runtime): report the model selected for a subagent - #1148
Conversation
Co-authored-by: xxchan <37948597+xxchan@users.noreply.github.com>
|
Approved at 90a4297. Clean, thorough implementation of the two-step subagent model contract: task_started.model (and TaskView.model) for native parent start frames (Codex subAgentActivity, Grok subagent_spawned) while preserving 1-frame = 1-record envelopes; child-attributed model/effort projection for Claude (per-path dedup + synthetic-error exclusion), DSH (descriptor initial snapshot + request/header dedup), Codex child thread/started, and Kimi KAP (recordTaskAgent taskId fallback and live parent_tool_call_id refinement); honest unknown handling for Qwen and Qoder; and complete spec/runtime docs with verified relative links. Ready to squash-merge once all CI checks are green at 90a4297.
|
<!-- stamp:review:v1 --> <sup><img src="https://cdn.raft.build/avatars/6aabf32c-20bc-4cba-b55a-2aa72b60999b/8ba4452ceb890f1930886ef4286fdb99.webp" width="16" height="16" align="absmiddle" alt=""> <b>Otter</b> (open-agent-runtime) opened via Stamp · <a href="https://stamp.build/review?receipt=prc_5616e546330c91c081b0ecb0d0019ae3"><picture><source media="(prefers-color-scheme: dark)" srcset="https://stamp.build/assets/brand/stamp-glyph-dark.d907ffcadb44.svg"><img src="https://stamp.build/assets/brand/stamp-glyph-light.58a2c10ed108.svg" width="13" height="12" align="absmiddle" alt=""></picture> View →</a></sup> --- <!-- /stamp:review:v1 --> The Windows failure on PR #1148 timed out the Antigravity plan query after 400 ms, before the ACP fixture wrote its process identity. In a controlled reproduction a 600 ms cold start caused the original test to fail reading acp.pid. The revised test passed the same delay, reached authenticate, observed the timeout and confirmed the recorded process exited. The audit covered tests and sea-trial fixtures that read PID files, serialized process trees, or process identities from login state. Timeout cases now hold the caller's clock until the actual child or descendant has published its PID and start time, with an independent real-time readiness limit. The clock then runs the existing deadline and cleanup timers. This covers the account and login readers, Pi RPC readers, executable and pipe probes, process table command, installer and Windows auxiliary cleanup. The OpenCode late-listen test still measures the shared startup and HTTP budget. Process assertions continue to check the recorded identities. The separate Windows shard-one failure returned a null exit status after 90 seconds. Its log ends after verifying the first 220-byte fixture download. It cannot identify the subsequent operation that stalled. The CI-script test now runs the Node suite in an owned process tree, isolates its temporary directory and npm cache, and includes the saved installer stage and subprocess diagnostics on failure. A Linux control that deliberately stalled npm reported the timeout and the npm-install stage. The original 90-second limit and the four real npm installation cases are retained. The original failures are recorded on [Windows shard one](https://github.com/botiverse/oar/actions/runs/45143654896/job/137587512698) and [shard two](https://github.com/botiverse/oar/actions/runs/45143654896/job/137587512524). Both shards passed on the same head when rerun. The cold-start regression and installer-stage control were repeated locally. All three native Pi stalled-reader cases passed on Linux. The full check on the rebased head passed type checking, lint, 5,596 unit tests and 19 mock behavior cases. --------- Co-authored-by: Otter <open-agent-runtime+otter@agents.stamp.build> Co-authored-by: xxchan <37948597+xxchan@users.noreply.github.com>
A host can seed a task from its optional
task_started.modeland then apply model changes from that child. Codex and Grok populate the start field only when the native task start supplies the resolved child model. The task and any graph edge keep the parent's record envelope.Claude reports the first and each changed assistant model per full child path. DSH reports the initial child descriptor and subsequent changes from request headers separately for each session. Codex reads an optional child thread-start selection under the nested thread ID. Kimi KAP uses the spawning call or task ID to associate child agent metadata, including a restored task list. The attribution and record-stream specifications describe both host joins and root isolation.
Verification used local scripted providers. Claude 2.1.330 returned the same model on two child assistant frames. Codex 0.171.0 and Grok 1.0.92 returned the resolved child model on a parent frame. Qwen 0.28.4 foreground and background controls emitted no child assistant selection. Qoder 1.1.95's native fake-response control ended before the task started, so its optional SDK model field remains unconfirmed. DSH's descriptor and header were checked against a real child log, Kimi against recorded foreground and background KAP exchanges, and OpenCode against its v2.3.2 child envelope and existing ACP recording.
Regression coverage includes recorded Claude projection, changes across sibling and nested paths, DSH descriptor/header deduplication, resumed Codex root model isolation and Kimi task/call ID fallback.
The exact head passed typecheck, type-aware lint, 5,596 unit and replay tests and all 19 applicable mock sea-trial cases on Linux.