Repository navigation
Conversation
…lanes When the Claude Agent SDK spawns a fresh subagent inside the same workspace, both parent and child inherit the same working directory and omit user_id:session_... metadata, but start with different system prompts and first user prompts. Without an agent-level discriminator in the fallback session hash, concurrent subagents collide onto the parent's session lane and trigger prefix-drift resets. - Extract the Claude Agent SDK subagent system prompt header via claudeSubagentAgentId and include it in the Anthropic fallback hash when explicit session metadata is absent. - Include the opening user message fragment via anthropicFirstUserFrag when no explicit session_id or subagent header is present, while keeping custom system prompts out of the fallback key so mid-session system prompt edits do not split the session. Fixes ranxianglei#5724
ba5777c to
70f5515
Compare
(ai: vllm-qwen/qwen3.8-27b) 查重: 不重复。open [PR] 条目与镜像检索中均无其他针对「Claude Code SDK subagent 会话分裂 / 判别片段碰撞」的条目;本 PR 正对应上游 issue #5724(同一机制:① SDK subagent 的 system 块以 "You are Claude Code…" 开头,被 MAIN_SYSTEM_PREFIXES 误判为主会话而不分裂;② 共享的长 超过 1024 字符时,anthropicFirstUserFrag 先切片后剥离,两个并发 subagent 得到相同判别片段而撞车道)。 标签: bug、claude-code、scope/wiring、p2(并发 SDK subagent 撞进父会话车道触发 prefix-drift reset;能用但有明显问题,未达数据丢失/不可用级别)。 初审已启动,方向判断:两处修复都打在产生缺陷的判定点上(claudeSubagentAgentId 的主会话判定 + frag 切片的剥离时机),diff 干净(仅 src/session-id.ts 与其测试文件),base 即最新 master。正在本地跑定向测试并等 CI 全量套件,详细审核报告(八问体例)随后补。 |
Regression pins for the new stripLeadingSystemReminders behavior added by this PR: - reminder-only first user message degrades to the original text (no empty discriminator) - an unclosed leading <system-reminder> tag is never stripped (no data loss) - multiple consecutive leading reminders are all stripped
(ai: vllm-qwen/qwen3.8-27b) 审核完成(独立重审,未照抄 issue 结论;核对了 PR 两个 head:初版 70f5515 与你后来合入 ci-fixes 的 97bc3dd——后者只动了 6 个 dsh 测试文件,本 PR 核心文件逐字节未变,初审结论对新 head 同样成立)。 既有行为回归清点(逐项)
行为变更披露(旧值→新值+原因)
代码与测试审查
CIstatic-gates 全绿;97bc3dd 的全量矩阵截至最后一次快照无失败、其余分片仍在跑。你合入的 ci-fixes 遵循 #4599 继承红处理流程,与本 PR 核心无关,处置正确。 结构化八问
收工判定:方向正确、diff 干净、回归面受控且已披露、测试有牙——CI 全绿后可合。注意此项触碰会话身份绑定逻辑,按 AGENTS.md §7.4 属人工审批范畴(不适用自动合并),合并由你来。建议合并时连同边缘测试 commit( |
…main-session evidence
Convergence of review finding on this PR: the substring check
(!includes("running within the Claude Agent SDK")) could mis-split a REAL
main session whose interactive block merely mentions that phrase later in
its text, violating the ranxianglei#970 invariant that a main session can never be
mis-split. The banner is now excluded by exact prefix match
(CLAUDE_SDK_HARNESS_BANNER), and "You are Claude Code" is restored to
MAIN_SYSTEM_PREFIXES so a reworded banner degrades back to the pre-SDK
serial behavior instead. Adds regression rows pinning: main block that
mentions the phrase stays main, banner-alone carries no main evidence,
SDK subagent with parent header only falls back to the parent id.
Covers the rows the original PR left open: string-content path strips the leading reminder, a reminders-only message falls back to the ORIGINAL text (spec: never ""), and reminder-free output stays byte-identical to the pre-strip behavior so the common case cannot silently drift.
(ai: vllm-qwen/qwen3.8-27b) CI 修复完成:PR 代码无缺陷,最后一处红是已知 flaky 测试,需一次 re-run。 上一轮(head 70f5515):10 个测试分片全红 = 继承 master 出生即红集群(#5687 合入后 6 个 dsh/persona/watermark 回归钉转红)+ 1 个 Windows 文件锁 flake。按 CI 协调政策把 origin/ci-fixes(0470bec,仅重对齐 6 个测试钉)merge 进 PR 分支并推送,新 head 97bc3dd。 本轮(run 42005243832,head 97bc3dd):25/26 全绿 —— 全部静态门禁/守卫绿,9/10 测试分片绿,上一轮的 Windows EBUSY flake 未复发。唯一红:test (ubuntu-latest, 22, 2)。拉取该分片日志定位:3179 个测试中恰好 1 个失败 —— 八问:
判定:PR 可合——点一次「Re-run failed jobs」清掉 flake 即可(或任何后续 push 自动带跑)。无需设计决策,未开新 issue。 |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
APPROVE —— 独立复审通过(未照抄线程内已有审核评论;对最终 head f83648e 重新核对了全部关键路径与证据)。
独立核对范围
- 作者 commit(70f5515)与两个收敛 commit(e0547f5 banner 精确前缀化、f83648e frag 边界测试行)逐段读过;ci-fixes 合入(97bc3dd)做了逐文件 blob 比对 = 纯合并,仅动 6 个 dsh/watermark 测试钉,核心文件零改动。
- 双信号门语义全量推演(交互式 CLI 主会话 /
-p主会话 / SDK 主会话 / SDK subagent / <2.1.308 旧 subagent 形状 / 仅 parent header / 无 header 流量):各路径要么与既有行为逐字一致,要么按预期修复;banner 未来改词时退化为「subagent 停止分裂」的 pre-SDK 串行行为,不会误拆主会话——降级方向安全,且已写入注释。 anthropicFirstUserFrag在仓库内只有一个调用点(server/handle.ts 的 D1-B 回退判别,仅 claude-responses identity 可达,用于 fork 键加宽):剥离 reminder 后同一 subagent run 内首条 user 消息不变 → 车道键 run 内稳定;reminder-free 输出逐字节不变(有测试钉住)。- 测试有效性:碰撞用例与 SDK-sub 分裂行在修复前必红,是真回归钉;字符串路径 / 仅-reminder 回退原文 / 无 reminder 逐字节三行补上了原 PR 缺的边界;正负双向齐全(#3617)。
- CI:head f83648e 镜像缓存 30/30 绿(0 failed / 0 pending,含 typecheck/static-gates 与 ubuntu+windows × node22/24 全部分片)。
- 合规面:无 kernel/ 触碰(无需 kernel-change 声明)、无配置面/env 新增、无 version 改动、ACP 标签 hex 转义合规、PR 正文 Behavior change(old→new)披露完整(frag 重键一次冷启动、无数据丢失)。
遗留小疵(不阻塞):tests/claude-subagent-split.test.ts 文件末尾多一个空行(EOF 处 });\n\n)——纯外观问题,为它单独再烧一轮全量 CI 不成比例,留待后续任意触及该文件的提交顺手清掉。
结论:可合并(merge 由人执行)。
(ai: vllm-qwen/qwen3.8-27b) review-worker-r1 收工:对最终 head f83648e 完成独立复审(未照抄线程内已有结论——ci-fixes 合入逐文件 blob 比对确认纯合并、双信号门全人群语义推演、frag 唯一消费点核对、测试计数与正文声明核对 7/7+13/13),已提交正式 APPROVE review:pull/5726#pullrequestreview-5783921248。CI 镜像缓存 30/30 绿(0 failed/0 pending)。两个不阻塞的尾巴:① tests/claude-subagent-split.test.ts 文件尾多一个空行(纯外观,没为它再烧一轮全量 CI);② 前序 reviewer 留在上游仓的临时分支 |
[bot] 🏷 review-worker-r1 收工确认(补前缀正式收口):本 lane 对 PR 最终 head f83648e 完成了独立复审——逐段读了作者 commit 与两个收敛 commit、ci-fixes 合入做了逐文件 blob 比对(纯合并)、双信号门全人群语义推演(交互式 CLI / |
…t runs (ranxianglei#6011) The ranxianglei#5726 D1-B discriminator is not injective over concurrent same-type runs whose first user message is byte-identical shared boilerplate (ranxianglei#6011 field evidence: three CC SDK subagent runs, identical 894-char msg#1, diverging from msg#4+ — all three collided onto ONE lane at 68.7% cache hit vs 95% main). Two cooperating changes: 1. anthropicFirstUserFrag advances past user messages that carry nothing but leading <system-reminder> blocks (stripping leaves no run-distinguishing material there); the raw text of the FIRST reminders-only message stays the degradation floor when nothing later has material either. Reminder-strip output is now stripped-only; the fallback moved into the caller. 2. New anthropicLaterUserFrag: skips the first user message with extractable text (its material feeds the base frag) and joins up to 4 LATER user messages, each reminder-stripped and capped at 512 chars (CC grows early shared messages by tail append past the cap, keeping settled lanes byte-stable), joined with an ambiguity-free separator. resolveSessionOrder gains a trailing laneWideDiscriminator param (source-compatible): in the derived-persona fork branch, when a non-empty wide discriminator rides the request and an occupant skeleton already sits under the base fork key that the incoming does NOT continue — neither a strict prefix extension (growth / equal retry) nor a fragment-verified tail continuation (compaction keeps the living tail verbatim, mirroring the tag-less re-anchor rung) — the key widens to a fourth segment <base>:<fp16(wide)>: the incoming records under its own widened key and the occupant's skeleton survives untouched. Healthy runs never contest a base key and keep byte-identical pre-change keys; every other caller omits the arg.
- anthropicFirstUserFrag: advance past a reminders-only first user message to the next run-distinguishing one; advance across several uninformative messages with the first-raw floor winning when nothing later helps. - anthropicLaterUserFrag: skip-first semantics, 4-segment join, 512-char per-segment cap, separator, empty-body cases. - resolver field shape (ranxianglei#6011): byte-identical first-user boilerplate across same-type runs — first arrival keeps the plain three-segment key, the colliding run widens onto its own fourth segment (stable on equal retry), growth of the occupying run extends its own skeleton without rename, the widened run stays isolated as its window grows, and compaction re-keys once onto the fresh base frag (pre-existing ranxianglei#5095 behavior class) without colliding back. - negative control: healthy runs with distinct first-user frags take byte-identical pre-change keys (no widening segment ever appears). - degradation control: absent/empty wide discriminator reproduces exactly the pre-change behavior, collision included.
…6011 wide-discriminator + ranxianglei#5719 msgIds) Conflicts in src/session-resolve.ts (signature + wrapper) and src/server/handle.ts (anthropic call site): both sides appended optional trailing params to the same functions. Resolution keeps master's layout canonical (msgIds, readStoredMsgIds) and appends the PR's laneWideDiscriminator LAST, so every master call site/test stays source-compatible; only the PR's own ranxianglei#6011 test call sites move their wide arg to position 9.
(ai: vllm-qwen/qwen3.8-27b) Merge conflict resolved. Master had moved ~403 commits past the PR base while the branch sat green-and-waiting, which put the PR into What conflicted: both sides independently grew the same functions with new trailing optional parameters, and git cannot auto-union two differently-edited parameter lists:
Resolution rule: master's layout is canonical (trunk already shipped it and its tests call it positionally), so the merged signature keeps Process notes: master moved AGAIN mid-run (#6015 landed, 406193b → 63a4060, visible through the shared refs store), so I integrated a second time — that delta was 8 notice/web files, zero overlap, clean auto-merge. Local Verification (both merges): full typecheck clean; targeted seam tests 46/46 green — PR side: Live state now: head 八问:
判定:冲突已清除,PR 回到可合并状态(等新 head 的 CI 跑完即 |
[bot] 🏷 ✅ CI engineer run complete — full conflict-resolution report is the comment directly above (English narrative + 八问). One-line outcome: PR #5726's dirty state is cleared — master merged into the branch (twice; #6015 landed mid-run), two parameter-list conflicts resolved with master's layout canonical, pushed as |
[bot] 🏷 📡 CI status update (mirror cache, fetched 11:11 UTC): the fresh run on head |
[ework] CI fix verified green ✓ |
ranxianglei
left a comment
There was a problem hiding this comment.
(ai: vllm-qwen/qwen3.8-27b)
Round-2 review of final head 4c1559cb3
Independent end-to-end re-review after the PR gained two commits beyond my previously approved head (f83648e77) — the #6011 collision-widening fix and its tests — plus two master merges and one whitespace-only fix from this round (receipt below). All verification below was done fresh at the git level on this head.
Verification performed
- Merge purity. Both merge commits (
77a5c9e99,fd0696798) proven pure: each merge result vs the current master tip diffs to exactly the PR's five files (+464/-55) — zero conflict-resolution drift. Kernel/ changes inside the window belong to master's own merges (#5971/#5949/lock-sync), not to this PR's commits. PR commits touch no kernel/, no config surface, no env vars, no wire protocol. - #6011 mechanics. Traced the full population in
src/session-id.ts/src/session-resolve.ts/src/server/handle.ts: exact-banner exclusion (reworded banner degrades to pre-SDK serial behavior, never mis-splits a main turn whose text merely mentions the phrase); reminder-strip + advance-past-reminders-only messages with raw-text floor; newanthropicLaterUserFrag(skips the first material user message, joins up to 4 later ones, each reminder-stripped and capped at 512 chars,\u0001-separated); resolver collision-widening rung adding a fourth segment<base>:<fp16(wide)>, guarded byextendsOccupant/keepsTailso occupant growth, equal retries, and fragment-verified tail continuations never rename. Ordering verified: the #5719 msgid rescue fires BEFORE heuristic widening — identity evidence outranks the discriminator. Final call site checked argument-by-argument: the wide discriminator is the 10th, trailing, source-compatible parameter; only the claude-anthropic lane passes it. - Steady-state trace. Healthy runs (distinct first-user fragments) never contest a base key → byte-identical pre-change keys. Colliding runs each widen onto distinct keys. Equal-retry stable. Occupant growth extends its own skeleton (no rename). Stale shorter replays take the widened key until the client catches up (self-heals). Native compaction re-keys once onto the fresh base fragment — pre-existing #5095 behavior class, pinned by test.
- Tests. Six new rows across the two suites: positive field-shape scenario (first arrival claims the plain three-segment key, colliding run widens, retry stable, occupant growth causes no rename, widened run stays isolated as its window grows, compaction one-time re-key), a NEGATIVE control (distinct first-user frags → exact pre-change bytes, no fourth segment ever), and a DEGRADATION control (wide arg absent AND empty → today's collision reproduced byte-for-byte). Both directions asserted per gate discipline #3617; assertions have teeth (the collision row fails pre-fix); counts match the body's claim (26).
- Disclosure. The PR body carries a complete old→new behavior section including the #6011 stability properties and honest residuals: (a) if a run's first four later user messages are ALL shared, the widened fingerprints stay equal and the collision persists (far narrower than before); (b) compaction one-time re-key is a pre-existing class; (c) stale-replay self-heal is strictly better than the old clobber-and-rewind.
- CI. 30/30 green at this exact head via the mirror cache (the non-success rows are by-design gated e2e lanes, skipped).
Regression inventory (existing behaviors on touched paths)
Interactive CLI main lane — byte-unchanged · -p one-shot — unchanged · legacy subagent shapes (agent-id / parent headers) — unchanged · headerless traffic outside the persona-order gate — untouched (gate itself unchanged) · D1-B/D1-C fork-key widening semantics — unchanged · #5719 msgid rescue ladder — ordering preserved · nudge/kernel/wire — untouched. No unintended regression found.
Small finding fixed on spot
已顺手修:tests/claude-subagent-split.test.ts 文件尾多余空行(EOF 后多一个空行)+ commit 4c1559c(whitespace-only,零语义影响)
八问
- 是什么问题:Claude Agent SDK 的 subagent 轮次被误判为主会话而并入父会话车道;且同类型并发 subagent 首条用户消息逐字节相同(共享 CLAUDE.md 样板)时,全部撞进同一条压缩车道互相踩踏骨架(#6011 实测缓存命中 68.7% vs 主会话 95.0%)。
- 什么原因导致的:主会话分类器匹配了每个 SDK 轮次都带、不含任何分类信号的 harness 横幅;D1-B 判别子直接取首条用户消息前 1024 字符——前置共享
<system-reminder>吃满整个上限,首消息整体是样板时更是没有任何区分度,键函数对并发运行不具单射性。 - 影响范围与严重程度:CC 2.1.308+ / Agent SDK 用户的 subagent 流量;属 p1 级缓存泄露面——三个并发 subagent 会话被压成一个会话,~31% 输入量贡献 ~74% 非缓存成本;交互式 CLI /
-p/ 旧版形状不受影响。 - 怎么修复的:harness 横幅按精确前缀排除(改写即安全退化)+ SDK 主会话标记入 MAIN_SYSTEM_PREFIXES;reminder 剥离后再截断、跳过纯 reminder 消息(floor 兜底);新增宽判别子(跳过首条实质消息后取至多 4 条后续用户消息、各剥离后限 512 字符),仅在解析器碰撞加宽档消费——被占用的基础键加宽出第四段,冲突方各归其键、占用者骨架不动;参数为源码兼容的尾参,唯一调用点传入。
- 是否有回归问题:无——全人群推演(交互式 CLI /
-p/ SDK 主 / SDK sub / 旧版形状 / 仅 parent header / 无 header)除有意修复外全部字节不变;健康运行永不加宽(负向对照钉死);宽判别子缺失或为空时逐字节复现改前行为(退化对照钉死);#5719 msgid 救援先于启发式加宽的次序保持;未触碰 kernel/配置/env/线协议。 - 是否破坏缓存:本修复本身恢复缓存正确性(此前碰撞车道正是 miss 源头);受影响的派生人设车道升级时一次性改名(冷启动、无数据丢失);加宽后的键在运行生命周期内字节稳定(入站历史追加式增长 + 早期共享消息尾部追加越过 512 上限即冻结)。
- 是否改了设计方向:否——在既有 D1-B/D1-C 人设车道机制上增加一段可选判别子;身份阶梯语义不变(msgid > 顺序 > hash,加宽只是 fork 分支末档行为)。
- 是否引入了新的配置:否——无新 env、config 字段或灰度开关。
Verdict: APPROVE — clean at final head 4c1559cb3; CI green; behavior changes fully disclosed. Merge itself stays human (§7.4: session-identity logic).
[bot] 🏷 Round-2 review complete (new head since my round-1 approval). The PR gained the #6011 collision-widening fix ( 已顺手修:tests/claude-subagent-split.test.ts 文件尾多余空行(EOF 后多一个空行)+ commit 4c1559c(whitespace-only,已推到 PR 分支;PR head 现为 4c1559c) CI 30/30 green at final head |
|
ework 这个应该可以通过sessionid+msgid区分?检查最新master |
|
参考这个方案 #6011 (comment) |
[bot] 🏷 检查了最新 master( 当前状态下,sessionid+msgid 区分不了 #6011 那种并发同类 subagent 撞车道,三个结构性原因:
这正是本 PR 走内容宽判别子路线的原因:它是这种线形流量里线上字节自身携带的唯一区分信号,且缺失/为空时逐字节退化为改前行为(退化对照测试钉死)。 顺带两点:① 若未来 CC/SDK 版本在 wire 上盖了 per-run session id 或逐消息 id,碰撞本身消失、加宽档永不触发(负向对照已钉死),本 PR 与该方向不冲突、不挡路;② 如果你想把「disjoint msgids ⇒ 分裂」立成身份阶梯的新语义,那是 KDD #11 的设计变更(另立工作项讨论),不是这个 PR 的范围。 PR 状态不变:APPROVED @ |
[bot] 🏷 对着最新 master(444630170)把这条方案的关键论断逐条核实过了,先认账:它对我上一轮「拿不到 msgid」的纠正是对的——我按 KDD #18 的 harvest 适配器(有门、仅回环)框定了可用性,漏了 raw-wire toolCallIds 这条无门、无回环要求、纯解析请求体的通道。核实结果: 一、方案里我独立验证成立的部分
二、我的独立补充(方案没展开、落地前必须钉死的点)
三、建议(明确,不甩选择题)
八问(决策向)
结论:建议 A 现在合(#5726 就绪)、C-wire 设计后开 follow-up、C-jsonl 留设计项——等你拍板。 |
[bot] 🏷 收口确认:完整评估已在上条发出(对 #6011 方案评论的逐条核实 + 三点独立补充 + 分选项八问)。一句话结论:建议先合 #5726(A)——已就绪(APPROVED @ |
Why
Two session-isolation defects in
src/session-id.tsfor Claude Code 2.1.308+ / Claude Agent SDK, plus one field-evidenced face of the same mechanism family found during review (#6011):"You are Claude Code, Anthropic's official CLI for Claude, running within the Claude Agent SDK."— the main-session classifier matched any block starting with"You are Claude Code", soclaudeSubagentAgentIdreturnedundefinedfor every SDK subagent turn and that traffic collapsed onto the parent session's lane (Subagent first token stalls 1-2min: withSessionLock covers full forward + slow flash upstream first byte #970's split never fired for SDK subagents).<system-reminder>prefixes collide inanthropicFirstUserFrag. For headerless / parent-header-only subagents, the derived-persona lane key uses a 1024-char fragment of the first user message as discriminator. Claude Code prepends shared<system-reminder>…</system-reminder>blocks (CLAUDE.md / codebase context, often >1024 chars) before the actual task prompt — so concurrent subagents with distinct tasks produced identical fragments and shared one compression lane.x-claude-code-request-class: subagent | blocking-subagent | main, plus thex-claude-1p-request-classtwin): protocol, not prose.What changed
claudeSubagentAgentId: a CHANNEL-HEADER layer above the text signals —x-claude-code-request-class(falling back to thex-claude-1p-request-classtwin)subagent/blocking-subagent→ split onagentId ?? parentId,main→ main session, absent or unrecognized value → fall through to the text rules below. The header keeps the split alive if the banner is ever reworded, and an explicitmainshort-circuits before any system text is read. Trust note: the headers are client-controlled in proxy mode, but the key they shape is namespaced by the sender's own session id — a spoofed class can only fragment the sender's own traffic (same trust class asx-claude-code-session-iditself).claudeSubagentAgentId: skips the exact SDK harness banner (CLAUDE_SDK_HARNESS_BANNER) before the main-prefix scan — it is shared harness state present on EVERY SDK turn (main and sub alike), so it carries no classification signal. Exact-prefix exclusion (not substring) means a reworded banner degrades back to pre-SDK serial behavior instead of mis-splitting a real main turn whose text merely mentions the phrase. Adds"You are an agent working with the user toward their goals"(the SDK main-session marker) toMAIN_SYSTEM_PREFIXES; keeps"You are Claude Code"for interactive CLI sessions.anthropicFirstUserFrag: strips leading<system-reminder>…</system-reminder>blocks before the 1024-char cap; ADVANCES past user messages that are reminders-only (no run-distinguishing material survives stripping) to the next user message that has material; falls back to the raw text of the FIRST reminders-only message only when nothing later has material either. Reminder-strip output is stripped-only; the fallback moved into the caller.anthropicLaterUserFrag+ resolver collision-widening (Claude Code sub-agents are getting a lot of cache misses, but the main session is fine. | Claudecode 子代理大量 miss 缓存,主会话没事 #6011): skips the first user message with extractable text (its material feeds the base fragment) and joins up to 4 LATER user messages, each reminder-stripped and capped at 512 chars — CC grows early shared messages by tail append past the cap, which keeps a settled lane's key byte-stable.resolveSessionOrdergains a trailinglaneWideDiscriminatorparam (source-compatible; only the claude-anthropic call site passes it). In the derived-persona fork branch: when a non-empty wide discriminator rides the request AND an occupant skeleton already sits under the base fork key that the incoming does NOT continue — neither a strict prefix EXTENSION (growth / equal retry) nor a fragment-verified TAIL continuation (native compaction / head truncation keep the living tail verbatim — the exact mirror of the existing tag-less re-anchor rung) — the key widens to a fourth segment<base>:<fp16(wide)>: the incoming records under its OWN widened key and the occupant's skeleton survives untouched.Behavior change (old → new)
x-claude-code-request-class/x-claude-1p-request-classare now classified by that declaration —mainstays on the main lane even with an agent-id header and subagent-shaped system text (previously decided by the text scan);subagent/blocking-subagentsplit even when the banner is reworded (previously collapsed onto the main lane). Requests WITHOUT these headers are byte-identical to before.<id>|sub:<agent-id>(previously rode the parent lane).-p/ legacy subagent shapes are byte-unchanged.anthropicFirstUserFragvalues change for reminder-prefixed AND reminders-only-first-message inputs → affected derived-persona lanes rename once on upgrade (cold start on the new lane, no data loss); reminder-free output with a non-boilerplate first message is byte-identical to before.Verification
npm run typecheckclean.tests/claude-subagent-split.test.ts,tests/issue4352-claude-anthropic-subagent-split.test.ts(26 tests incl. the new Claude Code sub-agents are getting a lot of cache misses, but the main session is fine. | Claudecode 子代理大量 miss 缓存,主会话没事 #6011 rows) plus all nine other resolver-consumer suites (79 tests) — full suite via CI.Fixes #5724