docs(lineage): live Claude Code 2.1.259 orchestration capture (parallel, sequential, nested spawns; resumed turns; /compact) - #455
Conversation
🦋 Changeset detectedLatest commit: 96df81f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 344d7650d2
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
CI never picked up the open event for 344d765 (zero check runs after 7 minutes); closing and reopening to fire |
|
@codex review |
|
Heads-up from the queue worker: GitHub is not creating any workflow runs for this PR (0 check runs on 344d765 and 8e181ec) because the PR is |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 8e181ecb41
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…lel, sequential and nested spawns, resumed turns, manual compact
- examples/host-test probe:capture: --scenario <file.json> ordered prompt list;
Claude turns run claude -p --output-format stream-json --verbose and resume
the first turn's session_id; per-turn stream transcripts saved; README note.
- scenarios/claude-orchestration.json: two parallel Agent spawns (Explore +
general-purpose), one sequential spawn nesting another, the host-test skill,
a plugin-command probe, /compact, a final stop.
- fixtures/host-lineage/claude-2.1.259-orchestration{,.stream}.ndjson: 141
redacted records (127 hooks, 14 MCP) plus the thinned model stream.
- lineage-registry.test.ts: replay the orchestration fixture; every child
event resolves to its agent, parent and root (depth 1 and 2); spawn claims
cross-checked against tool_response.agentId and the stream's task_started.
- host-test dump tool: DEFAULT_DUMP_LIMIT=50 newest records unless limit is
given (a bare dump over ~180 records exceeded the Agent Document node limit,
PostToolUseFailure live); route-unit test.
- Matrix, proofs note and claude-2.1.250.json lineage evidence updated
(PostToolUseFailure and PreCompact/PostCompact now observed; stream-json
shows depth-1 children only). adapterRevision unchanged.
…document Host Test on the examples pages; releasable changeset
…mp's default limit (README, site en/zh); describe Stop as prompt-path dependent
8e181ec to
c1b5cf2
Compare
|
@codex review |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c1b5cf25e6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…r turn times out; site docs say multi-turn scenarios are Claude-only
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 931770b437
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…yload excerpts under the 2.1.257 heading
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 60f29cddac
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…s such as --prompt "--help" still work
|
@codex review |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
Maintainer refinement on the live Claude lineage evidence: drive Claude Code's own orchestration surfaces instead of one prompt, so the capture is realistic. Live model (Claude Code 2.1.259,
claude-sonnet-5), unmodified harness, isolated home; the real~/.claudewas never written.probe:capture <host> --scenario <file.json>takes an ordered prompt list. Claude turns runclaude -p --output-format stream-json --verbose; turns after the first--resumethe session id the first turn'ssystem/initreported, so one capture is a multi-turn session. Per-turn model streams are saved assession-<stamp>.turn-N.stream.ndjson. Codex/Cursor drivers take the first turn only and refuse longer scenarios. README note added.scenarios/claude-orchestration.jsonis the checked-in scenario.76bb405f…: (1)pwd,dump, twoAgentcalls in one message (Explore+general-purpose, both backgrounded by the host), then a sequentialgeneral-purposespawn that nested another (depth 2); each subagent ran a shell command and calledhost-test.dump(+probe); (2)Skill host-test:host-testat the root, plugin-command probe →NO_PLUGIN_COMMAND(the pack ships nocommands/; the skill is its only slash command); (3)/compactas the-pprompt →PreCompact(trigger: manual) /SessionStart source: compact/PostCompact; (4) final stop. Fixtures:fixtures/host-lineage/claude-2.1.259-orchestration.ndjson(141 records: 127 hooks, 14 MCP) +.stream.ndjson(thinned model stream, 202 envelopes, tagged by turn). Same redaction rules as the existing fixtures.lineage-registry.test.tscase: every one of the 66 child hook payloads resolves to its ownagent_id, the right parent (root for the three depth-1 agents, the sequential agent for the nested one) and the root; root-side hooks across resumed turns, the compact pair and the failed tool calls stay depth 0 native; the fiveprobecalls resolve at depths 1, 1, 1, 2, 0 viaclaudecode/toolUseId; spawntoolCallIds are certain for all four children (the host serialised the parallel pair:SubagentStartbefore the nextAgentPreToolUse) and equaltool_response.agentIdand the stream'ssystem/task_started(task_id,tool_use_id,spawn_depth1/1/1/2,is_backgrounded). No lineage/projection code change was needed.PostToolUseFailurefired three times, alldumpexceeding the runtime's Agent Document node limit ("Agent Document node count exceeds 10000") once the live log held ~180 records; the model recovered withlimit.dumpnow returns the newest 50 records by default (DEFAULT_DUMP_LIMIT),matchedstill counts the log; route-unit test added.Skillis the only skill trace,PostToolUseFailurefields,SessionStart resumefields,ScheduleWakeup, turn boundaries, stream-vs-hooks incl. depth-2 traffic absent from stream-json), §2/§3/§5/§7/§8 updated (PostToolUseFailureandPreCompact/PostCompact"not observed" corrected; OAuth gap closed — the unmodified harness now signs in; auto-compaction not induced, recorded). Proofs note records the 2.1.259 re-run. Capability tableclaude-2.1.250.jsonlineage.*evidence extended; emitted output andadapterRevisionunchanged. Changeset:.changeset/claude-orchestration-lineage-evidence.md(patch).Signed-in proofs (re-run against the harness home, 2.1.259)
pnpm test:host-install:session:claude— pass 2/2pnpm test:packed:native:claude— pass 8/8 (no fix needed this time)AGENT_BUNDLE_NATIVE_CLAUDE_SMOKE=1 rstest native-claude-contract.test.ts— 17/18, sameclaude-native.normal-home.changed(native-claude-contract: normal-home guard digests .claude.json, which Claude Code 2.1.257 rewrites on every signed-in turn #439, still open; reproduced on 2.1.259)Stand-in vs live differences stated
Everything the stand-in claimed still holds (§8). New/corrected by this run:
PostToolUseFailureandPreCompact/PostCompactare observed (were "not observed"); two spawns in one message do not produce an uncertain sibling cohort;stream-jsongivesspawn_depthandtask_id↔tool_use_idbut omits depth-2 traffic;SessionStart source: resumecarriesseconds_since_last_response,context_tokens,prompt_cache_likely_expired,estimated_cache_write_usd.Test plan
pnpm lint— 0 errors, 0 warningspnpm typecheck— cleanpnpm test:unit— 3018 passed, 0 failedpnpm docs:site:build— cleanrstest lineage-registry.test.ts— 38 passed (new orchestration case included)examples/host-test:pnpm validate,pnpm test(incl. new dump-limit test),pnpm typecheckprobe:uninstall claude—/tmp/host-test/claude-homeand workspace gone;~/.claude.jsonhas nohost-testproject entryReview status
344d7650d(3 threads: fail-closed resume, site docs in both locales, releasable changeset) — fixed in8e181ecb4, answered on-thread.8e181ecb4(3 threads: refuse--scripted-model+--scenario, document thedumpdefault limit in both locales, correct the per-turnStopclaim) — fixed inc1b5cf25e(rebased ontomainat feat(lineage): request.lineage is the only identity-adjacent surface; scoped, self-correcting Cursor child binding #444/fix(plugin): point Claude plugin.json at hooks/hooks.json so Cursor wrappers are not loaded #450; matrix and Claude capability-table conflicts resolved by merging both sides), answered on-thread.c1b5cf25e(3 P2 threads: value flags need a value, keep completed turns when a later turn times out, docs say multi-turn is Claude-only) — fixed in931770b43, answered on-thread.931770b43(2 P2 threads: refuse--prompttogether with--scenario, keep the 2.1.257 payload excerpts under the 2.1.257 heading) — fixed in60f29cdda, answered on-thread.60f29cdda(1 P2 thread: value flags must accept option-like values) — fixed in96df81f64, answered on-thread.96df81f64(current head): "Didn't find any major issues" (2026-09-03T23:20Z). No unreviewed commits.Release gatesonc1b5cf25efailed only innpm audit(audit endpoint returned an error … Service Unavailable), an npm registry outage unrelated to this PR; re-run on the new head.Verify (Node 24)on96df81f64failed only inpackages/workbench/tests/mcp-app-preview-browser.test.ts("retains a failed runtime lifecycle tombstone…",bootstrapRequestssaw one/runtime-bootstrapinstead of two) — a Workbench browser-timing flake in a package this PR does not touch (968/969 passed); failed job re-run.Note for the hook_event_name lane
The live 2.1.259 capture confirms Claude delivers
hook_event_namein PascalCase (PreToolUse,PostToolUse,PostToolUseFailure,SubagentStart,SessionStart,PreCompact, …) on all 127 hook payloads infixtures/host-lineage/claude-2.1.259-orchestration.ndjson; every one mapped to a canonical event (provenance.nativeEventkeeps the PascalCase name). No casing change is made in this PR.