Skip to content

[PR] fix: split header-less claude code subagents onto their own session lane (#4352) - #4774

Merged
ranxianglei merged 8 commits into
masterfrom
2026-10-26_claude-anthropic-subagent-split
Oct 28, 2026
Merged

ranxianglei merged 8 commits into
masterfrom
2026-10-26_claude-anthropic-subagent-split

Conversation

@ranxianglei

Copy link
Copy Markdown
Owner

Re-applies the fix from unmerged PR #4409 onto current master. It was closed by a stale-ticket bot that misattributed the closure to #4337 (pi incremental ack + storage drift fallback), which does not touch this path. Verified on master bb7c2497 / v0.1.208 that the #4409 code (personaOrderKeyed, claudeAnthropicPersonaOrderApplies) is absent from src/ and tests/ — the bug is live.

What / why

Claude Code builds that stamp no agent-id headers (VS Code extension, entrypoint claude-vscode) send subagent model requests under the PARENT session id. Their short, unrelated histories ride the parent session and destroy its fold substrate: fold-reconcile sees covered ids missing, confirms epoch destruction, and the model's compress calls die as substrate-destruction with refs recorded DEAD forever. The parent conversation is intact — no compaction ever happened.

The #975 two-signal gate cannot see these subagents: in the live transcripts (#4352 comment; extension 2.1.307) the parent and ALL subagents send the SAME first system block verbatim ("You are Claude Code, …Claude Agent SDK."), so the main-prefix negative check fails even when the agent-id headers ARE present. Separation must come from order+tag evidence, not prefix heuristics.

Fix

Route claude anthropic-wire traffic through the continuity-aware order resolver (#2944/#2241 — the same one dsh / codex / claude-over-Responses already use) whenever the #975 gate misses:

Behavior change (old → new)

  • Before: any claude request on the anthropic wire that missed the fix: split Claude Code subagent sessions so they stop queueing on the main session lock (#970) #975 two-signal gate keyed VERBATIM under the parent session id — including subagent rides. That is what destroyed the fold substrate.
  • After: those requests resolve through the order resolver. For a normal single-persona conversation the resolved id is IDENTICAL to before (raw id) — observable behavior unchanged. Only history-disjoint rides under a DIFFERENT full system text move, onto their own |sub:<fp> lane.
  • Consequences: the system prompt changed (11170 → 3044) → drop → epoch → substrate-destruction chain stops firing during subagent runs; the model's compress on parent ranges stays anchorable; refs are no longer recorded DEAD.
  • claude sessions now also get an order-skeleton record (persisted, Compression fails in long sessions while new sessions work fine | 压缩失败.新会话反而没事 #3397 mechanism) — a small per-session storage addition, identical to every other resolver-routed lane today.

Config surface

NO new field. The existing subagentSplit (BILI_SUBAGENT_SPLIT) semantics are EXTENDED: false now also disables the header-less order-resolver fallback (previously it only disabled the #975 header-pair split). Default stays ON. Rationale for not inventing a second knob: the two paths are one mechanism family ("keep claude subagent traffic off the parent session"), one escape hatch is enough. Docs updated in CONFIGURATION.md + CONFIGURATION.zh-CN.md.

Both-modes reasoning

Session-keying only — no wire rewrite, no tool/nudge/summary-carrier change. Plugin mode (any x-bili-plugin host) is untouched: the new branch fires only when the winning conversation source IS the claude header, which plugin lanes never are (they stamp x-bili-plugin-conversation, first in the source precedence). Proxy-mode claude native traffic (the affected one) runs the standard server-side compression pipeline; the forked subagent lanes simply run it under their own session state.

Regression review (existing behaviors walked)

  1. fix: split Claude Code subagent sessions so they stop queueing on the main session lock (#970) #975 header-pair split (CLI builds) — untouched: first branch of the anthropic identity ternary, identical behavior; pinned by tests/claude-subagent-split.test.ts (green).
  2. Non-claude anthropic clients (generic x-acp-session etc.) — verbatim identity preserved; negative e2e row in the new suite.
  3. dsh persona lane — separate ternary branch, unchanged; dsh-persona-fingerprint + dsh-persona-continuity green.
  4. Order-resolver corpus — the resolver itself is UNCHANGED, one call site added; issue2944-neutral-skeleton green.
  5. Lane-decisions registry discipline — lane-decisions-matrix + lane-decisions-b-class green; the new flag rides the EXISTING claude entry, no new name-literal comparison outside the registry.
  6. sideRequestLike passthrough (标题生成等侧请求污染主会话状态:prepareAnthropic 缺 isTitleGen 守卫、快照无条件覆盖、survivedCount 每请求空转 #388/dsh 0.2.1 Alpha.2更新了检查适配情况 #2503) — exemption row in the new suite.
  7. Wire fidelity — no payload rewrite anywhere in this diff (identity computation only).
  8. Prefix cache — parent outbound bytes are byte-identical; forked subagent lanes start their own cache lineage (intended — they were previously corrupting the parent's).

Tests

Targeted local runs (full-suite verdict = remote CI on the pushed head):

  • NEW tests/issue4352-claude-anthropic-subagent-split.test.ts: 8/8 — gate allowlist rows (positive+negative), resolver rows incl. the LIVE VS Code shared-first-block field shape captured in the issue comment, e2e through a real server (fork + parent object untouched + opt-out + side/empty-system exemptions).
  • Adjacent identity/lane suites (claude-subagent-split, dsh-persona-fingerprint, dsh-persona-continuity, issue2601-model-drift-absorption, issue2601-persona-fork-lineage, issue2817-crosswire-persona-fold, issue2944-neutral-skeleton, issue3397-persona-restart-stability, lane-decisions-matrix, lane-decisions-b-class, persona-fork-active-parent-guard): 156/156.
  • npm run typecheck clean.

No kernel/ changes. No config-schema or persistence-format change. Touches identity/session-binding logic → human review per §7.4.

Closes #4769 (re-report of #4352). Related: #4409 (the original fix, closed unmerged), #4580 (MCP-side binding, separate mechanism).

…ane (#4352)

Claude Code builds that stamp no agent-id headers (VS Code extension) send
subagent model requests under the parent session id. Their short, unrelated
histories ride the parent session and destroy its fold substrate: fold-reconcile
sees covered ids missing, confirms epoch destruction, and the model's compress
calls die as substrate-destruction with refs recorded DEAD.

The #975 two-signal gate cannot see these subagents: VS Code builds share the
parent's first system block verbatim, so the main-prefix negative check fails
even when the agent-id headers are present.

Route claude anthropic-wire traffic (x-claude-code-session-id source, evidence
allowlist in the lane-decisions registry) through the continuity-aware order
resolver when the #975 gate misses: a continuing main conversation keeps the raw
id on order+content evidence; a history-disjoint ride forks onto its own |sub:<fp>
lane (own lock chain, own compression state); a byte-drifted system on continuing
history still keeps the raw id (#1106). Gated by the existing subagentSplit knob
(no new config surface); side calls and empty-system requests stay verbatim.

Re-applies the fix from unmerged PR #4409 (closed by a stale-ticket bot that
misattributed the closure to #4337, which does not touch this path) onto current
master. Closes #4769 (re-report of #4352).

Tests: tests/issue4352-claude-anthropic-subagent-split.test.ts — both gate
directions plus the live VS Code field shape captured in the issue comment.
Docs: CONFIGURATION.md/.zh-CN.md subagentSplit rows describe both paths.
@ranxianglei ranxianglei changed the title fix: split header-less claude code subagents onto their own session lane (#4352) [PR] fix: split header-less claude code subagents onto their own session lane (#4352) Oct 25, 2026
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

查重:不重复。同机制条目只有 #4409(同标题,被 stale-ticket bot 误关未合并,误归因于不碰此路径的 #4337);本 PR 是它在当前 master(base bb7c2497 = master HEAD)上的重做,单 commit 20ebd2e62。无其他在途 PR 覆盖同一机制。相关:#4769(re-report,本 PR Closes)、#4352(原始报告,误关)、#4580(MCP 侧绑定,不同机制,不在本 PR 范围)。

标签:bug / claude-code / scope/wiring / p1 —— 用 subagent 即永久毁掉父会话折叠基底(refs 记 DEAD 不可恢复)的缺陷;Claude Code native 车道;请求管道内会话路由;核心承诺失灵。

初判状态(独立审核进行中,结构化结论随后补):

  • 分支核对:基于当前 master bb7c2497,单 commit,8 文件 +439/−36,mergeable=true(无冲突)。独立核验 personaOrderKeyed / claudeAnthropicPersonaOrderApplies 在 master 与 v0.1.208 的 src/、tests/ 中均不存在——bug 确实存活。
  • CI:head 20ebd2e62 的 23 个 check runs 截至此刻全部 queued/pending,出结果后跟踪。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

PR 审核结论(独立审核,非引用 issue 侧分析)

本地证据(worktree @ 20ebd2e,vs master bb7c249):npm run typecheck 干净;定向套件全绿——新增 tests/issue4352-claude-anthropic-subagent-split.test.ts + claude-subagent-split + dsh-persona-fingerprint + dsh-persona-continuity + issue2944-neutral-skeleton + lane-decisions-matrix + lane-decisions-b-class + issue3686-pi-codex-ua-host-policy + responses-instructions-drift,合计 152 pass / 0 fail。远程 CI 在写本评论时 20 个 run 仍 queued(10 个为旧 run 的 cancelled),全量判定以 CI 为准,后续跟进。

结构化八问

  1. 是什么问题:VS Code 版 Claude Code 的 subagent 请求不带 agent-id 头、且与父会话逐字共享第一个 system block,导致 fix: split Claude Code subagent sessions so they stop queueing on the main session lock (#970) #975 双信号门必然不命中;这些短历史借道流量全部骑在父会话 id 上,把父会话已折叠的 3289 个 covered id 判成「substrate destroyed」,zombie fold reap 三连后 refs 永久 DEAD。
  2. 什么原因导致的:会话身份路由层——无头 claude code anthropic 流量走 verbatim 身份(src/server/handle.ts anthropic 分支的兜底),没有任何机制把「历史不相交的借道者」分叉出去。根因在身份判定,不在折叠引擎。
  3. 影响范围与严重程度:所有走 bili 代理、用 VS Code 扩展版 Claude Code 且触发 Agent 工具的用户——父会话压缩状态被反复摧毁,refs 永久失效,体验毁灭级。p1。
  4. 怎么修复的:把该流量接入既有的顺序优先会话解析器(personaConversationOrder,会话身份:顺序+自铸id 为认领主判,hash 降级为防漂移护栏(通用规则,取代 persona-fp 阶梯) #2944 v2,与 dsh/responses 车道同一套机制):历史连续的主会话按 order+content 证据留在原 key;历史不相交的借道分叉到自己的 <id>|sub:<fp> 车道。新门是 evidence-permitlist(claudeAnthropicPersonaOrderApplies,仅 x-claude-code-session-id 会话源命中),不是全局放开。
  5. 是否有回归问题:无。既有行为逐项清点(均实测或结构性验证):
  6. 是否破坏缓存:否。父会话身份字节稳定、出站不重写任何字节,前缀缓存不受影响;分叉出去的 subagent 车道获得独立压缩状态(这正是修复目的);重试/去重/游标策略不涉及。
  7. 是否改了设计方向:否。没有新机制——是把既有顺序优先解析器(会话身份:顺序+自铸id 为认领主判,hash 降级为防漂移护栏(通用规则,取代 persona-fp 阶梯) #2944,owner 规则「顺序为中心」)接到一个此前漏掉的入口,与 dsh/openai/google/responses 各线的既有接线完全同构。
  8. 是否引入了新的配置:无新配置项。但有一处既有开关语义扩展,必须披露:subagentSplit / BILI_SUBAGENT_SPLIT=0 原来只关闭 agent-id 头对拆分,现在同时关闭新的无头回退路径(PR 正文与 CONFIGURATION.md 中英均已写明「disable BOTH」)。默认值不变(true),默认行为的变化即本修复本身。

测试有效性

8 个测试、正负双向齐全(符合 #3617 门禁纪律):allowlist 谓词单测(含 dsh/plugin 负行)、resolver 行级表(claim/fork/同车道复用/异 system 异车道/字节漂移 reanchor//compact 头重写)、现场形状钉死(共享首 block 仍分叉、burst 后父会话回原 key)、真实 startServer+mock SSE 的 e2e(父会话对象同一性 + stats 计数断言,有牙)、opt-out 行、豁免行。断言针对的是会话身份与计数,不是 HTTP 状态码恒真。

diff 整洁度

8 文件 +439/−36,每一行都服务于本 PR 目的;文档中英同步;无空行/重排噪音;无锁文件/生成物。干净。

判定

可合并——等 CI 在 head 20ebd2e 上转绿即可(当前 queued)。按 §7.4,会话身份绑定逻辑属 must-stay-human,合并请 owner 操作:#4774

@github-actions

github-actions Bot commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

📦 Built Package Artifact

Branch: 2026-10-26_claude-anthropic-subagent-split (9a4891f)

Latest build — install this exact version

npm install -g billion-context@0.0.6521-pr.4774.c13ae5d

This exact version is immutable and reproducible. The rolling pr tag tracks the newest test build across all PRs.

Recent builds (commit → version)

commit version build
9a4891f billion-context@0.0.6521-pr.4774.c13ae5d build
3a21dd9 billion-context@0.0.6517-pr.4774.b3dbf05 build
8c77cbc billion-context@0.0.6144-pr.4774.8f8690b build
e74de1c billion-context@0.0.6059-pr.4774.3e076c4 build
e2a9910 billion-context@0.0.5943-pr.4774.ad6a6fd build
20ebd2e billion-context@0.0.5852-pr.4774.5c2cf7f build

Download artifact

  1. Download the artifact from the Actions run
  2. Extract the tarball and install:
tar xzf billion-context-pr4774.tgz
npm install -g package

Install instructions are refreshed on each push.

@ranxianglei

Copy link
Copy Markdown
Owner Author

评审结论(先修第一批 · 自动评审)

1. 这是啥问题? Claude Code(尤其 VS Code 构建)的子代理不带 agent-id 头,所有模型请求共用一个会话 id —— 子代理的短历史混进主会话,轻则父会话被错误回收、压缩永久拒绝,重则子代理请求 400。

2. 根本原因是啥? src/server/handle.ts:1095-1107 的车道决策阶梯里,无头子代理既进不了 claudeSubagentSplit(#970 两信号门)也进不了 dsh persona 门,落到 verbatim raw id;claudeSubagentAgentId(src/session-id.ts:442)对无头请求恒 miss。

3. 如何解决的? 核心 commit 20ebd2e6:把会话来源头为 x-claude-code-session-id 的流量接入既有顺序优先解析器 personaConversationOrder —— 历史不连续的子代理 fork 到 |sub:<fp16(system)> 自有车道,连续的主会话凭 order+content 证据留原 key。机制与 dsh 车道同构,测试正负双向齐全(新增 8 例,本地干净 worktree 复跑 8/8 绿)。

4. 是否能合并? 暂不可合,需补两件事后可合:

5. URL:PR #4774;关联 #4769 / #4862 / #4580 / #4352。

合并后注意:#4774 落地会让 VS Code 子代理的 MCP 调用暴露 #4580 形态(此前共享会话碰巧落对),建议 #4978 与本 PR 同批发。

…ke veto (#2170)

The header-less claude-code persona fork landed in src/server/handle.ts's
anthropic ladder with a fresh !sideRequestLike conjunct. Per the #2170
lane-guard discipline a lane-symbol edit in handle.ts must land with a
dedicated lane-suite pin. Row (K) is that pin, contrast-shaped: the same
claude-code persona traffic with sideRequestLike=true (tiny tool-less
budget, no agent header) stays verbatim on the raw key — counted nowhere,
no persisted |sub ghost — while the full-budget shape rides the order
resolver and forks its own |sub:<fp> lane.
@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b) Merge-guard sync done: merged origin/master into 2026-10-26_claude-anthropic-subagent-split with zero conflicts, pushed head 3a21dd9f9; local typecheck + build + targeted tests/issue4352-claude-anthropic-subagent-split.test.ts (8/8) all green, CI re-running on the new head (no failures so far).

ework-agent added 2 commits October 27, 2026 23:54
…nthropic-subagent-split

# Conflicts:
#	tests/side-lane-invariants.test.ts
…gent-split' into 2026-10-26_claude-anthropic-subagent-split
@ranxianglei

Copy link
Copy Markdown
Owner Author

补齐评审提出的两个阻塞项(9a4891f4):

  1. lane-guard 红灯:新增 tests/side-lane-invariants.test.ts 行 (L) —— 对比式 pin 住 handle.ts 里新的 !sideRequestLike 合取:同一 claude-code persona 流量,小预算无工具的 side 形状留在 raw key(不计数、不产生 |sub 幽灵),全预算形状走 order resolver 分叉出自己的 |sub:<fp> 车道。本地 14/14 绿。
  2. 分支落后:已与 origin/master 双向合并(含 [PR] chore: sync master version to 0.1.208 (unblock one-click release drift guard, run 40520077248) #4980 版本同步、[PR] fix(#4894): arm the direct-fallback oversize guard on dsh not-ready sends #4904 direct-window-guard),typecheck 通过,issue4352 套件 8/8 + side-lane-invariants 14/14 复跑全绿。

CI 已在新 head 重跑,等全量矩阵结果。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b) 独立复核确认:head 9a4891f4d 与 master 零落后;本地复跑 tests/side-lane-invariants.test.ts 14/14 + tests/issue4352-claude-anthropic-subagent-split.test.ts 8/8 全绿;镜像缓存显示 CI 当前 0 失败(7 success / 17 运行中)。两个阻塞项均已闭合,等矩阵跑完即可合并。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

CI 判定(head 9a4891f4d):全绿 —— 26 success / 1 skipped-by-design / 0 fail。本轮唯一红腿 test (windows-latest, 22, 2) 判定为时序 flake,已触发失败 job 重跑并通过;分支侧未做任何代码改动。

八问:

  1. 是什么问题:windows/node22 分片 2 的 2584 个用例中仅 1 个失败——abort x proxy-openai-sse: client abort mid-stream destroys the upstream request(tests/wire-exit-matrix.test.ts:220),断言 upstream socket(s) must be destroyed after the client abort (closed=0)。
  2. 什么原因导致的:该用例在客户端断开后轮询至多 3 秒(30×100ms)等待上游 socket 的 close 事件,这次事件 3 秒内没到(用例总耗时 3603ms,恰好耗尽轮询预算)——Windows runner 调度延迟,不是断开传播机制坏了。证据:同文件三个兄弟 cell(anthropic-sse 135ms / responses-sse 112ms / proxy-json 411ms)在同一 runner 同一时刻全过;测试自身注释写明「slow runners destroy the upstream socket later」,此前已从固定 300ms 放宽到 3 秒轮询,本次连 3 秒也不够。
  3. 影响范围与严重程度:无用户侧影响——CI 时序窗口问题,非产品行为。PR diff 与该路径零交集(该请求走 headerless 匿名车道,claudeAnthropicPersonaOrderApplies 短路 false,断开传播逻辑零改动);当前树本地 tests/wire-exit-matrix.test.ts 7/7 全绿(含 CI 转红的 cell)。
  4. 怎么修复的:无需代码修复。按 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 floor 343 先例触发 rerun-failed-jobs(HTTP 201),重跑通过、整个 run 转绿。若同签名在干净 runner 复发再按在档口径升档(届时考虑独立小修放宽轮询预算,不混进本 PR)。
  5. 是否有回归问题:无。master 9b6ec2345 全绿(哨兵结案报告 CI Control Center: Centralized CI Failure Handling & Status Sync (Comment all CI issues here; do not open new issues) | CI 总控: CI 失败集中处理与状态同步(所有 CI 问题在此评论, 勿开新 issue) #4599 floor 347)、ci-fixes ≡ master,无继承红;上轮红的两条门禁(kernel-guard / lane-guard)在本 head 均已绿(kernel-guard 因分支已同步 master、diff 窗内无 kernel 变更;lance-guard 的 Subagent requests share the parent session id and trip fold-reconcile #4352 侧门控 pin 已在 side-lane-invariants 落地,本地 14/14)。本 PR 自身定向套件 8/8 绿。
  6. 是否破坏缓存:不涉及。
  7. 是否改了设计方向:没有。
  8. 是否引入了新的配置:没有。

状态已报 #4599。PR 检查矩阵全绿,ready for human merge(head 9a4891f4d)。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

评审列的两项前置在当前 head(9a4891f4d)上均已满足——评审应基于同步前的分支状态:

① lane-guard 红灯 → 已修且绿。 commit 5c6d37f1b 已在 tests/side-lane-invariants.test.ts:466 补上正负 pin 行 (L) #4352 anthropic persona gate is side-vetoed(side shape 保持 verbatim / full-budget shape fork,对比形),head 9a4891f4d 的 CI lane-guard = success(该门禁自己定义了充分性)。

② 分支落后 master → 已同步,全量 lanes 已真跑。 分支已 merge master(commit 2cc19441d),当前 base = master tip 9b6ec2345(0 behind / 8 ahead,#4778 等后续变更全部在内);kernel-guard 的 lockfile 漂移按你预判自愈。head 9a4891f4d 全量 CI:26 success / 1 skipped-by-design / 0 fail——11 个 test 分片全部在 PR head 上真跑并绿(其中 windows 分片一次时序 flake 已重跑通过,分账见 #4599)。

覆盖结论(#4769 全覆盖 / #4352 覆盖 / #4862 部分 / #4580 正交→#4978)无异议。两个跟进:

  1. [Bug][claude] 0.1.207: subagent requests fail with 400 "tool_use ids were found without tool_result blocks" right after a fold in the parent session #4862 残留缺口(invariant judge 放行断配对的 tool_use/tool_result):已按「同症状同 issue」记入 [Bug][claude] 0.1.207: subagent requests fail with 400 "tool_use ids were found without tool_result blocks" right after a fold in the parent session #4862 的子缺陷清单;我开一个独立小 PR 补 judge 的出站配对检查,就绪后回链。
  2. [PR] Task sub-agent bili calls are no longer compressed into the parent session (#4580) | Task 子代理的 bili 调用不再压缩到父会话 (#4580) #4978 同批发:同意——[PR] fix: split header-less claude code subagents onto their own session lane (#4352) #4774 落地后 VS Code 子代理的 MCP 调用会暴露 [bug] Claude Code Task subagents: bili MCP tools run against the root session (process-wide CLAUDE_CODE_SESSION_ID) → 409 witness conflicts, phantom range errors, and a subagent fold applied to the parent | Claude Code 子代理的 MCP 压缩落到父会话 #4580 形态,建议 [PR] Task sub-agent bili calls are no longer compressed into the parent session (#4580) | Task 子代理的 bili 调用不再压缩到父会话 (#4580) #4978 与本 PR 同批合并。

判定:PR 检查矩阵全绿(head 9a4891f4d),ready for human merge。

@ranxianglei

Copy link
Copy Markdown
Owner Author

🤖 Powered by ework · qwen3.8-27b

(ai: vllm-qwen/qwen3.8-27b)

上一条回复里承诺的 #4862 残留缺口跟进已就绪:PR #5003(invariant judge 新增 I3 出口配对检查——出站拆断的 tool_use/tool_result 配对在 egress 前即被 warn 级违规捕获;归因门防客户端自带孤儿误报;纯 advisory、无配置面)。子缺陷清单已记入 #4862。本 PR 不受其影响,可独立合并;若按「#4978 同批发」建议排批,#5003 也可一并纳入。

ranxianglei pushed a commit that referenced this pull request Oct 27, 2026
Unblocks PR #5004's test (windows-latest, 22, 2) red on head da25207:
three abort cells (proxy-openai-sse / proxy-responses-sse / proxy-json)
asserted closed=0 after exhausting the flat 3s (30x100ms) poll on a
loaded Windows runner -- the same signature already recorded under #4599
for #4982/#4774/#4683 (rerun green / in-branch budget bump). Sibling
cell abort x proxy-anthropic-sse passed in 176ms on the same shard and
every other windows/ubuntu shard ran this file green on the same head,
so this is runner load, not a code regression; the PR's diff touches
none of these paths.

Labeled CI-unblock commit; duplicates #4683's pending identical change --
drop this commit when rebasing if #4683 lands first.
@ranxianglei
ranxianglei merged commit 1a2f5b8 into master Oct 28, 2026
77 of 78 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

📦 Merged Build Published

This merge to master was published as 0.0.889-master.1a2f5b8 (rolling master tag).

npm install -g billion-context@0.0.889-master.1a2f5b8  # this exact build
npm install -g billion-context@master  # always the newest merged build

npm view billion-context@master prints the current version at any time.

ranxianglei pushed a commit that referenced this pull request Oct 31, 2026
…aw session id (#5136)

Claude Code CLI fires its session-title call ~1ms ahead of the first main
turn under the SAME x-claude-code-session-id. Since #4774 (v0.1.209) that
header-less traffic rides the persona order resolver, and the title call —
own system prompt, single <session>-wrapped user blob, no tools, budget
past the <=200 heuristic — claimed the raw id as kernel anchor on the
virgin id; the main turn then arrived tagChanged and history-disjoint and
forked onto a |sub:<fp> lane for the session lifetime (#2156 form: side
requests must never claim the anchor).

New shape predicate isClaudeCodeTitleRequest in src/server/side-request.ts
(no-tools veto + exactly one user entry whose text starts with the
<session> wrapper), wired into both lane gates in handle.ts behind the
claude-code conversation-source evidence gate: sideRequestLike keeps it off
the resolver (verbatim iding) and sideIntent routes it through the #388
passthrough (kernel state untouched). Precedents: #2503 dsh title, #4438
dsh auto-review.

Tests: tests/issue5136-claude-title-sidecar.test.ts (predicate truth table
+ live race in both arrival orders + client-evidence negative; verified to
fail against the pre-fix wiring) and row (M) in tests/side-lane-invariants.test.ts
(#2170 lane-guard pairing).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

1 participant