Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -650,7 +650,7 @@ client already supplied (e.g. a body `session_id` is forwarded upstream as

### Derived (child) sessions inherit the parent's compressed context (#1333, #1362)

A child session (subagent/fork starting from an empty history) reports its lineage at birth — its identity registration carries `parentConversationId` and the proxy records a read-only `derivedFrom` link — so `decompress` / `search_context` fall back along the parent chain for content the child never saw itself (cycle-guarded, depth cap 8). Nothing is copied into the child, the parent is never modified; if the parent is unknown the child simply starts fresh. Per-lane parent signals (pi/omp `parentSession` header, OpenCode V1/V2 `parentID`): [docs/session-identity.md](docs/session-identity.md#derived-child-sessions-lineage-at-birth-1333-1362). claude/codex/dsh need nothing here: they share one session id across subagents or have no child-session concept at all.
A child session (subagent/fork starting from an empty history) reports its lineage at birth — its identity registration carries `parentConversationId` and the proxy records a read-only `derivedFrom` link — so `decompress` / `search_context` fall back along the parent chain for content the child never saw itself (cycle-guarded, depth cap 8). Nothing is copied into the child, the parent is never modified; if the parent is unknown the child simply starts fresh. Per-lane parent signals (pi/omp `parentSession` header, OpenCode V1/V2 `parentID`): [docs/session-identity.md](docs/session-identity.md#derived-child-sessions-lineage-at-birth-1333-1362). claude/codex need nothing here: their subagents stamp the main session id too (the proxy separates those lanes by other signals). dsh mints a fresh session id per subagent spawn (verified against deepseek-harness @ 0.2.2-alpha.3, #5630), so its child conversations are already isolated by id.

### Running multiple instances (#3633)

Expand Down
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ bili --no-auto-update # 本次启动禁用自动更新

### 派生(子)会话继承父会话的压缩上下文(#1333、#1362)

当 agent 派生子会话(subagent 或 fork,从空历史起步、不重发父会话内容)时,它会在出生时上报这条血缘:身份注册携带父会话 id(`parentConversationId`),代理在子会话上记录一条只读链接(`derivedFrom`)。此后 `decompress` / `search_context` 对子会话自己从未见过的内容沿父链回退(带环检测、深度上限 8);任何东西都不复制进子会话,父会话也绝不被修改;父会话未知时子会话就按全新起步。各 lane 的父信号(pi/omp `parentSession` header、OpenCode V1/V2 `parentID`):[docs/session-identity.zh-CN.md](docs/session-identity.zh-CN.md#派生子会话出生时携带血统1333-1362)。claude/codex/dsh 在这里不需要任何信号:它们的子 agent 共享同一个会话 id,或根本没有子会话概念。
当 agent 派生子会话(subagent 或 fork,从空历史起步、不重发父会话内容)时,它会在出生时上报这条血缘:身份注册携带父会话 id(`parentConversationId`),代理在子会话上记录一条只读链接(`derivedFrom`)。此后 `decompress` / `search_context` 对子会话自己从未见过的内容沿父链回退(带环检测、深度上限 8);任何东西都不复制进子会话,父会话也绝不被修改;父会话未知时子会话就按全新起步。各 lane 的父信号(pi/omp `parentSession` header、OpenCode V1/V2 `parentID`):[docs/session-identity.zh-CN.md](docs/session-identity.zh-CN.md#派生子会话出生时携带血统1333-1362)。claude/codex 在这里不需要任何信号:它们的子 agent 也打主会话的 id(代理用其他信号分隔这些车道)。dsh 每次 spawn 子代理都铸一个新的会话 id(已对照 deepseek-harness @ 0.2.2-alpha.3 源码核实,#5630),其子会话天然按 id 隔离。

### Windows:把会话目录加入杀软排除项(#362)

Expand Down
6 changes: 4 additions & 2 deletions docs/session-identity.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,10 @@ From then on:
| **OpenCode V1** (native plugin) | SDK session info `parentID` (resolved once per session, cached) |
| **OpenCode V2** (native plugin) | `session.created` event `data.parentID` |

claude/codex/dsh need nothing here: they share one session id across
subagents or have no child-session concept at all.
claude/codex need nothing here: their subagents stamp the main session id
too (the proxy separates those lanes by other signals). dsh mints a fresh
session id per subagent spawn (verified against deepseek-harness @
0.2.2-alpha.3, #5630), so its child conversations are already isolated by id.

## Future direction

Expand Down
2 changes: 1 addition & 1 deletion docs/session-identity.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@
| **OpenCode V1**(原生插件) | SDK session info 的 `parentID`(每会话解析一次并缓存) |
| **OpenCode V2**(原生插件) | `session.created` 事件的 `data.parentID` |

claude/codex/dsh 在这里不需要任何信号:它们的 subagent 共享同一个会话 id,或根本没有子会话概念。
claude/codex 在这里不需要任何信号:它们的子 agent 也打主会话的 id(代理用其他信号分隔这些车道)。dsh 每次 spawn 子代理都铸一个新的会话 id(已对照 deepseek-harness @ 0.2.2-alpha.3 源码核实,#5630),其子会话天然按 id 隔离。

## 未来方向

Expand Down
Loading