diff --git a/.agents/notes/implemented/feature/2026-08-24-user-authorized-subagent-model-routes.i18n.yaml b/.agents/notes/implemented/feature/2026-08-24-user-authorized-subagent-model-routes.i18n.yaml
index 08799efa2b..89ab6c1bb3 100644
--- a/.agents/notes/implemented/feature/2026-08-24-user-authorized-subagent-model-routes.i18n.yaml
+++ b/.agents/notes/implemented/feature/2026-08-24-user-authorized-subagent-model-routes.i18n.yaml
@@ -9,14 +9,14 @@
en: 3238dfb7db7dfdd8
zh: ec3bdd9a9da0a321
/agent-note-user-authorized-subagent-model-routes/decision:
- en: 78824ae164ea974e
- zh: 84aa7740d9790563
+ en: 4b6730a902045996
+ zh: b24d2e120d6c7651
/agent-note-user-authorized-subagent-model-routes/alternatives-considered:
en: e41c17226190ea8b
zh: d3b1395fafe75f01
/agent-note-user-authorized-subagent-model-routes/consequences:
- en: 77677b5828d0de29
- zh: 609109e3388933a9
+ en: 3cfea2d6dd23a965
+ zh: 506b6f3d5b929ebf
/agent-note-user-authorized-subagent-model-routes/related-decisions:
en: 0eead87ec1172d81
zh: 4e776a583f5a00a5
diff --git a/.agents/notes/implemented/feature/2026-08-24-user-authorized-subagent-model-routes.md b/.agents/notes/implemented/feature/2026-08-24-user-authorized-subagent-model-routes.md
index 8113ddef6b..fe8fcdba20 100644
--- a/.agents/notes/implemented/feature/2026-08-24-user-authorized-subagent-model-routes.md
+++ b/.agents/notes/implemented/feature/2026-08-24-user-authorized-subagent-model-routes.md
@@ -16,7 +16,7 @@ The Host settings service snapshots the route list for each fresh top-level Sess
The fixed `list_subagent_models` schema does not enumerate the policy. At call time, it lists authorized registered providers and intersects their advertised model catalogs with the recorded route list. Exact lookup requires authorization before resolving model metadata and all supported reasoning efforts, including for ids absent from the catalog. Without a recorded policy, discovery resolves only the parent Agent’s current effective route, even if the catalog omits it. The delegation executor independently checks any explicit provider, model, or effort selection against the same authorization before adapter preflight. A call with no selection fields retains configured or inherited routing.
-Model selection has no unrestricted static mode. The default-off Host setting authorizes alternative child routes; without it, the parent route and its supported efforts remain selectable. Each delegation tool’s `modelSelection` option controls only its route fields. The independent `/list-models` plugin owns discovery. Web and Desktop presets mount discovery by default, enable spawn route fields, and leave fork route fields disabled to preserve inherited-prefix reuse; custom fork compositions may enable them under the same Session authorization. Tool installation does not sample or expand authorization.
+Model selection has no unrestricted static mode. The default-off Host setting authorizes alternative child routes; without it, the parent route and its supported efforts remain selectable. Each delegation tool’s `modelSelection` option controls only its route fields. The shared `tool-subagent-control` plugin owns discovery; both tool packages read the authorization projection owned by `dsh-subagent`. Web and Desktop presets mount discovery by default, enable spawn route fields, and leave fork route fields disabled to preserve inherited-prefix reuse; custom fork compositions may enable them under the same Session authorization. Tool installation does not sample or expand authorization.
## Alternatives considered
@@ -34,7 +34,7 @@ Model selection has no unrestricted static mode. The default-off Host setting au
- New adapter registrations and newly advertised models do not expand user authorization.
- Adapter removal or catalog lookup failure can make provider discovery unavailable without deleting the saved route decision; an allowed model remains usable when its adapter accepts it even if the advisory catalog omits it.
-- The allowlist itself consumes no parent-request tokens. Only a `list_subagent_models` result enters the transcript. The `modelSelection` option adds three route fields; `/list-models` adds a separate discovery schema. Shipped headless and SDK profiles carry neither.
+- The allowlist itself consumes no parent-request tokens. Only a `list_subagent_models` result enters the transcript. The `modelSelection` option adds three route fields; `tool-subagent-control` adds a fixed discovery schema, including in shipped headless and SDK profiles; those profiles keep route fields disabled.
- The policy event is log-only and is appended while an Agent is composed, before either SDK begins its run subscription. Shipped SDK profiles do not enable this Web-owned preference, so the event changes neither SDK's expected notifications or persisted-session output; package restore tests own its durable projection instead of fabricating an SDK composition solely to emit it.
- Unit coverage pins settings validation, malformed durable values, Session sampling and inheritance, shared definitions, parent-route defaults, discovery restrictions, executor denial, and the settings UI’s staged writes and revision checks. The assembled Web scenario pins the real settings document and Plugins card flow.
diff --git a/.agents/notes/implemented/feature/2026-08-24-user-authorized-subagent-model-routes.zh.md b/.agents/notes/implemented/feature/2026-08-24-user-authorized-subagent-model-routes.zh.md
index 6d33817449..23e8c9fe7c 100644
--- a/.agents/notes/implemented/feature/2026-08-24-user-authorized-subagent-model-routes.zh.md
+++ b/.agents/notes/implemented/feature/2026-08-24-user-authorized-subagent-model-routes.zh.md
@@ -16,7 +16,7 @@ Host 自有的 `subagent-model-selection` 设置 section 保存显式 `enabled`
固定的 `list_subagent_models` schema 不枚举策略。调用时,它列出已授权且已注册的提供方,并取其公布模型目录与已记录路由列表的交集。精确查询先要求授权,再解析模型元数据及全部支持的推理强度,也允许目录未列出的 ID。没有已记录策略时,发现只解析父 Agent 当前生效的路由,即使目录未列出它。委派执行器会在适配器预检前独立校验显式提供方、模型或强度选择是否符合相同授权。没有选择字段的调用保留配置或继承的路由。
-模型选择没有无限制的静态模式。默认关闭的 Host 设置授权其他子级路由;没有该授权时,仍可选择父级路由及其支持的强度。各委派工具的 `modelSelection` 选项只控制自身路由字段。独立的 `/list-models` 插件负责发现。Web 与 Desktop preset 默认挂载发现工具,启用 spawn 路由字段,并为 fork 保持关闭,以保留对继承前缀的复用;自定义 fork 组合可以在相同 Session 授权下启用这些字段。工具安装不采样或扩大授权。
+模型选择没有无限制的静态模式。默认关闭的 Host 设置授权其他子级路由;没有该授权时,仍可选择父级路由及其支持的强度。各委派工具的 `modelSelection` 选项只控制自身路由字段。共享的 `tool-subagent-control` 插件负责发现;两个工具包都读取 `dsh-subagent` 所有的授权投影。Web 与 Desktop preset 默认挂载发现工具,启用 spawn 路由字段,并为 fork 保持关闭,以保留对继承前缀的复用;自定义 fork 组合可以在相同 Session 授权下启用这些字段。工具安装不采样或扩大授权。
## Alternatives considered
@@ -34,7 +34,7 @@ Host 自有的 `subagent-model-selection` 设置 section 保存显式 `enabled`
- 新适配器注册和新公布模型不会扩大用户授权。
- 适配器移除或目录查询失败可能使提供方发现不可用,但不会删除已存路由决定;只要适配器接受某个获准模型,即使建议性目录省略它,该模型仍可使用。
-- 允许列表本身不消耗父级请求 token。只有 `list_subagent_models` 结果进入 transcript。`modelSelection` 选项增加三个路由字段;`/list-models` 增加独立发现 schema。随附 headless 与 SDK profile 两者都不携带。
+- 允许列表本身不消耗父级请求 token。只有 `list_subagent_models` 结果进入 transcript。`modelSelection` 选项增加三个路由字段;`tool-subagent-control` 增加固定发现 schema,随附 headless 与 SDK profile 也包含它;这些 profile 保持路由字段关闭。
- 策略事件仅存在于日志,并在 Agent 组合期间、两套 SDK 开始订阅运行前追加。随附 SDK profile 不启用这项 Web 自有偏好,因此该事件不会改变任一 SDK 的预期通知或持久 Session 输出;其持久投影由包级恢复测试负责,不会为了发出该事件而虚构 SDK 组合。
- 单元覆盖固定设置校验、异常持久值、Session 取样与继承、共享定义、父级路由默认值、发现限制、执行器拒绝,以及设置 UI 的暂存写入与 revision 检查。组装 Web 场景固定真实设置文档与 Plugins 设置卡流程。
diff --git a/apps/cli/composition.md b/apps/cli/composition.md
index 8b2cfb83ab..74af536762 100644
--- a/apps/cli/composition.md
+++ b/apps/cli/composition.md
@@ -146,8 +146,6 @@ flowchart LR
cfg --> plugin_dsh_base_subagent_fork_in_process
plugin_dsh_base_tool_subagent_control["tool-subagent-control
@deepseek-ai/dsh-tool-subagent-control"]
cfg --> plugin_dsh_base_tool_subagent_control
- plugin_dsh_base_tool_subagent_list_agents["tool-subagent-list-agents
@deepseek-ai/dsh-tool-subagent-control/list-agents"]
- cfg --> plugin_dsh_base_tool_subagent_list_agents
plugin_dsh_base_tool_subagent["tool-subagent
@deepseek-ai/dsh-tool-subagent"]
cfg --> plugin_dsh_base_tool_subagent
plugin_dsh_base_tool_subagent_fork["tool-subagent-fork
@deepseek-ai/dsh-tool-subagent"]
@@ -271,7 +269,6 @@ flowchart LR
| `subagent-spawn-in-process` | `@deepseek-ai/dsh-subagent-spawn-in-process` |
| `subagent-fork-in-process` | `@deepseek-ai/dsh-subagent-fork-in-process` |
| `tool-subagent-control` | `@deepseek-ai/dsh-tool-subagent-control` |
-| `tool-subagent-list-agents` | `@deepseek-ai/dsh-tool-subagent-control/list-agents` |
| `tool-subagent` | `@deepseek-ai/dsh-tool-subagent` |
| `tool-subagent-fork` | `@deepseek-ai/dsh-tool-subagent` |
| `ptc-runtime` | `@deepseek-ai/dsh-ptc-runtime-node` |
diff --git a/apps/cli/tests/profiles/headless/team-snapshot.patch.yml b/apps/cli/tests/profiles/headless/team-snapshot.patch.yml
index 290714194e..caa28fa54d 100644
--- a/apps/cli/tests/profiles/headless/team-snapshot.patch.yml
+++ b/apps/cli/tests/profiles/headless/team-snapshot.patch.yml
@@ -24,9 +24,6 @@
- id: tool-subagent-control
disabled: true
-- id: tool-subagent-list-agents
- disabled: true
-
- id: tool-subagent-report
disabled: true
diff --git a/apps/web/tests/agent-team-panel.overlay.yml b/apps/web/tests/agent-team-panel.overlay.yml
index ecca62985b..bdcf49e256 100644
--- a/apps/web/tests/agent-team-panel.overlay.yml
+++ b/apps/web/tests/agent-team-panel.overlay.yml
@@ -2,9 +2,6 @@
- id: tool-subagent-control
disabled: true
-- id: tool-subagent-list-agents
- disabled: true
-
- id: tool-subagent
disabled: true
diff --git a/apps/web/tests/expected/settings-chrome/plugin-instances.expected.md b/apps/web/tests/expected/settings-chrome/plugin-instances.expected.md
index 223f7ab367..7ed9dab306 100644
--- a/apps/web/tests/expected/settings-chrome/plugin-instances.expected.md
+++ b/apps/web/tests/expected/settings-chrome/plugin-instances.expected.md
@@ -4,14 +4,6 @@
- strong: 子智能体控制工具
- text: 让 AI 向子智能体发送消息或中断其运行。
- code: tool-subagent-control
- - listitem:
- - button "子智能体列表工具, tool-subagent-list-agents, 已启用":
- - strong: 子智能体列表工具
- - code: tool-subagent-list-agents
- - listitem:
- - button "子智能体模型查询工具, tool-subagent-list-models, 已启用":
- - strong: 子智能体模型查询工具
- - code: tool-subagent-list-models
- listitem:
- button "子智能体委派工具, tool-subagent, 已启用":
- strong: 子智能体委派工具
diff --git a/docs/config-catalog.md b/docs/config-catalog.md
index dff1d23f5c..7395340330 100644
--- a/docs/config-catalog.md
+++ b/docs/config-catalog.md
@@ -3325,7 +3325,7 @@ export type JournalMode = 'wal' | 'delete' | 'truncate' | 'persist'
- `inject`: `workingDirectory`
- `refs`: `Volatile` (`@deepseek-ai/cordis`)
-- `source`: [`packages/subagent/subagent/src/index.ts:186`](../packages/subagent/subagent/src/index.ts)
+- `source`: [`packages/subagent/subagent/src/index.ts:189`](../packages/subagent/subagent/src/index.ts)
```ts config-catalog
/** Host configuration for continuable subagent capacity. */
@@ -4663,7 +4663,7 @@ These load from a `cordis.yml` entry with no `config:` block; they declare no co
| `@deepseek-ai/dsh-tool-call-timeout-policy` | `tools` | [`packages/guard/timeout-policy/src/index.ts`](../packages/guard/timeout-policy/src/index.ts) |
| `@deepseek-ai/dsh-tool-cordis` | `tools` · `cordisInspect` | [`packages/extensions/tool-cordis/src/index.ts`](../packages/extensions/tool-cordis/src/index.ts) |
| `@deepseek-ai/dsh-tool-schedule` | `tools` | [`packages/schedule/tool-schedule/src/index.ts`](../packages/schedule/tool-schedule/src/index.ts) |
-| `@deepseek-ai/dsh-tool-subagent-control` | `tools` · `subagents` | [`packages/subagent/tool-subagent-control/src/index.ts`](../packages/subagent/tool-subagent-control/src/index.ts) |
+| `@deepseek-ai/dsh-tool-subagent-control` | `tools` · `subagents` · `agents` · `sessionProjections` | [`packages/subagent/tool-subagent-control/src/index.ts`](../packages/subagent/tool-subagent-control/src/index.ts) |
| `@deepseek-ai/dsh-tool-working-directory` | `tools` · `workingDirectory` | [`packages/session/tool-working-directory/src/index.ts`](../packages/session/tool-working-directory/src/index.ts) |
| `@deepseek-ai/dsh-user-questions` | — | [`packages/interaction/user-questions/src/index.ts`](../packages/interaction/user-questions/src/index.ts) |
| `@deepseek-ai/dsh-webhook` | `agents` · `agentDefaultModel` · `agentPresets` · `permissionPresets` · `sessionTitle` · `workspaceRegistry` | [`packages/experimental/webhook/src/index.ts`](../packages/experimental/webhook/src/index.ts) |
diff --git a/docs/config-catalog.zh.md b/docs/config-catalog.zh.md
index 2ea4bb8dff..1df3b98dc4 100644
--- a/docs/config-catalog.zh.md
+++ b/docs/config-catalog.zh.md
@@ -3327,7 +3327,7 @@ export type JournalMode = 'wal' | 'delete' | 'truncate' | 'persist'
- `inject`: `workingDirectory`
- `refs`: `Volatile` (`@deepseek-ai/cordis`)
-- `source`: [`packages/subagent/subagent/src/index.ts:186`](../packages/subagent/subagent/src/index.ts)
+- `source`: [`packages/subagent/subagent/src/index.ts:189`](../packages/subagent/subagent/src/index.ts)
```ts config-catalog
/** Host configuration for continuable subagent capacity. */
@@ -4665,7 +4665,7 @@ export interface Config {
| `@deepseek-ai/dsh-tool-call-timeout-policy` | `tools` | [`packages/guard/timeout-policy/src/index.ts`](../packages/guard/timeout-policy/src/index.ts) |
| `@deepseek-ai/dsh-tool-cordis` | `tools` · `cordisInspect` | [`packages/extensions/tool-cordis/src/index.ts`](../packages/extensions/tool-cordis/src/index.ts) |
| `@deepseek-ai/dsh-tool-schedule` | `tools` | [`packages/schedule/tool-schedule/src/index.ts`](../packages/schedule/tool-schedule/src/index.ts) |
-| `@deepseek-ai/dsh-tool-subagent-control` | `tools` · `subagents` | [`packages/subagent/tool-subagent-control/src/index.ts`](../packages/subagent/tool-subagent-control/src/index.ts) |
+| `@deepseek-ai/dsh-tool-subagent-control` | `tools` · `subagents` · `agents` · `sessionProjections` | [`packages/subagent/tool-subagent-control/src/index.ts`](../packages/subagent/tool-subagent-control/src/index.ts) |
| `@deepseek-ai/dsh-tool-working-directory` | `tools` · `workingDirectory` | [`packages/session/tool-working-directory/src/index.ts`](../packages/session/tool-working-directory/src/index.ts) |
| `@deepseek-ai/dsh-user-questions` | — | [`packages/interaction/user-questions/src/index.ts`](../packages/interaction/user-questions/src/index.ts) |
| `@deepseek-ai/dsh-webhook` | `agents` · `agentDefaultModel` · `agentPresets` · `permissionPresets` · `sessionTitle` · `workspaceRegistry` | [`packages/experimental/webhook/src/index.ts`](../packages/experimental/webhook/src/index.ts) |
diff --git a/docs/event-producer-consumer.md b/docs/event-producer-consumer.md
index 3d1bbaf987..33adad9cbf 100644
--- a/docs/event-producer-consumer.md
+++ b/docs/event-producer-consumer.md
@@ -68,10 +68,10 @@ This matrix shows which packages dispatch each harness-owned event and which pac
| `session/flush` | `parallel` | [`packages/core/session/src/index.ts:82`](../packages/core/session/src/index.ts) | [`session`](../packages/core/session) (`events.dispatch`) | [`session-persistence-jsonl`](../packages/session/session-persistence-jsonl), [`session-telemetry`](../packages/session/session-telemetry) |
| `settings/document-updated` | `emit` | [`packages/settings/settings/src/types.ts:75`](../packages/settings/settings/src/types.ts) | [`settings`](../packages/settings/settings) (`emit`) | `remotes` |
| `skills/change` | `emit` | [`packages/skill/skill/src/index.ts:296`](../packages/skill/skill/src/index.ts) | [`skill`](../packages/skill/skill) (`events.dispatch`) | - |
-| `subagent/end` | `emit` | [`packages/subagent/subagent/src/index.ts:166`](../packages/subagent/subagent/src/index.ts) | [`subagent`](../packages/subagent/subagent) (`events.dispatch`) | [`hooks-claude-code`](../packages/experimental/hooks-claude-code), `server` |
-| `subagent/provider-added` | `emit` | [`packages/subagent/subagent/src/index.ts:142`](../packages/subagent/subagent/src/index.ts) | [`subagent`](../packages/subagent/subagent) (`emit`) | [`tool-subagent`](../packages/subagent/tool-subagent) |
-| `subagent/provider-removed` | `emit` | [`packages/subagent/subagent/src/index.ts:148`](../packages/subagent/subagent/src/index.ts) | [`subagent`](../packages/subagent/subagent) (`events.dispatch`) | [`tool-subagent`](../packages/subagent/tool-subagent) |
-| `subagent/start` | `emit` | [`packages/subagent/subagent/src/index.ts:158`](../packages/subagent/subagent/src/index.ts) | [`subagent`](../packages/subagent/subagent) (`events.dispatch`) | [`hooks-claude-code`](../packages/experimental/hooks-claude-code) |
+| `subagent/end` | `emit` | [`packages/subagent/subagent/src/index.ts:169`](../packages/subagent/subagent/src/index.ts) | [`subagent`](../packages/subagent/subagent) (`events.dispatch`) | [`hooks-claude-code`](../packages/experimental/hooks-claude-code), `server` |
+| `subagent/provider-added` | `emit` | [`packages/subagent/subagent/src/index.ts:145`](../packages/subagent/subagent/src/index.ts) | [`subagent`](../packages/subagent/subagent) (`emit`) | [`tool-subagent`](../packages/subagent/tool-subagent) |
+| `subagent/provider-removed` | `emit` | [`packages/subagent/subagent/src/index.ts:151`](../packages/subagent/subagent/src/index.ts) | [`subagent`](../packages/subagent/subagent) (`events.dispatch`) | [`tool-subagent`](../packages/subagent/tool-subagent) |
+| `subagent/start` | `emit` | [`packages/subagent/subagent/src/index.ts:161`](../packages/subagent/subagent/src/index.ts) | [`subagent`](../packages/subagent/subagent) (`events.dispatch`) | [`hooks-claude-code`](../packages/experimental/hooks-claude-code) |
| `system-prompt/assemble` | `waterfall` | [`packages/core/system-prompt/src/index.ts:31`](../packages/core/system-prompt/src/index.ts) | [`system-prompt`](../packages/core/system-prompt) (`waterfall`) | [`agent`](../packages/core/agent), `browser-use-runtime`, [`session-reference`](../packages/context/session-reference), [`working-directory`](../packages/session/working-directory) |
| `system-prompt/change` | `emit` | [`packages/core/system-prompt/src/index.ts:37`](../packages/core/system-prompt/src/index.ts) | [`system-prompt`](../packages/core/system-prompt) (`emit`) | - |
| `tools/change` | `emit` | [`packages/core/tools/src/index.ts:209`](../packages/core/tools/src/index.ts) | [`agent-preset-registry`](../packages/preset/agent-preset-registry) (`emit`), [`tools`](../packages/core/tools) (`emit`) | `browser-use-runtime`, [`tool-subagent`](../packages/subagent/tool-subagent) |
diff --git a/docs/event-producer-consumer.zh.md b/docs/event-producer-consumer.zh.md
index 213180e82e..5f4bb2e72c 100644
--- a/docs/event-producer-consumer.zh.md
+++ b/docs/event-producer-consumer.zh.md
@@ -70,10 +70,10 @@
| `session/flush` | `parallel` | [`packages/core/session/src/index.ts:82`](../packages/core/session/src/index.ts) | [`session`](../packages/core/session) (`events.dispatch`) | [`session-persistence-jsonl`](../packages/session/session-persistence-jsonl), [`session-telemetry`](../packages/session/session-telemetry) |
| `settings/document-updated` | `emit` | [`packages/settings/settings/src/types.ts:75`](../packages/settings/settings/src/types.ts) | [`settings`](../packages/settings/settings) (`emit`) | `remotes` |
| `skills/change` | `emit` | [`packages/skill/skill/src/index.ts:296`](../packages/skill/skill/src/index.ts) | [`skill`](../packages/skill/skill) (`events.dispatch`) | - |
-| `subagent/end` | `emit` | [`packages/subagent/subagent/src/index.ts:166`](../packages/subagent/subagent/src/index.ts) | [`subagent`](../packages/subagent/subagent) (`events.dispatch`) | [`hooks-claude-code`](../packages/experimental/hooks-claude-code), `server` |
-| `subagent/provider-added` | `emit` | [`packages/subagent/subagent/src/index.ts:142`](../packages/subagent/subagent/src/index.ts) | [`subagent`](../packages/subagent/subagent) (`emit`) | [`tool-subagent`](../packages/subagent/tool-subagent) |
-| `subagent/provider-removed` | `emit` | [`packages/subagent/subagent/src/index.ts:148`](../packages/subagent/subagent/src/index.ts) | [`subagent`](../packages/subagent/subagent) (`events.dispatch`) | [`tool-subagent`](../packages/subagent/tool-subagent) |
-| `subagent/start` | `emit` | [`packages/subagent/subagent/src/index.ts:158`](../packages/subagent/subagent/src/index.ts) | [`subagent`](../packages/subagent/subagent) (`events.dispatch`) | [`hooks-claude-code`](../packages/experimental/hooks-claude-code) |
+| `subagent/end` | `emit` | [`packages/subagent/subagent/src/index.ts:169`](../packages/subagent/subagent/src/index.ts) | [`subagent`](../packages/subagent/subagent) (`events.dispatch`) | [`hooks-claude-code`](../packages/experimental/hooks-claude-code), `server` |
+| `subagent/provider-added` | `emit` | [`packages/subagent/subagent/src/index.ts:145`](../packages/subagent/subagent/src/index.ts) | [`subagent`](../packages/subagent/subagent) (`emit`) | [`tool-subagent`](../packages/subagent/tool-subagent) |
+| `subagent/provider-removed` | `emit` | [`packages/subagent/subagent/src/index.ts:151`](../packages/subagent/subagent/src/index.ts) | [`subagent`](../packages/subagent/subagent) (`events.dispatch`) | [`tool-subagent`](../packages/subagent/tool-subagent) |
+| `subagent/start` | `emit` | [`packages/subagent/subagent/src/index.ts:161`](../packages/subagent/subagent/src/index.ts) | [`subagent`](../packages/subagent/subagent) (`events.dispatch`) | [`hooks-claude-code`](../packages/experimental/hooks-claude-code) |
| `system-prompt/assemble` | `waterfall` | [`packages/core/system-prompt/src/index.ts:31`](../packages/core/system-prompt/src/index.ts) | [`system-prompt`](../packages/core/system-prompt) (`waterfall`) | [`agent`](../packages/core/agent), `browser-use-runtime`, [`session-reference`](../packages/context/session-reference), [`working-directory`](../packages/session/working-directory) |
| `system-prompt/change` | `emit` | [`packages/core/system-prompt/src/index.ts:37`](../packages/core/system-prompt/src/index.ts) | [`system-prompt`](../packages/core/system-prompt) (`emit`) | - |
| `tools/change` | `emit` | [`packages/core/tools/src/index.ts:209`](../packages/core/tools/src/index.ts) | [`agent-preset-registry`](../packages/preset/agent-preset-registry) (`emit`), [`tools`](../packages/core/tools) (`emit`) | `browser-use-runtime`, [`tool-subagent`](../packages/subagent/tool-subagent) |
diff --git a/docs/persistence-catalog.i18n.yaml b/docs/persistence-catalog.i18n.yaml
index 7d6496f3b6..db4a5c3861 100644
--- a/docs/persistence-catalog.i18n.yaml
+++ b/docs/persistence-catalog.i18n.yaml
@@ -213,8 +213,8 @@
en: f5d53639dc5afdfc
zh: 8c553e7397d08832
/session-persistence-event-catalog/events/subagent/subagent-model-selection-policy-log-only:
- en: cdf085d18fae747a
- zh: 83cd5cf56fef4050
+ en: 21aebb0e4cb6ee21
+ zh: dee38ebfb36a2b67
/session-persistence-event-catalog/events/system:
en: 8cac41d2fb575975
zh: 8cac41d2fb575975
@@ -1203,11 +1203,11 @@
en: bf7325029c9338d6
zh: e5f98271511e5318
/session-persistence-event-catalog/resolved-persistence-types/sessiontitlellmrequesteventdata:
- en: 89dcb9a9b957c126
- zh: 132aeb7dfd435290
+ en: 68372fc6b99ae078
+ zh: a729b755c0ecaac1
/session-persistence-event-catalog/resolved-persistence-types/sessiontitlemodelidentity:
- en: 9531468264499498
- zh: 9da23c0ad2776563
+ en: a8f45f1f1b6ab5cf
+ zh: d19985055565e024
/session-persistence-event-catalog/resolved-persistence-types/sessiontitlemodelidentity~2:
en: 13de8e35b749db45
zh: 01e4f3bcb6784fc8
@@ -1401,8 +1401,8 @@
en: 1afbe8196f161601
zh: a320a36a8928817c
/session-persistence-event-catalog/resolved-persistence-types/allowedmodels:
- en: 6178321110ceb69d
- zh: 0a9d94cab9d57487
+ en: 5944b04b8ae3fc17
+ zh: c618bf77631ba6db
/session-persistence-event-catalog/resolved-persistence-types/args-commandid-name-source:
en: a117573a5d58cb3c
zh: d5ad59e17a3a815d
diff --git a/docs/persistence-catalog.md b/docs/persistence-catalog.md
index fdadce4303..742feb3247 100644
--- a/docs/persistence-catalog.md
+++ b/docs/persistence-catalog.md
@@ -974,7 +974,7 @@ Source: [`packages/subagent/subagent/src/descriptor.ts:38`](../packages/subagent
}
```
-Source: [`packages/subagent/tool-subagent/src/model-selection-state.ts:17`](../packages/subagent/tool-subagent/src/model-selection-state.ts)
+Source: [`packages/subagent/subagent/src/model-selection-state.ts:17`](../packages/subagent/subagent/src/model-selection-state.ts)
### `system/*`
@@ -4710,7 +4710,7 @@ Sources: [`packages/session/session-title-llm/src/index.ts:37`](../packages/sess
-
+
@@ -4718,7 +4718,7 @@ Sources: [`packages/session/session-title-llm/src/index.ts:37`](../packages/sess
SHA-256: `07e1a58c58b593f507b8e7f25723bb0aa42baae6e00f5ecfddf28cb1e64d3235`
-Sources: [`packages/session/session-title/src/types.ts:20`](../packages/session/session-title/src/types.ts) · [`packages/subagent/tool-subagent/src/model-selection.ts:9`](../packages/subagent/tool-subagent/src/model-selection.ts)
+Sources: [`packages/session/session-title/src/types.ts:20`](../packages/session/session-title/src/types.ts) · [`packages/subagent/subagent/src/model-selection.ts:6`](../packages/subagent/subagent/src/model-selection.ts)
| Property | Presence | Type |
|---|---|---|
@@ -5785,7 +5785,7 @@ Sources: [`packages/preset/agent-preset-registry/src/session.ts:31`](../packages
SHA-256: `0d47a8f3d847243c4488e755ad4cab7a04ac5d4621b9c81865524cf3f4d8536f`
-Sources: [`packages/subagent/tool-subagent/src/model-selection-state.ts:17`](../packages/subagent/tool-subagent/src/model-selection-state.ts)
+Sources: [`packages/subagent/subagent/src/model-selection-state.ts:17`](../packages/subagent/subagent/src/model-selection-state.ts)
| Property | Presence | Type |
|---|---|---|
diff --git a/docs/persistence-catalog.zh.md b/docs/persistence-catalog.zh.md
index 1762b0b2e9..b33b7122e9 100644
--- a/docs/persistence-catalog.zh.md
+++ b/docs/persistence-catalog.zh.md
@@ -976,7 +976,7 @@ export type SessionEvent = {
}
```
-来源:[`packages/subagent/tool-subagent/src/model-selection-state.ts:17`](../packages/subagent/tool-subagent/src/model-selection-state.ts)
+来源:[`packages/subagent/subagent/src/model-selection-state.ts:17`](../packages/subagent/subagent/src/model-selection-state.ts)
### `system/*`
@@ -4712,7 +4712,7 @@ SHA-256: `00c054d3018c198d92f459563331edd1385e58345c677bb499791df2da0ade9f`
-
+
@@ -4720,7 +4720,7 @@ SHA-256: `00c054d3018c198d92f459563331edd1385e58345c677bb499791df2da0ade9f`
SHA-256: `07e1a58c58b593f507b8e7f25723bb0aa42baae6e00f5ecfddf28cb1e64d3235`
-来源:[`packages/session/session-title/src/types.ts:20`](../packages/session/session-title/src/types.ts) · [`packages/subagent/tool-subagent/src/model-selection.ts:9`](../packages/subagent/tool-subagent/src/model-selection.ts)
+来源:[`packages/session/session-title/src/types.ts:20`](../packages/session/session-title/src/types.ts) · [`packages/subagent/subagent/src/model-selection.ts:6`](../packages/subagent/subagent/src/model-selection.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
@@ -5787,7 +5787,7 @@ SHA-256: `6e52dd55a1d48954ed5464ec46fe34d9eb65f709baabc9561e7a279910b0c406`
SHA-256: `0d47a8f3d847243c4488e755ad4cab7a04ac5d4621b9c81865524cf3f4d8536f`
-来源:[`packages/subagent/tool-subagent/src/model-selection-state.ts:17`](../packages/subagent/tool-subagent/src/model-selection-state.ts)
+来源:[`packages/subagent/subagent/src/model-selection-state.ts:17`](../packages/subagent/subagent/src/model-selection-state.ts)
| 属性 | 存在性 | 类型 |
|---|---|---|
diff --git a/docs/persistence-schema.json b/docs/persistence-schema.json
index a77fe9f24b..9e05de4ced 100644
--- a/docs/persistence-schema.json
+++ b/docs/persistence-schema.json
@@ -22467,11 +22467,11 @@
"digest": "07e1a58c58b593f507b8e7f25723bb0aa42baae6e00f5ecfddf28cb1e64d3235",
"names": [
"packages/session/session-title/src/types.ts#SessionTitleModelIdentity",
- "packages/subagent/tool-subagent/src/model-selection.ts#AllowedModelRoute"
+ "packages/subagent/subagent/src/model-selection.ts#AllowedModelRoute"
],
"sources": [
"packages/session/session-title/src/types.ts:20",
- "packages/subagent/tool-subagent/src/model-selection.ts:9"
+ "packages/subagent/subagent/src/model-selection.ts:6"
]
},
{
@@ -22563,7 +22563,7 @@
"digest": "0d47a8f3d847243c4488e755ad4cab7a04ac5d4621b9c81865524cf3f4d8536f",
"names": [],
"sources": [
- "packages/subagent/tool-subagent/src/model-selection-state.ts:17"
+ "packages/subagent/subagent/src/model-selection-state.ts:17"
]
},
{
diff --git a/docs/tool-catalog.i18n.yaml b/docs/tool-catalog.i18n.yaml
index 88981b7250..3417471b74 100644
--- a/docs/tool-catalog.i18n.yaml
+++ b/docs/tool-catalog.i18n.yaml
@@ -9,8 +9,8 @@
en: 6cc2cd9ced70bb09
zh: 1c0e6cb4ba2ed637
/tool-schema-catalog/tool-package-map:
- en: 2564a863f5ae609f
- zh: 219a0748cf3dbea8
+ en: f9cd5646347b0c21
+ zh: 85d431ca10ab14c9
/tool-schema-catalog/deepseek-ai-dsh-plugin-manager:
en: e0143916bb634762
zh: e0143916bb634762
@@ -230,12 +230,9 @@
/tool-schema-catalog/deepseek-ai-dsh-tool-subagent:
en: 841abe0dd5913ea7
zh: 841abe0dd5913ea7
-/tool-schema-catalog/deepseek-ai-dsh-tool-subagent/list-subagent-models:
- en: 207228068bc61885
- zh: 36e9344ee1af8869
/tool-schema-catalog/deepseek-ai-dsh-tool-subagent/subagent:
- en: 5bcfcf9ca4117096
- zh: 38cb646632b457b2
+ en: 624314cfda48b2dc
+ zh: 0d820f1df16ee120
/tool-schema-catalog/deepseek-ai-dsh-tool-subagent-control:
en: ab82e130c3413f04
zh: ab82e130c3413f04
@@ -245,9 +242,12 @@
/tool-schema-catalog/deepseek-ai-dsh-tool-subagent-control/list-agents:
en: ae22e8543d123c39
zh: 0991a73ef49bcdea
+/tool-schema-catalog/deepseek-ai-dsh-tool-subagent-control/list-subagent-models:
+ en: 946110d47d9b9a1e
+ zh: e3fa489c7daba5f2
/tool-schema-catalog/deepseek-ai-dsh-tool-subagent-control/send-message:
- en: 69c1c0a80c24e3a4
- zh: 04f4ac5ec365aa63
+ en: 3e573af66840445f
+ zh: 37ff0d01d8e4716d
/tool-schema-catalog/deepseek-ai-dsh-tool-jobs:
en: 9be673b1604d0114
zh: 9be673b1604d0114
diff --git a/docs/tool-catalog.md b/docs/tool-catalog.md
index dae49a00ee..bd0bdc25df 100644
--- a/docs/tool-catalog.md
+++ b/docs/tool-catalog.md
@@ -38,8 +38,8 @@ This table connects model-visible tool names to the plugin package and service s
| `@deepseek-ai/dsh-tool-ralph` | `ralph` | `ctx.tools`, `ctx.workflowEngine`, `ctx.subagents`, `ctx.systemPrompt`, `a calling Agent (exec.agent parents every fresh round)` | `tool/call`, `tool/result`, `workflow and child session events during execution` | - | A fixed foreground workflow starts one fresh structured child per round; the model selects only the immutable objective and an optional round cap. |
| `@deepseek-ai/dsh-tool-skill` | `skill` | `ctx.workingDirectory`, `ctx.tools`, `ctx.agents`, `ctx.skills` | `tool/call`, `tool/result`, `user/message replacement catalogs via agent.inject()` | - | - |
| `@deepseek-ai/dsh-tool-session-query` | `session_event_read`, `session_event_search`, `session_event_trace`, `session_search`, `session_trace` | `ctx.tools`, `ctx.systemPrompt`, `ctx.sessionQuery`, `a calling Agent for workspace authority` | `tool/call`, `tool/result` | - | The five read-only tools hide provider cursors and authorize every result from the immutable calling agent session. The package is opt-in; compositions that need enforced deadlines or bounded inline output also mount the generic timeout or spill policies. |
-| `@deepseek-ai/dsh-tool-subagent` | `list_subagent_models`, `subagent` | `ctx.tools`, `ctx.subagents`, `ctx.systemPrompt`, `ctx.sessionProjections`, `ctx.llm for model discovery and selected-route validation` | `tool/call`, `tool/result`, `child session events through the chosen provider` | `subagent`, `subagent_fork` | The load-time `toolName` selects the delegation name (default `subagent`); `modelSelection` adds optional route fields. The independent `/list-models` plugin registers discovery. Web and Desktop presets mount discovery, enable spawn route fields, and leave `subagent_fork` route fields disabled. The Host settings service records authorization for each new top-level Session; child Sessions inherit it. Without a recorded policy, discovery and explicit selection permit only the current parent route. Every delegation returns a child id promptly; local children accept follow-ups, while external backends report their single execution automatically. |
-| `@deepseek-ai/dsh-tool-subagent-control` | `interrupt_agent`, `list_agents`, `send_message` | `ctx.tools`, `ctx.subagents`, `ctx.agents and ctx.sessionProjections (list_agents only)` | `tool/call`, `tool/result`, `child session events through ctx.subagents` | - | The globally named discovery, interruption, and local-message tools over managed subagents: provider-bound `tool-subagent` instances register distinct delegation tools, while this package registers `send_message` and `interrupt_agent` once, plus `list_agents` from its separately loaded `/list-agents` plugin (whose catalog rows use the sessionProjections and live Agent registries). |
+| `@deepseek-ai/dsh-tool-subagent` | `subagent` | `ctx.tools`, `ctx.subagents`, `ctx.systemPrompt`, `ctx.sessionProjections`, `ctx.llm for selected-route validation` | `tool/call`, `tool/result`, `child session events through the chosen provider` | `subagent`, `subagent_fork` | The load-time `toolName` selects the delegation name (default `subagent`); `modelSelection` adds optional route fields. The shared `tool-subagent-control` plugin registers model discovery. Web and Desktop presets enable spawn route fields and leave `subagent_fork` route fields disabled. The Host settings service records authorization for each new top-level Session; child Sessions inherit it. Without a recorded policy, discovery and explicit selection permit only the current parent route. Every delegation returns a child id promptly; local children accept follow-ups, while external backends report their single execution automatically. |
+| `@deepseek-ai/dsh-tool-subagent-control` | `interrupt_agent`, `list_agents`, `list_subagent_models`, `send_message` | `ctx.tools`, `ctx.subagents`, `ctx.agents`, `ctx.sessionProjections`, `ctx.llm for model discovery` | `tool/call`, `tool/result`, `child session events through ctx.subagents` | - | The globally named discovery, interruption, and local-message tools over managed subagents: provider-bound `tool-subagent` instances register distinct delegation tools, while one instance of this package registers `send_message`, `interrupt_agent`, `list_agents`, and `list_subagent_models`. Model discovery reads the calling Session’s recorded authorization, or only its current parent route when no policy is recorded. |
| `@deepseek-ai/dsh-tool-jobs` | `job_kill`, `job_list`, `job_output` | `ctx.tools`, `ctx.jobs`, `ctx.systemPrompt` | `tool/call`, `tool/result`, `user/message via agent.inject() for background completion notices` | - | The kind-agnostic background-job controller: background bash commands and PTY sends are read, listed, and killed through the same three tools. Loading the plugin attaches the controller that arms producers' `ctx.jobs.start()`. |
| `@deepseek-ai/dsh-experimental-tool-agent-team` | `interrupt_agent`, `list_agents`, `send_message`, `spawn_teammate`, `team_task_create`, `team_task_get`, `team_task_list`, `team_task_update`, `wait_agent` | `ctx.tools`, `ctx.systemPrompt`, `ctx.agentTeams`, `an exact live Team member Agent` | `tool/call`, `team/member`, `team/task`, `agent/inbox/spliced`, `user/message on inbox claim`, `tool/result` | - | All nine tools are scoped to implicit Team Leads and durable teammates. The shipped dsh-base bundle keeps the package disabled; the documented Agent Teams profile patch enables it while disabling the legacy continuable-child control names. |
| `@deepseek-ai/dsh-tool-todo` | `todo_write` | `ctx.tools`, `owning Agent session` | `tool/call`, `todo/write`, `tool/result` | - | todo_write is session-owned state; UIs render the latest todo/write event as a checklist. `allowParallelInProgress` is required with no default, so the catalog states its choice: `true`, whose description invites several `in_progress` items. A deployment choosing `false` receives the same tool with a description asking for exactly one active task. |
@@ -2066,28 +2066,6 @@ The five read-only tools hide provider cursors and authorize every result from t
## `@deepseek-ai/dsh-tool-subagent`
-### `list_subagent_models`
-
-Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.
-
-```json
-{
- "type": "object",
- "properties": {
- "provider": {
- "type": "string",
- "description": "Registered LLM provider id."
- },
- "model": {
- "type": "string",
- "description": "Exact model id; requires provider."
- }
- }
-}
-```
-
-Source: [`packages/subagent/tool-subagent/src/list-models.ts`](../packages/subagent/tool-subagent/src/list-models.ts)
-
### `subagent`
Delegate a self-contained task to a subagent (a separate agent that works in its own context) to offload focused, independent work — research, a scoped implementation, an analysis — so it does not consume this conversation's context. The subagent returns its result, not its intermediate steps. This tool starts an independently managed subagent and immediately returns its id. The runtime notifies you when it finishes. The child reports results with `send_message`; use `send_message` to steer it while running or continue its conversation after it finishes.
@@ -2118,7 +2096,7 @@ Delegate a self-contained task to a subagent (a separate agent that works in its
Source: [`packages/subagent/tool-subagent/src/index.ts`](../packages/subagent/tool-subagent/src/index.ts)
-The load-time `toolName` selects the delegation name (default `subagent`); `modelSelection` adds optional route fields. The independent `/list-models` plugin registers discovery. Web and Desktop presets mount discovery, enable spawn route fields, and leave `subagent_fork` route fields disabled. The Host settings service records authorization for each new top-level Session; child Sessions inherit it. Without a recorded policy, discovery and explicit selection permit only the current parent route. Every delegation returns a child id promptly; local children accept follow-ups, while external backends report their single execution automatically.
+The load-time `toolName` selects the delegation name (default `subagent`); `modelSelection` adds optional route fields. The shared `tool-subagent-control` plugin registers model discovery. Web and Desktop presets enable spawn route fields and leave `subagent_fork` route fields disabled. The Host settings service records authorization for each new top-level Session; child Sessions inherit it. Without a recorded policy, discovery and explicit selection permit only the current parent route. Every delegation returns a child id promptly; local children accept follow-ups, while external backends report their single execution automatically.
@@ -2167,6 +2145,28 @@ List subagents you started, with their ids, labels, and status. running means it
Source: [`packages/subagent/tool-subagent-control/src/list-agents.ts`](../packages/subagent/tool-subagent-control/src/list-agents.ts)
+### `list_subagent_models`
+
+Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.
+
+```json
+{
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+}
+```
+
+Source: [`packages/subagent/tool-subagent-control/src/list-models.ts`](../packages/subagent/tool-subagent-control/src/list-models.ts)
+
### `send_message`
Send a message to an agent. A working agent receives it at its next step; an idle agent starts a new turn with it. Returns delivery confirmation, not the agent's answer.
@@ -2193,7 +2193,7 @@ Send a message to an agent. A working agent receives it at its next step; an idl
Source: [`packages/subagent/tool-subagent-control/src/index.ts`](../packages/subagent/tool-subagent-control/src/index.ts)
-The globally named discovery, interruption, and local-message tools over managed subagents: provider-bound `tool-subagent` instances register distinct delegation tools, while this package registers `send_message` and `interrupt_agent` once, plus `list_agents` from its separately loaded `/list-agents` plugin (whose catalog rows use the sessionProjections and live Agent registries).
+The globally named discovery, interruption, and local-message tools over managed subagents: provider-bound `tool-subagent` instances register distinct delegation tools, while one instance of this package registers `send_message`, `interrupt_agent`, `list_agents`, and `list_subagent_models`. Model discovery reads the calling Session’s recorded authorization, or only its current parent route when no policy is recorded.
diff --git a/docs/tool-catalog.zh.md b/docs/tool-catalog.zh.md
index 7a64f703ba..e4e8830a24 100644
--- a/docs/tool-catalog.zh.md
+++ b/docs/tool-catalog.zh.md
@@ -42,8 +42,8 @@
| `@deepseek-ai/dsh-tool-ralph` | `ralph` | `ctx.tools`、`ctx.workflowEngine`、`ctx.subagents`、`ctx.systemPrompt`、`a calling Agent (exec.agent parents every fresh round)` | `tool/call`、`tool/result`、`workflow and child session events during execution` | - | 固定的前台工作流会在每个 Round 启动一个全新的结构化子级;模型只能选择不可变目标和可选的 Round 上限。 |
| `@deepseek-ai/dsh-tool-skill` | `skill` | `ctx.workingDirectory`、`ctx.tools`、`ctx.agents`、`ctx.skills` | `tool/call`、`tool/result`、`user/message replacement catalogs via agent.inject()` | - | - |
| `@deepseek-ai/dsh-tool-session-query` | `session_event_read`、`session_event_search`、`session_event_trace`、`session_search`、`session_trace` | `ctx.tools`、`ctx.systemPrompt`、`ctx.sessionQuery`、`a calling Agent for workspace authority` | `tool/call`、`tool/result` | - | 这 5 个只读工具会隐藏提供方游标,并根据不可变的调用 agent 会话为每个结果授权。该包需要选择启用;需要强制截止时间或限制行内输出的组合还会挂载通用超时或 spill 策略。 |
-| `@deepseek-ai/dsh-tool-subagent` | `list_subagent_models`、`subagent` | `ctx.tools`、`ctx.subagents`、`ctx.systemPrompt`、`ctx.sessionProjections`、`用于模型发现和所选路由校验的 ctx.llm` | `tool/call`、`tool/result`、`child session events through the chosen provider` | `subagent`、`subagent_fork` | 加载时的 `toolName` 选择委派名称(默认为 `subagent`);`modelSelection` 增加可选路由字段。独立的 `/list-models` 插件注册发现工具。Web 与 Desktop preset 挂载发现工具,启用 spawn 路由字段,并为 `subagent_fork` 保持路由字段关闭。Host 设置服务为每个新顶层 Session 记录授权;子 Session 继承该授权。没有已记录策略时,发现和显式选择只允许当前父级路由。每次委派都会立即返回子代理 id;本地子代理接受后续消息,外部后端自动汇报单次执行结果。 |
-| `@deepseek-ai/dsh-tool-subagent-control` | `interrupt_agent`、`list_agents`、`send_message` | `ctx.tools`、`ctx.subagents`、`ctx.agents and ctx.sessionProjections (list_agents only)` | `tool/call`、`tool/result`、`child session events through ctx.subagents` | - | 这些是用于发现、中断托管 subagent 和向本地子代理发送消息的全局命名工具:绑定提供方的 `tool-subagent` 实例注册不同的委派工具;本包注册一次 `send_message` 和 `interrupt_agent`,另由 `list_agents` 通过单独加载的 `/list-agents` 插件提供,其目录行使用 sessionProjections 和实时 Agent 注册表。 |
+| `@deepseek-ai/dsh-tool-subagent` | `subagent` | `ctx.tools`、`ctx.subagents`、`ctx.systemPrompt`、`ctx.sessionProjections`、`用于所选路由校验的 ctx.llm` | `tool/call`、`tool/result`、`child session events through the chosen provider` | `subagent`、`subagent_fork` | 加载时的 `toolName` 选择委派名称(默认为 `subagent`);`modelSelection` 增加可选路由字段。共享的 `tool-subagent-control` 插件注册模型查询。Web 与 Desktop preset 启用 spawn 路由字段,并为 `subagent_fork` 保持路由字段关闭。Host 设置服务为每个新顶层 Session 记录授权;子 Session 继承该授权。没有已记录策略时,发现和显式选择只允许当前父级路由。每次委派都会立即返回子代理 id;本地子代理接受后续消息,外部后端自动汇报单次执行结果。 |
+| `@deepseek-ai/dsh-tool-subagent-control` | `interrupt_agent`、`list_agents`、`list_subagent_models`、`send_message` | `ctx.tools`、`ctx.subagents`、`ctx.agents`、`ctx.sessionProjections`、`用于模型查询的 ctx.llm` | `tool/call`、`tool/result`、`child session events through ctx.subagents` | - | 这些是用于发现、中断托管 subagent 和向本地子代理发送消息的全局命名工具:绑定提供方的 `tool-subagent` 实例注册不同的委派工具;本包的一个实例注册 `send_message`、`interrupt_agent`、`list_agents` 和 `list_subagent_models`。模型查询读取调用 Session 已记录的授权,没有策略时只使用其当前父级路由。 |
| `@deepseek-ai/dsh-tool-jobs` | `job_kill`、`job_list`、`job_output` | `ctx.tools`、`ctx.jobs`、`ctx.systemPrompt` | `tool/call`、`tool/result`、`user/message via agent.inject() for background completion notices` | - | 与任务种类无关的后台任务控制器:后台 bash 命令与 PTY 发送 都通过相同的 3 个工具读取、列出和终止。加载该插件会挂接控制器,从而启用生产方的 `ctx.jobs.start()`。 |
| `@deepseek-ai/dsh-experimental-tool-agent-team` | `interrupt_agent`、`list_agents`、`send_message`、`spawn_teammate`、`team_task_create`、`team_task_get`、`team_task_list`、`team_task_update`、`wait_agent` | `ctx.tools`、`ctx.systemPrompt`、`ctx.agentTeams`、`an exact live Team member Agent` | `tool/call`、`team/member`、`team/task`、`agent/inbox/spliced`、`user/message on inbox claim`、`tool/result` | - | 这 9 个工具限定于隐式 Team Lead 与持久 teammate 作用域。随产品发布的 dsh-base bundle 默认禁用该包;文档中的 Agent Teams profile patch 会启用它,并禁用旧 continuable child 的同名控制工具。 |
| `@deepseek-ai/dsh-tool-todo` | `todo_write` | `ctx.tools`、`owning Agent session` | `tool/call`、`todo/write`、`tool/result` | - | todo_write 是会话所有的状态;UI 将最新的 todo/write 事件渲染为检查清单。`allowParallelInProgress` 是没有默认值的必填项,因此本目录明确选择 `true`,对应描述允许同时存在多个 `in_progress` 项。选择 `false` 的部署会获得同一工具,但描述会要求只能有 1 个活动任务。 |
@@ -2072,28 +2072,6 @@ lsp 工具将提供方选择和语言服务器子进程置于 ctx.lsp 之后,
## `@deepseek-ai/dsh-tool-subagent`
-### `list_subagent_models`
-
-查询 subagent 可用的模型,不更改当前 Agent。无参数:提供方;`provider`:允许的模型;`provider` + `model`:该模型及其推理强度。选择子级提供方和模型前先在此查询选项,再将返回的 id 用于委派。
-
-```json
-{
- "type": "object",
- "properties": {
- "provider": {
- "type": "string",
- "description": "Registered LLM provider id."
- },
- "model": {
- "type": "string",
- "description": "Exact model id; requires provider."
- }
- }
-}
-```
-
-来源:[`packages/subagent/tool-subagent/src/list-models.ts`](../packages/subagent/tool-subagent/src/list-models.ts)
-
### `subagent`
将一项自包含任务委派给 subagent(在自身上下文中工作的独立 agent),用它卸载聚焦且独立的工作,例如研究、限定范围的实现或分析,以免消耗当前对话的上下文。subagent 会返回结果,但不会返回中间步骤。此工具启动独立管理的 subagent 并立即返回其 id。运行时会在任务结束时通知你。子代理通过 `send_message` 汇报结果;你可以使用 `send_message` 在运行时引导它,或在结束后继续对话。
@@ -2124,7 +2102,7 @@ lsp 工具将提供方选择和语言服务器子进程置于 ctx.lsp 之后,
来源:[`packages/subagent/tool-subagent/src/index.ts`](../packages/subagent/tool-subagent/src/index.ts)
-加载时的 `toolName` 选择委派名称(默认为 `subagent`);`modelSelection` 增加可选路由字段。独立的 `/list-models` 插件注册发现工具。Web 与 Desktop preset 挂载发现工具,启用 spawn 路由字段,并为 `subagent_fork` 保持路由字段关闭。Host 设置服务为每个新顶层 Session 记录授权;子 Session 继承该授权。没有已记录策略时,发现和显式选择只允许当前父级路由。每次委派都会立即返回子代理 id;本地子代理接受后续消息,外部后端自动汇报单次执行结果。
+加载时的 `toolName` 选择委派名称(默认为 `subagent`);`modelSelection` 增加可选路由字段。共享的 `tool-subagent-control` 插件注册模型查询。Web 与 Desktop preset 启用 spawn 路由字段,并为 `subagent_fork` 保持路由字段关闭。Host 设置服务为每个新顶层 Session 记录授权;子 Session 继承该授权。没有已记录策略时,发现和显式选择只允许当前父级路由。每次委派都会立即返回子代理 id;本地子代理接受后续消息,外部后端自动汇报单次执行结果。
@@ -2173,6 +2151,28 @@ lsp 工具将提供方选择和语言服务器子进程置于 ctx.lsp 之后,
来源:[`packages/subagent/tool-subagent-control/src/list-agents.ts`](../packages/subagent/tool-subagent-control/src/list-agents.ts)
+### `list_subagent_models`
+
+查询 subagent 可用的模型,不更改当前 Agent。无参数:提供方;`provider`:允许的模型;`provider` + `model`:该模型及其推理强度。选择子级提供方和模型前先在此查询选项,再将返回的 id 用于委派。
+
+```json
+{
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+}
+```
+
+来源:[`packages/subagent/tool-subagent-control/src/list-models.ts`](../packages/subagent/tool-subagent-control/src/list-models.ts)
+
### `send_message`
根据 agent id 向直接可继续 child 发送消息。如果你是驻留的可继续 child,也可以把自己的直接 parent 作为目标。如果目标仍在工作,消息会 steer 其最近的 step;如果目标处于 idle,消息会启动一个轮次。此调用不会返回该 agent 的答案,只会确认消息已投递。调用失败表示消息**未**投递。
@@ -2199,7 +2199,7 @@ lsp 工具将提供方选择和语言服务器子进程置于 ctx.lsp 之后,
来源:[`packages/subagent/tool-subagent-control/src/index.ts`](../packages/subagent/tool-subagent-control/src/index.ts)
-这些是用于发现、中断托管 subagent 和向本地子代理发送消息的全局命名工具:绑定提供方的 `tool-subagent` 实例注册不同的委派工具;本包注册一次 `send_message` 和 `interrupt_agent`,另由 `list_agents` 通过单独加载的 `/list-agents` 插件提供,其目录行使用 sessionProjections 和实时 Agent 注册表。
+这些是用于发现、中断托管 subagent 和向本地子代理发送消息的全局命名工具:绑定提供方的 `tool-subagent` 实例注册不同的委派工具;本包的一个实例注册 `send_message`、`interrupt_agent`、`list_agents` 和 `list_subagent_models`。模型查询读取调用 Session 已记录的授权,没有策略时只使用其当前父级路由。
diff --git a/docs/upgrade-guide/v0.2.1-rc.1/subagent-control-tools/guide.i18n.yaml b/docs/upgrade-guide/v0.2.1-rc.1/subagent-control-tools/guide.i18n.yaml
new file mode 100644
index 0000000000..02ad80cb3a
--- /dev/null
+++ b/docs/upgrade-guide/v0.2.1-rc.1/subagent-control-tools/guide.i18n.yaml
@@ -0,0 +1,16 @@
+# Bilingual-pair consistency record for guide.md (docs/i18n/README.md): per heading
+# section, a hash of its English and Chinese blocks outside code blocks and generated regions.
+# After editing either side, bring the other along and re-record with:
+# pnpm run verify-translation-pairing --write docs/upgrade-guide/v0.2.1-rc.1/subagent-control-tools/guide.md
+/:
+ en: d2945e1ef88105a7
+ zh: 3c98a3f589bc0dd1
+/mount-subagent-control-tools-once:
+ en: 1ffca94ff761560f
+ zh: 9ae17b47002871a7
+/mount-subagent-control-tools-once/change:
+ en: 159eb78b960042b8
+ zh: 734bd55b75a6c40a
+/mount-subagent-control-tools-once/migration:
+ en: a018164bfc5eb2ca
+ zh: d423f896e71299f4
diff --git a/docs/upgrade-guide/v0.2.1-rc.1/subagent-control-tools/guide.md b/docs/upgrade-guide/v0.2.1-rc.1/subagent-control-tools/guide.md
new file mode 100644
index 0000000000..e0e680be43
--- /dev/null
+++ b/docs/upgrade-guide/v0.2.1-rc.1/subagent-control-tools/guide.md
@@ -0,0 +1,21 @@
+---
+kind: upgrade-guide
+description: Subagent discovery plugins are replaced by the shared subagent-control entry.
+---
+
+# Mount subagent control tools once
+
+English | [中文](guide.zh.md)
+
+## Change
+
+`@deepseek-ai/dsh-tool-subagent-control` registers `send_message`, `interrupt_agent`, `list_agents`, and `list_subagent_models` together. The separate `@deepseek-ai/dsh-tool-subagent-control/list-agents` and `@deepseek-ai/dsh-tool-subagent/list-models` exports are removed. The shared plugin requires `tools`, `subagents`, `agents`, and `sessionProjections`; model discovery reports an error if `llm` is unavailable.
+
+The shipped headless, SDK, and ACP profiles now include model discovery through the shared control plugin. Tool presence does not grant model-selection authorization: discovery still uses the calling Session’s recorded policy, or only the current parent route when no policy exists. Web and Desktop retain their model-selection settings and delegation defaults.
+
+## Migration
+
+1. Replace the separate discovery rows in custom `cordis.yml` files and patches with one `@deepseek-ai/dsh-tool-subagent-control` row per tool scope. If that row already exists, remove the redundant discovery rows. Direct plugin consumers mount the root entry once.
+2. Remove patches targeting the retired `tool-subagent-list-agents` and `tool-subagent-list-models` row ids. A patch disabling `tool-subagent-control` now disables all four tools; use existing tool restrictions when only selected tools should be hidden.
+3. Provide the required services before mounting the shared plugin. Keep the Host `@deepseek-ai/dsh-tool-subagent/model-selection-settings` service when custom compositions need user-authorized alternative routes.
+4. Verify that the calling Agent sees one definition of each of the four tools and that `list_subagent_models` returns only the Session’s authorized routes or its current parent route.
diff --git a/docs/upgrade-guide/v0.2.1-rc.1/subagent-control-tools/guide.zh.md b/docs/upgrade-guide/v0.2.1-rc.1/subagent-control-tools/guide.zh.md
new file mode 100644
index 0000000000..4f32f4470c
--- /dev/null
+++ b/docs/upgrade-guide/v0.2.1-rc.1/subagent-control-tools/guide.zh.md
@@ -0,0 +1,21 @@
+---
+kind: upgrade-guide
+description: 子智能体发现插件改由共享的 subagent-control 入口提供。
+---
+
+# 统一挂载子智能体控制工具
+
+[English](guide.md) | 中文
+
+## 变更
+
+`@deepseek-ai/dsh-tool-subagent-control` 一起注册 `send_message`、`interrupt_agent`、`list_agents` 和 `list_subagent_models`。独立的 `@deepseek-ai/dsh-tool-subagent-control/list-agents` 与 `@deepseek-ai/dsh-tool-subagent/list-models` 导出已移除。共享插件要求 `tools`、`subagents`、`agents` 和 `sessionProjections`;`llm` 不可用时,模型查询会报告错误。
+
+随附 headless、SDK 和 ACP profile 现在通过共享控制插件包含模型查询。工具存在不会授予模型选择权限:查询仍使用调用 Session 已记录的策略,没有策略时只允许当前父级路由。Web 与 Desktop 保留其模型选择设置和委派默认值。
+
+## 迁移
+
+1. 将自定义 `cordis.yml` 和 patch 中独立的发现配置行替换为每个工具作用域一条 `@deepseek-ai/dsh-tool-subagent-control`。已有该配置行时,删除重复的发现配置行。直接使用插件的调用方只挂载一次主入口。
+2. 移除针对已停用的 `tool-subagent-list-agents` 和 `tool-subagent-list-models` 行 ID 的 patch。禁用 `tool-subagent-control` 现在会禁用全部四个工具;若只需隐藏部分工具,使用现有工具限制。
+3. 在挂载共享插件前提供其所需服务。自定义组合需要用户授权其他路由时,保留 Host 的 `@deepseek-ai/dsh-tool-subagent/model-selection-settings` 服务。
+4. 验证调用 Agent 对四个工具各看到一份定义,并确认 `list_subagent_models` 只返回 Session 已授权的路由或其当前父级路由。
diff --git a/packages/bundle/base/cordis.patch.yml b/packages/bundle/base/cordis.patch.yml
index 3a69530deb..0b88dd7ecc 100644
--- a/packages/bundle/base/cordis.patch.yml
+++ b/packages/bundle/base/cordis.patch.yml
@@ -374,9 +374,6 @@
- id: tool-subagent-control
name: '@deepseek-ai/dsh-tool-subagent-control'
- - id: tool-subagent-list-agents
- name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
-
- id: tool-subagent
name: '@deepseek-ai/dsh-tool-subagent'
config:
diff --git a/packages/bundle/web-app/cordis.patch.yml b/packages/bundle/web-app/cordis.patch.yml
index 540b7650da..af0bd70050 100644
--- a/packages/bundle/web-app/cordis.patch.yml
+++ b/packages/bundle/web-app/cordis.patch.yml
@@ -552,9 +552,6 @@
- id: tool-subagent-control
disabled: true
-- id: tool-subagent-list-agents
- disabled: true
-
- id: tool-subagent
disabled: true
diff --git a/packages/bundle/web-app/presets/cordis.patch.yml b/packages/bundle/web-app/presets/cordis.patch.yml
index 7df564dd17..33b11d3f83 100644
--- a/packages/bundle/web-app/presets/cordis.patch.yml
+++ b/packages/bundle/web-app/presets/cordis.patch.yml
@@ -87,10 +87,6 @@
config:
- id: tool-subagent-control
name: '@deepseek-ai/dsh-tool-subagent-control'
- - id: tool-subagent-list-agents
- name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
- - id: tool-subagent-list-models
- name: '@deepseek-ai/dsh-tool-subagent/list-models'
- id: tool-subagent
name: '@deepseek-ai/dsh-tool-subagent'
config:
diff --git a/packages/bundle/web-app/presets/ptc.patch.yml b/packages/bundle/web-app/presets/ptc.patch.yml
index 4ed9bdff58..9610e15094 100644
--- a/packages/bundle/web-app/presets/ptc.patch.yml
+++ b/packages/bundle/web-app/presets/ptc.patch.yml
@@ -88,10 +88,6 @@
config:
- id: tool-subagent-control
name: '@deepseek-ai/dsh-tool-subagent-control'
- - id: tool-subagent-list-agents
- name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
- - id: tool-subagent-list-models
- name: '@deepseek-ai/dsh-tool-subagent/list-models'
- id: tool-subagent
name: '@deepseek-ai/dsh-tool-subagent'
config:
diff --git a/packages/bundle/web-app/presets/standard.patch.yml b/packages/bundle/web-app/presets/standard.patch.yml
index 6c2808390c..02efd1d516 100644
--- a/packages/bundle/web-app/presets/standard.patch.yml
+++ b/packages/bundle/web-app/presets/standard.patch.yml
@@ -88,10 +88,6 @@
config:
- id: tool-subagent-control
name: '@deepseek-ai/dsh-tool-subagent-control'
- - id: tool-subagent-list-agents
- name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
- - id: tool-subagent-list-models
- name: '@deepseek-ai/dsh-tool-subagent/list-models'
- id: tool-subagent
name: '@deepseek-ai/dsh-tool-subagent'
config:
diff --git a/packages/core/tools/tests/gen-tool-catalog.spec.ts b/packages/core/tools/tests/gen-tool-catalog.spec.ts
index bc0b2ba97d..e88c68a884 100644
--- a/packages/core/tools/tests/gen-tool-catalog.spec.ts
+++ b/packages/core/tools/tests/gen-tool-catalog.spec.ts
@@ -73,6 +73,7 @@ describe('gen-tool-catalog collectToolCatalog', () => {
expect(control?.sources).toEqual({
interrupt_agent: 'packages/subagent/tool-subagent-control/src/index.ts',
list_agents: 'packages/subagent/tool-subagent-control/src/list-agents.ts',
+ list_subagent_models: 'packages/subagent/tool-subagent-control/src/list-models.ts',
send_message: 'packages/subagent/tool-subagent-control/src/index.ts',
})
})
@@ -95,7 +96,7 @@ describe('gen-tool-catalog collectToolCatalog', () => {
// agents surface this one package as both `subagent` and `subagent_fork`.
const catalog = await collectToolCatalog()
const subagent = catalog.find(entry => entry.pkg === '@deepseek-ai/dsh-tool-subagent')
- expect(subagent?.schemas.map(s => s.name)).toEqual(['list_subagent_models', 'subagent'])
+ expect(subagent?.schemas.map(s => s.name)).toEqual(['subagent'])
expect(subagent?.note).toMatch(/subagent_fork/)
})
})
diff --git a/packages/experimental/agent-team-profile/README.i18n.yaml b/packages/experimental/agent-team-profile/README.i18n.yaml
index cf0a7e983a..b5ef26cd35 100644
--- a/packages/experimental/agent-team-profile/README.i18n.yaml
+++ b/packages/experimental/agent-team-profile/README.i18n.yaml
@@ -24,8 +24,8 @@
en: f0e95e60095fc5cb
zh: 8c36603b423475d0
/deepseek-ai-dsh-experimental-agent-team-profile/understand-the-implementation:
- en: cac23b0774e00717
- zh: 4446c09b6525587a
+ en: 1134189d1362aca0
+ zh: 581357c648eb61f7
/deepseek-ai-dsh-experimental-agent-team-profile/further-exploration:
en: 2513c5cb830db597
zh: de3df83cb9fd2340
diff --git a/packages/experimental/agent-team-profile/README.md b/packages/experimental/agent-team-profile/README.md
index 08cde7a032..acc34eb419 100644
--- a/packages/experimental/agent-team-profile/README.md
+++ b/packages/experimental/agent-team-profile/README.md
@@ -58,7 +58,7 @@ In Web and Desktop conversations, the [Team UI](../client-ui-agent-team/README.m
Implementation internals — click to expand
-The package's runtime content is [`cordis.patch.yml`](cordis.patch.yml). Applied after `dsh-base`, the patch disables `tool-subagent-control`, `tool-subagent-list-agents`, `tool-subagent`, and `tool-subagent-fork`, and inserts the Team service, tools, and UI with explicit providers and limits. The UI plugin has an inert Host entry; only the Web Client loader mounts its browser entry, so headless needs no Web server.
+The package's runtime content is [`cordis.patch.yml`](cordis.patch.yml). Applied after `dsh-base`, the patch disables `tool-subagent-control`, `tool-subagent`, and `tool-subagent-fork`, and inserts the Team service, tools, and UI with explicit providers and limits. The UI plugin has an inert Host entry; only the Web Client loader mounts its browser entry, so headless needs no Web server.
| File | Role |
|---|---|
diff --git a/packages/experimental/agent-team-profile/README.zh.md b/packages/experimental/agent-team-profile/README.zh.md
index 96979fdf3d..bf93a85167 100644
--- a/packages/experimental/agent-team-profile/README.zh.md
+++ b/packages/experimental/agent-team-profile/README.zh.md
@@ -58,7 +58,7 @@ dsh plugin --profile web add @deepseek-ai/dsh-experimental-agent-team-profile
实现细节——点击展开
-本包的运行时内容是 [`cordis.patch.yml`](cordis.patch.yml)。在 `dsh-base` 之后应用时,patch 会禁用 `tool-subagent-control`、`tool-subagent-list-agents`、`tool-subagent` 和 `tool-subagent-fork`,并以显式 provider 和限制插入 Team 服务、工具和 UI 行。UI 插件的 Host 入口不执行逻辑;只有 Web 客户端加载器会挂载其浏览器入口,因此 headless 无需启动 Web 服务。
+本包的运行时内容是 [`cordis.patch.yml`](cordis.patch.yml)。在 `dsh-base` 之后应用时,patch 会禁用 `tool-subagent-control`、`tool-subagent` 和 `tool-subagent-fork`,并以显式 provider 和限制插入 Team 服务、工具和 UI 行。UI 插件的 Host 入口不执行逻辑;只有 Web 客户端加载器会挂载其浏览器入口,因此 headless 无需启动 Web 服务。
| 文件 | 职责 |
|---|---|
diff --git a/packages/experimental/agent-team-profile/cordis.patch.yml b/packages/experimental/agent-team-profile/cordis.patch.yml
index e75aae058a..4c5eb02879 100644
--- a/packages/experimental/agent-team-profile/cordis.patch.yml
+++ b/packages/experimental/agent-team-profile/cordis.patch.yml
@@ -4,9 +4,6 @@
- id: tool-subagent-control
disabled: true
-- id: tool-subagent-list-agents
- disabled: true
-
- id: tool-subagent
disabled: true
diff --git a/packages/experimental/agent-team-profile/tests/profile.spec.ts b/packages/experimental/agent-team-profile/tests/profile.spec.ts
index b75da63252..2ba789d94d 100644
--- a/packages/experimental/agent-team-profile/tests/profile.spec.ts
+++ b/packages/experimental/agent-team-profile/tests/profile.spec.ts
@@ -37,7 +37,6 @@ describe('Agent Teams profile bundle', () => {
insert?: { id?: string; name?: string; config?: Record }[]
}[]
expect(patches.find(patch => patch.id === 'tool-subagent-control')).toMatchObject({ disabled: true })
- expect(patches.find(patch => patch.id === 'tool-subagent-list-agents')).toMatchObject({ disabled: true })
expect(patches.find(patch => patch.id === 'tool-subagent')).toMatchObject({ disabled: true })
expect(patches.find(patch => patch.id === 'tool-subagent-fork')).toMatchObject({ disabled: true })
const inserted = patches.flatMap(patch => patch.insert ?? [])
diff --git a/packages/preset/agent-preset/skills/cordis-composition-reference/references/packages.md b/packages/preset/agent-preset/skills/cordis-composition-reference/references/packages.md
index 87b03eba27..81eb9e7e36 100644
--- a/packages/preset/agent-preset/skills/cordis-composition-reference/references/packages.md
+++ b/packages/preset/agent-preset/skills/cordis-composition-reference/references/packages.md
@@ -448,7 +448,7 @@ Every package below exports a Cordis plugin that a bundle patch can name in a Lo
| `@deepseek-ai/dsh-subagent-fork-in-process` | yes | In-process fork subagent backend: runs a child agent seeded with a prefix of the parent's log |
| `@deepseek-ai/dsh-subagent-spawn-in-process` | yes | In-process spawn subagent backend: runs a fresh child agent on ctx.agents |
| `@deepseek-ai/dsh-tool-subagent` | yes | Model-facing subagent delegation tool over the ctx.subagents seam |
-| `@deepseek-ai/dsh-tool-subagent-control` | no | Globally named send_message, interrupt_agent, and list_agents tools over ctx.subagents continuations |
+| `@deepseek-ai/dsh-tool-subagent-control` | no | Shared messaging, interruption, child discovery, and model discovery tools for subagents |
## subprocess
diff --git a/packages/subagent/subagent-dsh-sdk/package.json b/packages/subagent/subagent-dsh-sdk/package.json
index a913cfd1f8..a02590df92 100644
--- a/packages/subagent/subagent-dsh-sdk/package.json
+++ b/packages/subagent/subagent-dsh-sdk/package.json
@@ -59,6 +59,7 @@
"@deepseek-ai/dsh-subagent": "workspace:*",
"@deepseek-ai/dsh-subprocess": "workspace:*",
"@deepseek-ai/dsh-system-prompt": "workspace:*",
- "@deepseek-ai/dsh-tool-subagent": "workspace:*"
+ "@deepseek-ai/dsh-tool-subagent": "workspace:*",
+ "@deepseek-ai/dsh-tool-subagent-control": "workspace:*"
}
}
diff --git a/packages/subagent/subagent-dsh-sdk/tests/fixtures/loader/scoped-tool-subagent.ts b/packages/subagent/subagent-dsh-sdk/tests/fixtures/loader/scoped-tool-subagent.ts
index 01222778ee..bc0ec72f3c 100644
--- a/packages/subagent/subagent-dsh-sdk/tests/fixtures/loader/scoped-tool-subagent.ts
+++ b/packages/subagent/subagent-dsh-sdk/tests/fixtures/loader/scoped-tool-subagent.ts
@@ -3,7 +3,7 @@
import type { Context } from '@deepseek-ai/cordis'
import type { Agent } from '@deepseek-ai/dsh-agent'
import * as ToolSubagent from '@deepseek-ai/dsh-tool-subagent'
-import * as ListModels from '@deepseek-ai/dsh-tool-subagent/list-models'
+import * as ControlTools from '@deepseek-ai/dsh-tool-subagent-control'
import type { Config } from '@deepseek-ai/dsh-tool-subagent'
export const name = 'scoped-tool-subagent'
@@ -16,7 +16,7 @@ export const inject = ['agents', 'subagentModelSelection']
*/
export function apply(ctx: Context, config: Config): void {
const install = (agent: Agent): void => {
- agent.ctx.plugin(ListModels)
+ agent.ctx.plugin(ControlTools)
agent.ctx.inject(ToolSubagent.inject, (runtimeCtx) => {
return ToolSubagent.apply(runtimeCtx, {
provider: config.provider,
diff --git a/packages/subagent/subagent/README.i18n.yaml b/packages/subagent/subagent/README.i18n.yaml
index 5e077a955e..8d03e890d7 100644
--- a/packages/subagent/subagent/README.i18n.yaml
+++ b/packages/subagent/subagent/README.i18n.yaml
@@ -42,8 +42,8 @@
en: 74d91b364b23f88d
zh: 19cc558105efe8df
/deepseek-ai-dsh-subagent/understand-the-implementation/design-concept:
- en: ed526b6f34a3d6bf
- zh: 47a90717b89d4c79
+ en: 3d4dc2d38adfd509
+ zh: 4867480cb9d2e6a6
/deepseek-ai-dsh-subagent/understand-the-implementation/source-map:
en: 410b6215e3a29221
zh: d17d6ea102fe8f87
diff --git a/packages/subagent/subagent/README.md b/packages/subagent/subagent/README.md
index 93c21b5b88..56f459592f 100644
--- a/packages/subagent/subagent/README.md
+++ b/packages/subagent/subagent/README.md
@@ -89,6 +89,8 @@ This section explains how the service is built and where the observable behavior
- **Fulfillment is publication.** `startActivation()` returns only after the child is accepted and its handle can cancel that exact execution.
- **Trusted same-process values.** Requests, descriptors, and results are borrowed immutable; serialization and hostile-input validation belong at process and wire boundaries.
+The shared model-selection helpers in [`model-selection.ts`](src/model-selection.ts) validate exact allowed routes. [`model-selection-state.ts`](src/model-selection-state.ts) declares the durable policy event and its reference-counted Session projection; delegation, discovery, and Host settings consume the same definition.
+
### Source map
| File | Role |
diff --git a/packages/subagent/subagent/README.zh.md b/packages/subagent/subagent/README.zh.md
index 5e8553bac9..45a9a6b587 100644
--- a/packages/subagent/subagent/README.zh.md
+++ b/packages/subagent/subagent/README.zh.md
@@ -89,6 +89,8 @@ kind: "package-reference"
- **兑现即发布。** `startActivation()` 仅在子级已接受且句柄可取消该次执行后返回。
- **同进程值可信。** 请求、描述符与结果按不可变约定借用;序列化与不可信输入校验属于进程与协议边界。
+共享的模型选择辅助函数位于 [`model-selection.ts`](src/model-selection.ts),用于校验精确的允许路由。[`model-selection-state.ts`](src/model-selection-state.ts) 声明持久策略事件及其采用引用计数的 Session 投影;委派、查询和 Host 设置消费同一定义。
+
### 源码地图
| 文件 | 职责 |
diff --git a/packages/subagent/subagent/src/index.ts b/packages/subagent/subagent/src/index.ts
index 119cc26a6a..75f13873cb 100644
--- a/packages/subagent/subagent/src/index.ts
+++ b/packages/subagent/subagent/src/index.ts
@@ -77,6 +77,9 @@ import { subagentIdentityProjectionDefinition, subagentTimingProjectionDefinitio
import { subagentCatalogProjectionDefinition } from './catalog.ts'
import { deliverSubagentPrompt } from './internal.ts'
+export { AllowedModelRouteSchema, assertAllowedModelRoutes } from './model-selection.ts'
+export type { AllowedModelRoute, ModelSelectionPolicy } from './model-selection.ts'
+export { subagentModelSelectionPolicy, subagentModelSelectionProjectionDefinition } from './model-selection-state.ts'
export type {} from './catalog.ts'
export * from './out-of-process.ts'
export { AssistantOutputFold, finalAssistantOutput } from './assistant-output.ts'
diff --git a/packages/subagent/tool-subagent/src/model-selection-state.ts b/packages/subagent/subagent/src/model-selection-state.ts
similarity index 100%
rename from packages/subagent/tool-subagent/src/model-selection-state.ts
rename to packages/subagent/subagent/src/model-selection-state.ts
diff --git a/packages/subagent/subagent/src/model-selection.ts b/packages/subagent/subagent/src/model-selection.ts
new file mode 100644
index 0000000000..f463641f08
--- /dev/null
+++ b/packages/subagent/subagent/src/model-selection.ts
@@ -0,0 +1,59 @@
+/** Exact child model routes shared by settings, discovery, and delegation. */
+
+import z from '@deepseek-ai/schemastery'
+
+/** One exact child LLM route authorized by a user setting. */
+export interface AllowedModelRoute {
+ /** Registered LLM provider id. */
+ readonly provider: string
+ /** Provider-owned exact model id. */
+ readonly model: string
+}
+
+/** Schema shared by the Host setting and its deployment base. */
+export const AllowedModelRouteSchema: z = z.object({
+ provider: z.string().min(1).required(),
+ model: z.string().min(1).required(),
+})
+
+/** Exact routes authorized for one Session. */
+export interface ModelSelectionPolicy {
+ /** Exact provider/model routes authorized for explicit selection. */
+ readonly routes: readonly AllowedModelRoute[]
+}
+
+/**
+ * Stable identity for one provider/model pair.
+ * @param route - Exact provider/model route.
+ * @returns Opaque key for equality checks.
+ */
+function modelRouteKey(route: AllowedModelRoute): string {
+ return `${route.provider}\0${route.model}`
+}
+
+/**
+ * Reject malformed or duplicate route policy entries at a durable or configuration boundary.
+ * @param routes - Candidate exact routes to validate.
+ * @returns an assertion that the candidate is a validated exact-route array.
+ */
+export function assertAllowedModelRoutes(routes: unknown): asserts routes is readonly AllowedModelRoute[] {
+ if (!Array.isArray(routes)) {
+ throw new Error('subagent model selection requires an array of routes')
+ }
+ const seen = new Set()
+ const candidates: readonly unknown[] = routes
+ for (const candidate of candidates) {
+ if (typeof candidate !== 'object' || candidate === null || Array.isArray(candidate)
+ || !('provider' in candidate) || typeof candidate.provider !== 'string'
+ || !('model' in candidate) || typeof candidate.model !== 'string'
+ || candidate.provider.length === 0 || candidate.model.length === 0) {
+ throw new Error('subagent model selection requires non-empty provider and model ids')
+ }
+ const route = { provider: candidate.provider, model: candidate.model }
+ const key = modelRouteKey(route)
+ if (seen.has(key)) {
+ throw new Error(`subagent model selection repeats route "${route.provider}/${route.model}"`)
+ }
+ seen.add(key)
+ }
+}
diff --git a/packages/subagent/tool-subagent-control/README.i18n.yaml b/packages/subagent/tool-subagent-control/README.i18n.yaml
index 56654bd595..e2b6484667 100644
--- a/packages/subagent/tool-subagent-control/README.i18n.yaml
+++ b/packages/subagent/tool-subagent-control/README.i18n.yaml
@@ -3,23 +3,23 @@
# After editing either side, bring the other along and re-record with:
# pnpm run verify-translation-pairing --write packages/subagent/tool-subagent-control/README.md
/:
- en: 5413b8e52a0c8e3d
- zh: 9b6d0385209ff9bb
+ en: eac7213772a88e84
+ zh: 0305b73235add161
/deepseek-ai-dsh-tool-subagent-control:
en: 465d36925c792167
zh: 269cac314f638827
/deepseek-ai-dsh-tool-subagent-control/summary:
- en: 7464eb99b6f618eb
- zh: 8c7628c8e9f163ca
+ en: db828fcce4dbdde2
+ zh: f4682dcea3483828
/deepseek-ai-dsh-tool-subagent-control/table-of-contents:
en: d152484eb41ac6b4
zh: 09388d293f9be9cb
/deepseek-ai-dsh-tool-subagent-control/use-this-package:
- en: 27c5bbe682f0b72b
- zh: b16aeb2c43f3692e
+ en: 680f6a251c2ea47f
+ zh: 71a2281c66af456a
/deepseek-ai-dsh-tool-subagent-control/use-this-package/minimal-configuration:
- en: 4a52c81317ec9001
- zh: ebd9f1ba920da50a
+ en: c7ae169af808f043
+ zh: b90605149463ab2d
/deepseek-ai-dsh-tool-subagent-control/use-this-package/send-message:
en: d80bb1df2eb740b7
zh: e3203d9868a82910
@@ -42,11 +42,11 @@
en: 70e344022e6e535e
zh: 355488590648a82e
/deepseek-ai-dsh-tool-subagent-control/understand-the-implementation/source-map:
- en: 95f73146f8735ab1
- zh: 9c67e064c4000613
+ en: 659c1e0ecc19d697
+ zh: e4d15d79c2447c45
/deepseek-ai-dsh-tool-subagent-control/further-exploration:
- en: df2bf39d0ffffd43
- zh: 4cd02551f7433c90
+ en: 3d7732f704f4c6eb
+ zh: 824876825a8b9a71
/deepseek-ai-dsh-tool-subagent-control/model-experience:
en: 215e7ba838619b7b
zh: a311da3843709f90
@@ -54,8 +54,8 @@
en: e4c7376d4f29dbd5
zh: 6b7a9eaf69c9ea53
/deepseek-ai-dsh-tool-subagent-control/model-experience/tool-schema/what-the-model-sees:
- en: b32bc9bcb45a8c77
- zh: 4bd3eba1e8612da7
+ en: 78026848763dbb03
+ zh: 33de31dafe57771a
/deepseek-ai-dsh-tool-subagent-control/model-experience/tool-schema/token-effect:
en: db207dc8d5860684
zh: ad2663b4967fbca9
@@ -98,6 +98,18 @@
/deepseek-ai-dsh-tool-subagent-control/model-experience/listing-result/kv-cache-effect:
en: 4a629edb36a17e32
zh: 5a7539cfbf404c54
+/deepseek-ai-dsh-tool-subagent-control/model-experience/model-selection-and-discovery:
+ en: a4ca31b9cbacda6b
+ zh: 91ac3e0784a14697
+/deepseek-ai-dsh-tool-subagent-control/model-experience/model-selection-and-discovery/what-the-model-sees:
+ en: 1611ab853af93bf6
+ zh: 166e483b97e76125
+/deepseek-ai-dsh-tool-subagent-control/model-experience/model-selection-and-discovery/token-effect:
+ en: 659910ff18bda2c5
+ zh: 27cb2e1a844a91b3
+/deepseek-ai-dsh-tool-subagent-control/model-experience/model-selection-and-discovery/kv-cache-effect:
+ en: 7dc47a34d5574fbd
+ zh: bd7bd2a4da2f8ae2
/deepseek-ai-dsh-tool-subagent-control/known-limitations-and-deferred-work:
en: 31cd8a1934cf0093
zh: 2fd07e05c8e58e9a
diff --git a/packages/subagent/tool-subagent-control/README.md b/packages/subagent/tool-subagent-control/README.md
index 27507df343..56e19738bb 100644
--- a/packages/subagent/tool-subagent-control/README.md
+++ b/packages/subagent/tool-subagent-control/README.md
@@ -1,5 +1,5 @@
---
-description: "Global send_message, interrupt_agent, and list_agents tools for users and maintainers composing or debugging continuable-child control."
+description: "Shared messaging, interruption, child discovery, and model discovery tools for users and maintainers composing or debugging continuable-child control."
kind: "package-reference"
---
@@ -9,7 +9,7 @@ English | [中文](README.zh.md)
## Summary
-`dsh-tool-subagent-control` adds the global control tools for continuable children: `send_message` steers between a direct parent and child, `interrupt_agent` stops a child's current turn while keeping its inbox and descendants intact, and `list_agents` (from the separately loadable `list-agents` plugin) lists continuable children by durable id and label. Parents and continuable children inherit the same `send_message` definition and ordering, so model communication adds no child-only tool schema. No tool's presence decides whether a delegation tool starts continuable work.
+`dsh-tool-subagent-control` lets agents message and interrupt subagents, list continuable children, and inspect authorized child models. One plugin instance registers all four tools for a scope shared by multiple delegation backends. Parents and continuable children inherit the same messaging definition and ordering. Tool presence neither selects the delegation lifecycle nor grants permission to use another model.
## Table of Contents
@@ -25,11 +25,11 @@ English | [中文](README.zh.md)
## Use this package
-Mount this package in any composition with continuable children the model should message, interrupt, or list. The root plugin needs only the subagent service; the list tool is a separate plugin a deployment can omit.
+Mount this package once per tool scope. It requires `tools`, `subagents`, `agents`, and `sessionProjections`. The optional `llm` service supplies model discovery; an unavailable service causes discovery calls to fail without removing the tools.
### Minimal configuration
-Load the subagent service, a backend, the delegation tool, and this package. Adding the separate list plugin exposes all three tools:
+With the required services available, load the subagent service, a backend, the delegation tool, and this package to expose all four control and discovery tools:
```yaml
- name: '@deepseek-ai/dsh-subagent'
@@ -38,10 +38,9 @@ Load the subagent service, a backend, the delegation tool, and this package. Add
config:
provider: spawn
- name: '@deepseek-ai/dsh-tool-subagent-control'
-- name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
```
-This package takes no configuration: the root plugin provides `send_message` and `interrupt_agent`, and the list plugin provides `list_agents`.
+This package takes no configuration. Its main entry registers `send_message`, `interrupt_agent`, `list_agents`, and `list_subagent_models` together; existing tool restrictions can hide individual tools.
### send_message
@@ -81,8 +80,9 @@ The tool forwards its execution signal, which owns admission only until inbox ac
| File | Role |
|---|---|
-| [`src/index.ts`](src/index.ts) | `send_message` and `interrupt_agent` registration |
+| [`src/index.ts`](src/index.ts) | Shared registration of all four tools |
| [`src/list-agents.ts`](src/list-agents.ts) | `list_agents` registration: direct-child discovery and status refinement |
+| [`src/list-models.ts`](src/list-models.ts) | Model discovery using the shared Session authorization projection |
@@ -95,7 +95,7 @@ Read these pages when the package-level contract is not enough; they move from t
- [Subagent subsystem](../../../docs/subsystems/subagent.md) — continuable children, activations, inbox, interrupt, and follow-up authority.
- [dsh-tool-subagent](../tool-subagent/README.md) — the delegation tool that starts continuable children.
-- [Generated tool catalog](../../../docs/tool-catalog.md#deepseek-aidsh-tool-subagent-control) — the three tool schemas.
+- [Generated tool catalog](../../../docs/tool-catalog.md#deepseek-aidsh-tool-subagent-control) — the tool schemas.
-----
@@ -106,7 +106,7 @@ Read these pages when the package-level contract is not enough; they move from t
#### What the model sees
-The generated [schemas](../../../docs/tool-catalog.md#deepseek-aidsh-tool-subagent-control): `send_message` takes `agent_id` and `message`; `interrupt_agent` takes `agent_id`; `list_agents` takes no parameters.
+The generated [schemas](../../../docs/tool-catalog.md#deepseek-aidsh-tool-subagent-control): `send_message` takes `agent_id` and `message`; `interrupt_agent` takes `agent_id`; `list_agents` accepts an optional `scope`; `list_subagent_models` accepts optional `provider` and `model` ids.
#### Token effect
@@ -158,6 +158,20 @@ Grows linearly with the listed continuable children and diagnostics — reachabl
Append-only; each result follows the reusable request prefix.
+### Model selection and discovery
+
+#### What the model sees
+
+The `list_subagent_models` definition reads the calling Session’s route policy, falling back to the current parent route when no policy is recorded. Calls reject while the optional `ctx.llm` service is unavailable. With a recorded policy, provider model lists intersect the advertised catalog with the Session’s authorized routes. Without one, they resolve only the current parent model, even if the catalog omits it. The discovery tool’s own description instructs the model to query options before selecting a child route; omitting or filtering out discovery removes that guidance. Exact-model queries accept authorized ids absent from the catalog; unauthorized provider/model lookups fail before adapter access. Catalog or exact-model lookup failures and cancellation reject the call. Execution independently enforces the same policy.
+
+#### Token effect
+
+One fixed discovery schema is present wherever this package is mounted, regardless of the Session’s preference or delegation tools; the shipped Web, Desktop, headless, SDK, and ACP profiles include it. Route metadata enters the transcript only when the model calls the tool.
+
+#### KV Cache effect
+
+The schema is prefix-stable across adapter registration and catalog changes. Each discovery result is appended after the reusable prefix.
+
## Known Limitations and Deferred Work
diff --git a/packages/subagent/tool-subagent-control/README.zh.md b/packages/subagent/tool-subagent-control/README.zh.md
index 8033faf8b5..d80857fc50 100644
--- a/packages/subagent/tool-subagent-control/README.zh.md
+++ b/packages/subagent/tool-subagent-control/README.zh.md
@@ -1,5 +1,5 @@
---
-description: "供用户与维护者在组合或调试可继续子级控制功能时使用的全局 send_message、interrupt_agent 与 list_agents 工具。"
+description: "供用户与维护者在组合或调试可继续子级控制功能时使用的共享消息、中断、子级发现与模型查询工具。"
kind: "package-reference"
---
@@ -9,7 +9,7 @@ kind: "package-reference"
## 概述
-`dsh-tool-subagent-control` 为可继续子级添加全局控制工具:`send_message` 在直接父级与子级之间进行 steering(中途引导),`interrupt_agent` 停止子级当前轮次但保留其收件箱与后代,`list_agents`(来自可单独加载的 `list-agents` 插件)按持久化 ID 与标签列出可继续子级。父级与可继续子级继承相同的 `send_message` 定义和顺序,因此模型通信不会增加子级专属工具 schema。是否加载这些工具不会决定委派工具是否启动可继续工作。
+`dsh-tool-subagent-control` 让 agent 向子智能体发消息、中断子智能体、列出可继续子级并查询已授权的子级模型。一个插件实例为多个委派后端共享的作用域注册全部四个工具。父级与可继续子级继承相同的消息定义和顺序。工具存在既不选择委派生命周期,也不授予使用其他模型的权限。
## 目录
@@ -25,11 +25,11 @@ kind: "package-reference"
## 使用本包
-在模型需要对可继续子级发消息、中断或列出的任何组合中挂载本包。根插件只需要 subagent 服务;列表工具是独立插件,部署方可以省略。
+每个工具作用域挂载本包一次。它要求 `tools`、`subagents`、`agents` 和 `sessionProjections`。可选的 `llm` 服务提供模型查询;该服务不可用时,查询调用失败,但工具仍然存在。
### 最小配置
-先加载 subagent 服务、一个后端、委派工具与本包。加上独立的列表插件即可公开全部三个工具:
+在所需服务可用后,加载 subagent 服务、一个后端、委派工具与本包,即可公开全部四个控制和发现工具:
```yaml
- name: '@deepseek-ai/dsh-subagent'
@@ -38,10 +38,9 @@ kind: "package-reference"
config:
provider: spawn
- name: '@deepseek-ai/dsh-tool-subagent-control'
-- name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
```
-本包不接收任何配置:根插件提供 `send_message` 与 `interrupt_agent`,列表插件提供 `list_agents`。
+本包不接收任何配置。主入口一起注册 `send_message`、`interrupt_agent`、`list_agents` 和 `list_subagent_models`;现有工具限制可以隐藏单个工具。
### send_message
@@ -81,8 +80,9 @@ kind: "package-reference"
| 文件 | 职责 |
|---|---|
-| [`src/index.ts`](src/index.ts) | `send_message` 与 `interrupt_agent` 注册 |
+| [`src/index.ts`](src/index.ts) | 统一注册全部四个工具 |
| [`src/list-agents.ts`](src/list-agents.ts) | `list_agents` 注册:直接子级发现与状态细化 |
+| [`src/list-models.ts`](src/list-models.ts) | 使用共享 Session 授权投影进行模型查询 |
@@ -95,7 +95,7 @@ kind: "package-reference"
- [Subagent 子系统](../../../docs/subsystems/subagent.zh.md)——可继续子级、Activation、inbox、中断与后续消息权限。
- [dsh-tool-subagent](../tool-subagent/README.zh.md)——启动可继续子级的委派工具。
-- [生成工具目录](../../../docs/tool-catalog.zh.md#deepseek-aidsh-tool-subagent-control)——三个工具的 schema。
+- [生成工具目录](../../../docs/tool-catalog.zh.md#deepseek-aidsh-tool-subagent-control)——工具 schema。
-----
@@ -106,7 +106,7 @@ kind: "package-reference"
#### 模型看到什么
-已生成的 [schema](../../../docs/tool-catalog.zh.md#deepseek-aidsh-tool-subagent-control):`send_message` 接受 `agent_id` 与 `message`;`interrupt_agent` 接受 `agent_id`;`list_agents` 不接受参数。
+已生成的 [schema](../../../docs/tool-catalog.zh.md#deepseek-aidsh-tool-subagent-control):`send_message` 接受 `agent_id` 与 `message`;`interrupt_agent` 接受 `agent_id`;`list_agents` 接受可选的 `scope`;`list_subagent_models` 接受可选的 `provider` 和 `model` ID。
#### Token 影响
@@ -158,6 +158,20 @@ kind: "package-reference"
仅追加;每个结果都位于可复用请求前缀之后。
+### 模型选择与发现
+
+#### 模型看到什么
+
+`list_subagent_models` 定义读取调用 Session 的路由策略,没有已记录策略时使用当前父级路由。可选的 `ctx.llm` 服务不可用时,调用会被拒绝。有已记录策略时,提供方模型列表取公布目录与 Session 授权路由的交集。没有策略时,只解析当前父级模型,即使目录未列出它。发现工具自身的描述要求模型在选择子级路由前查询选项;未挂载或过滤掉发现工具时,这段指导也不会出现。精确模型查询允许已授权但目录未列出的 ID;未授权的提供方/模型查询会在访问适配器前失败。目录或精确模型查询失败以及取消都会使调用被拒绝。执行过程独立强制同一策略。
+
+#### Token 影响
+
+挂载本包的组合中存在一份固定发现 schema,不受 Session 偏好或委派工具影响;随附 Web、Desktop、headless、SDK 和 ACP profile 均包含它。只有模型调用工具时,路由元数据才进入 transcript。
+
+#### KV Cache 影响
+
+适配器注册与目录变化不会改变 schema 前缀。每个发现结果都追加在可复用前缀之后。
+
## 已知限制与延期工作
diff --git a/packages/subagent/tool-subagent-control/locale/list-agents/en.json b/packages/subagent/tool-subagent-control/locale/list-agents/en.json
deleted file mode 100644
index 5825b8ed52..0000000000
--- a/packages/subagent/tool-subagent-control/locale/list-agents/en.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "meta": {
- "title": "tool-subagent-control/list-agents"
- }
-}
diff --git a/packages/subagent/tool-subagent-control/locale/list-agents/zh.json b/packages/subagent/tool-subagent-control/locale/list-agents/zh.json
deleted file mode 100644
index 57cb7a436e..0000000000
--- a/packages/subagent/tool-subagent-control/locale/list-agents/zh.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "meta": {
- "title": "子智能体列表工具"
- }
-}
diff --git a/packages/subagent/tool-subagent-control/package.json b/packages/subagent/tool-subagent-control/package.json
index 21119a5312..60b3b5767f 100644
--- a/packages/subagent/tool-subagent-control/package.json
+++ b/packages/subagent/tool-subagent-control/package.json
@@ -1,6 +1,6 @@
{
"name": "@deepseek-ai/dsh-tool-subagent-control",
- "description": "Globally named send_message, interrupt_agent, and list_agents tools over ctx.subagents continuations",
+ "description": "Shared messaging, interruption, child discovery, and model discovery tools for subagents",
"version": "0.2.1-rc.1",
"publishConfig": {
"access": "public"
@@ -18,20 +18,13 @@
"types": "./lib/types/index.d.ts",
"default": "./lib/index.js"
},
- "./list-agents": {
- "types": "./lib/types/list-agents.d.ts",
- "default": "./lib/types/list-agents.js"
- },
"./src/*": "./src/*",
"./package.json": "./package.json",
- "./locale/*.json": "./locale/*.json",
- "./list-agents/locale/*.json": "./locale/list-agents/*.json"
+ "./locale/*.json": "./locale/*.json"
},
"files": [
"locale/*.json",
- "locale/list-agents/*.json",
"lib/index.js",
- "lib/types/**/*.js",
"lib/types/**/*.d.ts"
],
"license": "MIT",
@@ -40,7 +33,9 @@
"@deepseek-ai/dsh-llm": "workspace:*",
"@deepseek-ai/dsh-session": "workspace:*",
"@deepseek-ai/dsh-subagent": "workspace:*",
- "@deepseek-ai/dsh-tools": "workspace:*"
+ "@deepseek-ai/dsh-tools": "workspace:*",
+ "@deepseek-ai/dsh-agent": "workspace:*",
+ "@deepseek-ai/dsh-session-projection": "workspace:*"
},
"devDependencies": {
"@deepseek-ai/cordis": "workspace:~",
@@ -56,7 +51,8 @@
"@deepseek-ai/dsh-subagent": "workspace:*",
"@deepseek-ai/dsh-subagent-fork-in-process": "workspace:*",
"@deepseek-ai/dsh-subagent-spawn-in-process": "workspace:*",
- "@deepseek-ai/dsh-tools": "workspace:*"
+ "@deepseek-ai/dsh-tools": "workspace:*",
+ "@deepseek-ai/dsh-tool-subagent": "workspace:*"
},
"dependencies": {
"@deepseek-ai/dsh-brand": "workspace:*",
diff --git a/packages/subagent/tool-subagent-control/src/index.ts b/packages/subagent/tool-subagent-control/src/index.ts
index f56227fe9d..619fc49f0e 100644
--- a/packages/subagent/tool-subagent-control/src/index.ts
+++ b/packages/subagent/tool-subagent-control/src/index.ts
@@ -1,7 +1,6 @@
/**
- * The globally named `send_message` and `interrupt_agent` tools: thin
- * model-facing adapters over `ctx.subagents.sendMessage()` and
- * `ctx.subagents.interrupt()`. They perform no lifecycle routing of their own —
+ * Shared messaging, interruption, child discovery, and model discovery tools.
+ * They perform no lifecycle routing of their own —
* residency, cold resume, and interrupt authorization belong to the subagent
* service — and they live apart from the provider-bound
* `@deepseek-ai/dsh-tool-subagent` instances so multiple delegation tools share
@@ -16,15 +15,19 @@ import type { ContentBlock } from '@deepseek-ai/dsh-llm'
import type { SessionId } from '@deepseek-ai/dsh-session'
import type {} from '@deepseek-ai/dsh-subagent'
import { markAdjacentAgentSendMessageTool } from '@deepseek-ai/dsh-subagent/internal'
+import { registerListAgents } from './list-agents.ts'
+import { registerListSubagentModels } from './list-models.ts'
export const name = 'tool-subagent-control'
-export const inject = ['tools', 'subagents']
+export const inject = ['tools', 'subagents', 'agents', 'sessionProjections']
/**
- * Register the `send_message` and `interrupt_agent` tools.
- * @param ctx - context carrying the tool registry and subagent service.
+ * Register the shared subagent control and discovery tools.
+ * @param ctx - context carrying tools, subagents, live Agents, and Session projections.
*/
export function apply(ctx: Context): void {
+ registerListAgents(ctx)
+ registerListSubagentModels(ctx)
ctx.tools.register(markAdjacentAgentSendMessageTool(defineTool({
name: 'send_message',
description:
diff --git a/packages/subagent/tool-subagent-control/src/list-agents.ts b/packages/subagent/tool-subagent-control/src/list-agents.ts
index bfa7c67e84..4688d49b85 100644
--- a/packages/subagent/tool-subagent-control/src/list-agents.ts
+++ b/packages/subagent/tool-subagent-control/src/list-agents.ts
@@ -1,10 +1,8 @@
/**
* The globally named `list_agents` tool: a thin model-facing adapter over
* the continuable projection of `ctx.subagents.listChildren()` and, for the
- * `descendants` scope, `ctx.subagents.listDescendants()`. It stays separately
- * loadable from the root `send_message` plugin so a deployment can register
- * continuation delivery without exposing discovery.
- * @module @deepseek-ai/dsh-tool-subagent-control/list-agents
+ * `descendants` scope, `ctx.subagents.listDescendants()`. The control plugin owns
+ * registration and disposal alongside messaging and model discovery.
*/
import type { Context } from '@deepseek-ai/cordis'
@@ -16,9 +14,6 @@ import type {
} from '@deepseek-ai/dsh-subagent'
import { assertNever } from '@deepseek-ai/dsh-util-values'
-export const name = 'tool-subagent-list-agents'
-export const inject = ['tools', 'subagents', 'agents']
-
type ListAgentsScope = 'children' | 'descendants'
interface ListAgentsRequest {
@@ -82,7 +77,7 @@ function project(
* Register the `list_agents` tool.
* @param ctx - context carrying the tool registry, subagent service, and live Agent registry.
*/
-export function apply(ctx: Context): void {
+export function registerListAgents(ctx: Context): void {
ctx.tools.register(defineTool({
name: 'list_agents',
description:
diff --git a/packages/subagent/tool-subagent/src/list-models.ts b/packages/subagent/tool-subagent-control/src/list-models.ts
similarity index 94%
rename from packages/subagent/tool-subagent/src/list-models.ts
rename to packages/subagent/tool-subagent-control/src/list-models.ts
index f220c85e32..26ceb65df9 100644
--- a/packages/subagent/tool-subagent/src/list-models.ts
+++ b/packages/subagent/tool-subagent-control/src/list-models.ts
@@ -6,11 +6,8 @@ import type { LlmProviderInfo } from '@deepseek-ai/dsh-llm'
import { defineTool } from '@deepseek-ai/dsh-tools'
import { parentAgentOptionsForDelegation } from '@deepseek-ai/dsh-subagent'
import type { ToolRunContext } from '@deepseek-ai/dsh-tools'
-import type { ModelSelectionPolicy } from './model-selection.ts'
-import { subagentModelSelectionPolicy, subagentModelSelectionProjectionDefinition } from './model-selection-state.ts'
-
-export const name = 'tool-subagent-list-models'
-export const inject = ['tools', 'sessionProjections']
+import type { ModelSelectionPolicy } from '@deepseek-ai/dsh-subagent'
+import { subagentModelSelectionPolicy, subagentModelSelectionProjectionDefinition } from '@deepseek-ai/dsh-subagent'
interface ListSubagentModelsRequest {
readonly provider?: string
@@ -99,10 +96,10 @@ async function listSubagentModels(
}
/**
- * Register independent discovery of the calling Session’s authorized child models.
+ * Register discovery of the calling Session’s authorized child models.
* @param ctx - Context carrying the tool registry and Session projections.
*/
-export function apply(ctx: Context): void {
+export function registerListSubagentModels(ctx: Context): void {
ctx.sessionProjections.register(subagentModelSelectionProjectionDefinition)
ctx.tools.register(defineTool({
name: 'list_subagent_models',
diff --git a/packages/subagent/tool-subagent-control/tests/list-agents.spec.ts b/packages/subagent/tool-subagent-control/tests/list-agents.spec.ts
index 7e4a21399a..7ca352a1ce 100644
--- a/packages/subagent/tool-subagent-control/tests/list-agents.spec.ts
+++ b/packages/subagent/tool-subagent-control/tests/list-agents.spec.ts
@@ -15,7 +15,7 @@ import * as SubagentSpawn from '@deepseek-ai/dsh-subagent-spawn-in-process'
import type { GenerateOptions, StreamChunk } from '@deepseek-ai/dsh-llm'
import { LlmAdapter } from '@deepseek-ai/dsh-llm'
import { MockAdapter, textResponse } from '../../../core/agent-loop/tests/mock-adapter.ts'
-import * as tool from '../src/list-agents.ts'
+import * as tool from '../src/index.ts'
import { parkParent } from './park-parent.ts'
import { TestSessionQuery } from './test-session-query.ts'
@@ -107,7 +107,7 @@ async function waitNoActivation(ctx: Context, childId: SessionId): Promise
}, { timeout: 5_000 })
}
-describe('dsh-tool-subagent-control/list-agents', () => {
+describe('list_agents', () => {
it('lists a settled caller-delivery local child in both scopes', async () => {
const { ctx, parent } = await setup([textResponse('private result')])
const started = await ctx.subagents.startActivation({
@@ -283,8 +283,8 @@ describe('dsh-tool-subagent-control/list-agents', () => {
it('has the namespace-plugin export shape', () => {
expect('default' in tool).toBe(false)
- expect(tool.name).toBe('tool-subagent-list-agents')
- expect(tool.inject).toEqual(['tools', 'subagents', 'agents'])
+ expect(tool.name).toBe('tool-subagent-control')
+ expect(tool.inject).toEqual(['tools', 'subagents', 'agents', 'sessionProjections'])
expect(typeof tool.apply).toBe('function')
})
diff --git a/packages/subagent/tool-subagent/tests/list-models.spec.ts b/packages/subagent/tool-subagent-control/tests/list-models.spec.ts
similarity index 90%
rename from packages/subagent/tool-subagent/tests/list-models.spec.ts
rename to packages/subagent/tool-subagent-control/tests/list-models.spec.ts
index ecb317fee8..63221a11b7 100644
--- a/packages/subagent/tool-subagent/tests/list-models.spec.ts
+++ b/packages/subagent/tool-subagent-control/tests/list-models.spec.ts
@@ -1,3 +1,4 @@
+import AgentRegistry from '@deepseek-ai/dsh-agent'
import { mountWorkingDirectoryFixture } from '../../subagent/tests/working-directory-fixture.ts'
import { describe, expect, it, vi } from 'vitest'
import { Context } from '@deepseek-ai/cordis'
@@ -17,13 +18,13 @@ import SystemPrompt from '@deepseek-ai/dsh-system-prompt'
import SubagentRuntime from '@deepseek-ai/dsh-subagent'
import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection'
import { SessionId } from '@deepseek-ai/dsh-session'
-import * as tool from '../src/index.ts'
-import * as ListModels from '../src/list-models.ts'
+import * as tool from '@deepseek-ai/dsh-tool-subagent'
+import * as ControlTools from '@deepseek-ai/dsh-tool-subagent-control'
import AgentLoop from '@deepseek-ai/dsh-agent-loop'
import type { Agent } from '@deepseek-ai/dsh-agent'
import { mountAgentLoopTestDependencies } from '@deepseek-ai/dsh-agent-loop-testkit'
-import SubagentModelSelectionConfig from '../src/model-selection-settings.ts'
-import { modelSelectionSetupAgent, ownContext, setup, testToolSignal, text } from './harness.ts'
+import SubagentModelSelectionConfig from '@deepseek-ai/dsh-tool-subagent/model-selection-settings'
+import { modelSelectionSetupAgent, ownContext, setup, testToolSignal, text } from '../../tool-subagent/tests/harness.ts'
class CatalogAdapter extends LlmAdapter {
constructor(private readonly empty = false) {
@@ -76,7 +77,9 @@ async function setupListTool(routes = [
await mountAgentLoopTestDependencies(ctx)
await ctx.plugin(AgentLoop, { agents: [] })
await ctx.plugin(SubagentModelSelectionConfig, { enabled: true, allowedModels: routes })
- await ctx.plugin(ListModels)
+ await mountWorkingDirectoryFixture(ctx)
+ await ctx.plugin(SubagentRuntime)
+ await ctx.plugin(ControlTools)
const { agent } = await ctx.agents.create({ sessionId: SessionId('discovery-parent') })
callingAgents.set(ctx, agent)
return ctx
@@ -103,7 +106,7 @@ function call(ctx: Context, args: unknown, signal = testToolSignal) {
}
describe('list_subagent_models', () => {
- it('is mounted independently of delegation tools', async () => {
+ it('registers and disposes all four shared tools independently of delegation tools', async () => {
const ctx = ownContext(new Context())
await ctx.plugin(SessionProjectionRegistry)
await ctx.plugin(LlmRuntime)
@@ -113,10 +116,15 @@ describe('list_subagent_models', () => {
await ctx.plugin(SubagentRuntime)
await ctx.plugin(tool, { provider: 'unused' })
expect(ctx.tools.get('list_subagent_models')).toBeUndefined()
- const discovery = await ctx.plugin(ListModels)
- expect(ctx.tools.get('list_subagent_models')).toBeDefined()
+ await ctx.plugin(AgentRegistry)
+ const discovery = await ctx.plugin(ControlTools)
+ const names = ['send_message', 'interrupt_agent', 'list_agents', 'list_subagent_models']
+ for (const name of names) expect(ctx.tools.schemas().filter(schema => schema.name === name)).toHaveLength(1)
await discovery.dispose()
- expect(ctx.tools.get('list_subagent_models')).toBeUndefined()
+ for (const name of names) expect(ctx.tools.get(name)).toBeUndefined()
+ const reloaded = await ctx.plugin(ControlTools)
+ for (const name of names) expect(ctx.tools.schemas().filter(schema => schema.name === name)).toHaveLength(1)
+ await reloaded.dispose()
await ctx.fiber.dispose()
})
@@ -125,7 +133,10 @@ describe('list_subagent_models', () => {
await ctx.plugin(SessionProjectionRegistry)
await ctx.plugin(SystemPrompt)
await ctx.plugin(ToolRuntime)
- await ctx.plugin(ListModels)
+ await ctx.plugin(AgentRegistry)
+ await mountWorkingDirectoryFixture(ctx)
+ await ctx.plugin(SubagentRuntime)
+ await ctx.plugin(ControlTools)
expect(text(await call(ctx, {}))).toContain('requires a calling agent')
await ctx.fiber.dispose()
@@ -139,7 +150,7 @@ describe('list_subagent_models', () => {
expect(text(result)).toContain('without a parent provider and model')
})
- it('reads the recorded Session allowlist through the independent discovery definition', async () => {
+ it('reads the recorded Session allowlist through the shared control plugin', async () => {
const ctx = await setup({ provider: 'mock', withModelSelection: true })
ctx.llm.registerAdapter(['alpha', 'secret'], new CatalogAdapter())
const result = await ctx.tools.execute({
@@ -156,7 +167,10 @@ describe('list_subagent_models', () => {
await ctx.plugin(SessionProjectionRegistry)
await ctx.plugin(SystemPrompt)
await ctx.plugin(ToolRuntime)
- await ctx.plugin(ListModels)
+ await ctx.plugin(AgentRegistry)
+ await mountWorkingDirectoryFixture(ctx)
+ await ctx.plugin(SubagentRuntime)
+ await ctx.plugin(ControlTools)
callingAgents.set(ctx, callingAgents.get(parent)!)
expect(ctx.tools.get('list_subagent_models')).toBeDefined()
const result = await call(ctx, {})
diff --git a/packages/subagent/tool-subagent-control/tests/tool-subagent-control.spec.ts b/packages/subagent/tool-subagent-control/tests/tool-subagent-control.spec.ts
index 50bb2431e7..fb161af8a0 100644
--- a/packages/subagent/tool-subagent-control/tests/tool-subagent-control.spec.ts
+++ b/packages/subagent/tool-subagent-control/tests/tool-subagent-control.spec.ts
@@ -354,7 +354,7 @@ describe('dsh-tool-subagent-control', () => {
it('has the namespace-plugin export shape (no stray default)', () => {
expect('default' in tool).toBe(false)
expect(tool.name).toBe('tool-subagent-control')
- expect(tool.inject).toEqual(['tools', 'subagents'])
+ expect(tool.inject).toEqual(['tools', 'subagents', 'agents', 'sessionProjections'])
expect(typeof tool.apply).toBe('function')
})
})
diff --git a/packages/subagent/tool-subagent-control/tsconfig.json b/packages/subagent/tool-subagent-control/tsconfig.json
index e95a276e60..0aeb745689 100644
--- a/packages/subagent/tool-subagent-control/tsconfig.json
+++ b/packages/subagent/tool-subagent-control/tsconfig.json
@@ -25,6 +25,12 @@
},
{
"path": "../subagent"
+ },
+ {
+ "path": "../../core/agent"
+ },
+ {
+ "path": "../../session/session-projection"
}
]
}
diff --git a/packages/subagent/tool-subagent/README.i18n.yaml b/packages/subagent/tool-subagent/README.i18n.yaml
index 1290c018fe..6a2672367f 100644
--- a/packages/subagent/tool-subagent/README.i18n.yaml
+++ b/packages/subagent/tool-subagent/README.i18n.yaml
@@ -27,8 +27,8 @@
en: 1950ef92bab0f46e
zh: 593f5f64ed9b5631
/deepseek-ai-dsh-tool-subagent/use-this-package/selecting-a-child-llm:
- en: a13c6fe5ac74be17
- zh: 3e06bb4e9662a263
+ en: f1dcf7ab2de375d1
+ zh: 2199c73430b40e36
/deepseek-ai-dsh-tool-subagent/understand-the-implementation:
en: 6ce5f749256a7e6c
zh: a4f2adb04a70d9cf
@@ -45,8 +45,8 @@
en: 1733728ac5aa6bb0
zh: 341ffc6e21a289af
/deepseek-ai-dsh-tool-subagent/understand-the-implementation/source-map:
- en: ce5147d9e1b2849c
- zh: 67a707f05b2b7dc5
+ en: 6ec9a271812f18be
+ zh: 3b2a46b05374a259
/deepseek-ai-dsh-tool-subagent/further-exploration:
en: fa3c9a967b636afb
zh: a9ce930a9766d5cb
@@ -65,18 +65,6 @@
/deepseek-ai-dsh-tool-subagent/model-experience/tool-schema/kv-cache-effect:
en: 5697c49cb84fb2a4
zh: b2b8464d3cbabfa5
-/deepseek-ai-dsh-tool-subagent/model-experience/model-selection-and-discovery:
- en: a4ca31b9cbacda6b
- zh: 91ac3e0784a14697
-/deepseek-ai-dsh-tool-subagent/model-experience/model-selection-and-discovery/what-the-model-sees:
- en: 9cf8be0502db31dd
- zh: 16eebce205f12364
-/deepseek-ai-dsh-tool-subagent/model-experience/model-selection-and-discovery/token-effect:
- en: 4fa61dc9a52259a2
- zh: bc51ac3b1a1cc6ad
-/deepseek-ai-dsh-tool-subagent/model-experience/model-selection-and-discovery/kv-cache-effect:
- en: 7dc47a34d5574fbd
- zh: bd7bd2a4da2f8ae2
/deepseek-ai-dsh-tool-subagent/model-experience/system-prompt:
en: cf78b9dd5596495f
zh: bd44560f8c2435e8
diff --git a/packages/subagent/tool-subagent/README.md b/packages/subagent/tool-subagent/README.md
index db894f0a6c..34d2f95dae 100644
--- a/packages/subagent/tool-subagent/README.md
+++ b/packages/subagent/tool-subagent/README.md
@@ -73,7 +73,7 @@ Compose persona and tools in the [preset plugin list](../../preset/agent-preset-
### Selecting a child LLM
-Set `modelSelection: true` to expose optional `provider`, `model`, and `reasoning_effort` fields; instances without it reject selection fields. Mount `@deepseek-ai/dsh-tool-subagent/list-models` independently to expose `list_subagent_models`. Web and Desktop presets mount discovery by default, enable route fields for spawn, and leave them disabled for fork. The Host’s `/model-selection-settings` service samples the user preference during Agent creation, independently of tool installation. When enabled, its exact route list is recorded in each fresh top-level Session, inherited by child Sessions, and preserved on restore; later settings edits affect only new Sessions. Without a recorded Session policy, discovery and explicit selection permit only the parent Agent’s current effective provider/model and its supported efforts. Route fields require a backend that advertises `agentOptions`; in-process Spawn and Fork and DSH SDK qualify, while ACP, Codex, and Claude Code fail the mount.
+Set `modelSelection: true` to expose optional `provider`, `model`, and `reasoning_effort` fields; instances without it reject selection fields. Mount [subagent control tools](../tool-subagent-control/README.md) once to expose model discovery alongside messaging, interruption, and child listing. Web and Desktop presets enable route fields for spawn and leave them disabled for fork. The Host’s `/model-selection-settings` service samples the user preference during Agent creation, independently of tool installation. When enabled, its exact route list is recorded in each fresh top-level Session, inherited by child Sessions, and preserved on restore; later settings edits affect only new Sessions. Without a recorded Session policy, discovery and explicit selection permit only the parent Agent’s current effective provider/model and its supported efforts. Route fields require a backend that advertises `agentOptions`; in-process Spawn and Fork and DSH SDK qualify, while ACP, Codex, and Claude Code fail the mount.
A call supplies `provider` and `model` together, or supplies only an effort when configured, parent, or provider-owned defaults provide the route. Static `provider.agentRouteDefaults`, when present, form the provider/model baseline; tool configuration and model fields overlay it before route-aware effort merging and exact-route preflight. Providers without these defaults use compatible values from the parent's latest logged request, then the parent's creation options before its first request, while retaining the configured `maxTokens`. Changing the route without an explicit effort clears the inherited route-owned effort, so the selected model resolves its default. The live LLM adapter validates the effective route before child creation. Catalog membership remains advisory, so a model can use an unlisted id when its adapter accepts it.
@@ -111,8 +111,6 @@ The tool's description derives from `provider.inheritsParentContext`: a fresh ch
| [`src/preset-selection.ts`](src/preset-selection.ts) | Configured preset validation, model allowlist, and description guidance |
| [`src/model-selection.ts`](src/model-selection.ts) | Request/config merge and live LLM route preflight |
| [`src/model-selection-settings.ts`](src/model-selection-settings.ts) | Host-owned opt-in setting sampled for new Sessions |
-| [`src/model-selection-state.ts`](src/model-selection-state.ts) | Session event that records and inherits the sampled decision |
-| [`src/list-models.ts`](src/list-models.ts) | `list_subagent_models` runtime discovery tool |
@@ -148,20 +146,6 @@ Fixed schema cost per parent request; `modelSelection` adds three optional route
Prefix-stable while provider instances and their configuration are unchanged. Adapter catalog changes do not alter the definition. Shipped fork tools omit model-selection fields to preserve reuse of the inherited parent prefix. A custom fork tool may enable selection; changing its route can prevent prefix reuse.
-### Model selection and discovery
-
-#### What the model sees
-
-The independent `list_subagent_models` definition reads the calling Session’s route policy, falling back to the current parent route when no policy is recorded. Calls reject while the optional `ctx.llm` service is unavailable. With a recorded policy, provider model lists intersect the advertised catalog with the Session’s authorized routes. Without one, they resolve only the current parent model, even if the catalog omits it. The discovery tool’s own description instructs the model to query options before selecting a child route; omitting or filtering out discovery removes that guidance. Exact-model queries accept authorized ids absent from the catalog; unauthorized provider/model lookups fail before adapter access. Catalog or exact-model lookup failures and cancellation reject the call. Execution independently enforces the same policy.
-
-#### Token effect
-
-One fixed discovery schema is present wherever `/list-models` is mounted, regardless of the Session’s preference or delegation tools; the shipped Web and Desktop presets include it, while headless and SDK profiles do not. Route metadata enters the transcript only when the model calls the tool.
-
-#### KV Cache effect
-
-The schema is prefix-stable across adapter registration and catalog changes. Each discovery result is appended after the reusable prefix.
-
### System prompt
#### What the model sees
diff --git a/packages/subagent/tool-subagent/README.zh.md b/packages/subagent/tool-subagent/README.zh.md
index ba7e611e21..4c87522503 100644
--- a/packages/subagent/tool-subagent/README.zh.md
+++ b/packages/subagent/tool-subagent/README.zh.md
@@ -73,7 +73,7 @@ kind: "package-reference"
### 选择子级 LLM
-设置 `modelSelection: true` 后,该实例公开可选的 `provider`、`model` 和 `reasoning_effort` 字段;未设置的实例拒绝选择字段。独立挂载 `@deepseek-ai/dsh-tool-subagent/list-models` 以公开 `list_subagent_models`。Web 与 Desktop preset 默认挂载发现工具,为 spawn 启用路由字段,为 fork 保持关闭。Host 的 `/model-selection-settings` 服务在 Agent 创建时读取用户偏好,与工具安装无关。启用时,精确路由列表记录在每个新顶层 Session 中,由子 Session 继承,并在恢复时保留;之后的设置编辑只影响新 Session。没有已记录 Session 策略时,发现和显式选择只允许父 Agent 当前生效的 provider/model 及其支持的强度。路由字段要求后端公布 `agentOptions`;进程内 Spawn、Fork 和 DSH SDK 满足条件,ACP、Codex 和 Claude Code 会使挂载失败。
+设置 `modelSelection: true` 后,该实例公开可选的 `provider`、`model` 和 `reasoning_effort` 字段;未设置的实例拒绝选择字段。挂载一次[子智能体控制工具](../tool-subagent-control/README.zh.md),一起公开模型查询、消息、中断和子级列表。Web 与 Desktop preset 为 spawn 启用路由字段,为 fork 保持关闭。Host 的 `/model-selection-settings` 服务在 Agent 创建时读取用户偏好,与工具安装无关。启用时,精确路由列表记录在每个新顶层 Session 中,由子 Session 继承,并在恢复时保留;之后的设置编辑只影响新 Session。没有已记录 Session 策略时,发现和显式选择只允许父 Agent 当前生效的 provider/model 及其支持的强度。路由字段要求后端公布 `agentOptions`;进程内 Spawn、Fork 和 DSH SDK 满足条件,ACP、Codex 和 Claude Code 会使挂载失败。
一次调用需同时提供 `provider` 与 `model`;当配置值、父 agent 值或提供方持有的默认值能提供路由时,也可只提供推理等级。静态的 `provider.agentRouteDefaults` 在存在时构成提供方/模型基线;工具配置与模型字段会在路由相关强度合并和确切路由预检前覆盖它。没有这些默认值的提供方会使用父 agent 最新已记录请求中的兼容值,再使用父级首次请求前的创建选项,并保留配置的 `maxTokens`。更改路由但未显式提供推理等级时,会清除继承的路由自有等级,使所选模型解析自己的默认值。实时 LLM 适配器在创建子 agent 前校验有效路由。目录成员资格只提供建议,因此适配器接受时,模型可以使用未列出的 id。
@@ -111,8 +111,6 @@ kind: "package-reference"
| [`src/preset-selection.ts`](src/preset-selection.ts) | 配置的 preset 校验、模型白名单与描述引导 |
| [`src/model-selection.ts`](src/model-selection.ts) | 请求/配置合并与实时 LLM 路由预检 |
| [`src/model-selection-settings.ts`](src/model-selection-settings.ts) | 为新 Session 读取的宿主所有 opt-in 设置 |
-| [`src/model-selection-state.ts`](src/model-selection-state.ts) | 记录并继承已读取决定的 Session 事件 |
-| [`src/list-models.ts`](src/list-models.ts) | `list_subagent_models` 运行时发现工具 |
@@ -148,20 +146,6 @@ kind: "package-reference"
只要提供方实例及其配置不变,前缀就保持稳定。适配器目录变化不会改变定义。随附 fork 工具省略模型选择字段,以保留对继承的父级前缀的复用。自定义 fork 工具可以启用选择;更改其路由可能使前缀无法复用。
-### 模型选择与发现
-
-#### 模型看到什么
-
-独立的 `list_subagent_models` 定义读取调用 Session 的路由策略,没有已记录策略时使用当前父级路由。可选的 `ctx.llm` 服务不可用时,调用会被拒绝。有已记录策略时,提供方模型列表取公布目录与 Session 授权路由的交集。没有策略时,只解析当前父级模型,即使目录未列出它。发现工具自身的描述要求模型在选择子级路由前查询选项;未挂载或过滤掉发现工具时,这段指导也不会出现。精确模型查询允许已授权但目录未列出的 ID;未授权的提供方/模型查询会在访问适配器前失败。目录或精确模型查询失败以及取消都会使调用被拒绝。执行过程独立强制同一策略。
-
-#### Token 影响
-
-挂载 `/list-models` 的组合中存在一份固定发现 schema,不受 Session 偏好或委派工具影响;随附 Web 与 Desktop preset 包含它,headless 与 SDK profile 不包含。只有模型调用工具时,路由元数据才进入 transcript。
-
-#### KV Cache 影响
-
-适配器注册与目录变化不会改变 schema 前缀。每个发现结果都追加在可复用前缀之后。
-
### 系统提示词
#### 模型看到什么
diff --git a/packages/subagent/tool-subagent/locale/list-models/en.json b/packages/subagent/tool-subagent/locale/list-models/en.json
deleted file mode 100644
index 62b37b2526..0000000000
--- a/packages/subagent/tool-subagent/locale/list-models/en.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "meta": {
- "title": "Subagent model discovery"
- }
-}
diff --git a/packages/subagent/tool-subagent/locale/list-models/zh.json b/packages/subagent/tool-subagent/locale/list-models/zh.json
deleted file mode 100644
index c78ffcc47f..0000000000
--- a/packages/subagent/tool-subagent/locale/list-models/zh.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "meta": {
- "title": "子智能体模型查询工具"
- }
-}
diff --git a/packages/subagent/tool-subagent/package.json b/packages/subagent/tool-subagent/package.json
index b77bfeecfb..cfdc83136d 100644
--- a/packages/subagent/tool-subagent/package.json
+++ b/packages/subagent/tool-subagent/package.json
@@ -25,20 +25,13 @@
"./src/*": "./src/*",
"./package.json": "./package.json",
"./locale/*.json": "./locale/*.json",
- "./model-selection-settings/locale/*.json": "./locale/model-selection-settings/*.json",
- "./list-models": {
- "types": "./lib/types/list-models.d.ts",
- "default": "./lib/list-models.js"
- },
- "./list-models/locale/*.json": "./locale/list-models/*.json"
+ "./model-selection-settings/locale/*.json": "./locale/model-selection-settings/*.json"
},
"files": [
"locale/*.json",
- "locale/list-models/*.json",
"locale/model-selection-settings/*.json",
"lib/index.js",
"lib/model-selection-settings.js",
- "lib/list-models.js",
"lib/types/**/*.d.ts"
],
"license": "MIT",
@@ -77,6 +70,7 @@
"@deepseek-ai/dsh-system-prompt": "workspace:*",
"@deepseek-ai/dsh-tools": "workspace:*",
"@deepseek-ai/cordis": "workspace:~",
- "@deepseek-ai/dsh-session-projection": "workspace:*"
+ "@deepseek-ai/dsh-session-projection": "workspace:*",
+ "@deepseek-ai/dsh-tool-subagent-control": "workspace:*"
}
}
diff --git a/packages/subagent/tool-subagent/src/index.ts b/packages/subagent/tool-subagent/src/index.ts
index 89be8aab24..2006922344 100644
--- a/packages/subagent/tool-subagent/src/index.ts
+++ b/packages/subagent/tool-subagent/src/index.ts
@@ -32,7 +32,7 @@ import { SubagentPresetSelection, type PresetSelectionConfig, type PresetSelecti
import {
subagentModelSelectionProjectionDefinition,
subagentModelSelectionPolicy,
-} from './model-selection-state.ts'
+} from '@deepseek-ai/dsh-subagent'
export const name = 'tool-subagent'
export const inject = ['tools', 'subagents', 'systemPrompt', 'sessionProjections']
diff --git a/packages/subagent/tool-subagent/src/model-selection-settings.ts b/packages/subagent/tool-subagent/src/model-selection-settings.ts
index a7954c3850..86497c5ea5 100644
--- a/packages/subagent/tool-subagent/src/model-selection-settings.ts
+++ b/packages/subagent/tool-subagent/src/model-selection-settings.ts
@@ -8,12 +8,10 @@ import type {} from '@deepseek-ai/dsh-agent'
import {
subagentModelSelectionPolicy,
subagentModelSelectionProjectionDefinition,
-} from './model-selection-state.ts'
-import {
AllowedModelRouteSchema,
assertAllowedModelRoutes,
type AllowedModelRoute,
-} from './model-selection.ts'
+} from '@deepseek-ai/dsh-subagent'
declare module '@deepseek-ai/cordis' {
interface Context {
diff --git a/packages/subagent/tool-subagent/src/model-selection.ts b/packages/subagent/tool-subagent/src/model-selection.ts
index 911901a2ce..fa7a8f1279 100644
--- a/packages/subagent/tool-subagent/src/model-selection.ts
+++ b/packages/subagent/tool-subagent/src/model-selection.ts
@@ -3,63 +3,7 @@
import { ReasoningEffortId } from '@deepseek-ai/dsh-llm'
import type { LlmRuntime } from '@deepseek-ai/dsh-llm'
import type { AgentOptions } from '@deepseek-ai/dsh-agent'
-import z from '@deepseek-ai/schemastery'
-
-/** One exact child LLM route authorized by a user setting. */
-export interface AllowedModelRoute {
- /** Registered LLM provider id. */
- readonly provider: string
- /** Provider-owned exact model id. */
- readonly model: string
-}
-
-/** Schema shared by the Host setting and its deployment base. */
-export const AllowedModelRouteSchema: z = z.object({
- provider: z.string().min(1).required(),
- model: z.string().min(1).required(),
-})
-
-/** Exact routes authorized for one Session. */
-export interface ModelSelectionPolicy {
- /** Exact provider/model routes authorized for explicit selection. */
- readonly routes: readonly AllowedModelRoute[]
-}
-
-/**
- * Stable identity for one provider/model pair.
- * @param route - Exact provider/model route.
- * @returns Opaque key for equality checks.
- */
-export function modelRouteKey(route: AllowedModelRoute): string {
- return `${route.provider}\0${route.model}`
-}
-
-/**
- * Reject malformed or duplicate route policy entries at a durable or configuration boundary.
- * @param routes - Candidate exact routes to validate.
- * @returns an assertion that the candidate is a validated exact-route array.
- */
-export function assertAllowedModelRoutes(routes: unknown): asserts routes is readonly AllowedModelRoute[] {
- if (!Array.isArray(routes)) {
- throw new Error('subagent model selection requires an array of routes')
- }
- const seen = new Set()
- const candidates: readonly unknown[] = routes
- for (const candidate of candidates) {
- if (typeof candidate !== 'object' || candidate === null || Array.isArray(candidate)
- || !('provider' in candidate) || typeof candidate.provider !== 'string'
- || !('model' in candidate) || typeof candidate.model !== 'string'
- || candidate.provider.length === 0 || candidate.model.length === 0) {
- throw new Error('subagent model selection requires non-empty provider and model ids')
- }
- const route = { provider: candidate.provider, model: candidate.model }
- const key = modelRouteKey(route)
- if (seen.has(key)) {
- throw new Error(`subagent model selection repeats route "${route.provider}/${route.model}"`)
- }
- seen.add(key)
- }
-}
+import type { ModelSelectionPolicy } from '@deepseek-ai/dsh-subagent'
/** Model-facing child LLM route fields. */
export interface DelegationModelRequest {
diff --git a/packages/subagent/tool-subagent/tests/harness.ts b/packages/subagent/tool-subagent/tests/harness.ts
index b15e232369..852d272b72 100644
--- a/packages/subagent/tool-subagent/tests/harness.ts
+++ b/packages/subagent/tool-subagent/tests/harness.ts
@@ -9,7 +9,7 @@ import SubagentRuntime from '@deepseek-ai/dsh-subagent'
import { SessionId } from '@deepseek-ai/dsh-session'
import * as mock from './scripted-provider.ts'
import * as tool from '../src/index.ts'
-import * as ListModels from '../src/list-models.ts'
+import * as ControlTools from '@deepseek-ai/dsh-tool-subagent-control'
import SubagentModelSelectionConfig from '../src/model-selection-settings.ts'
const contexts = new Set()
@@ -67,7 +67,7 @@ export async function setup(toolConfig: SetupConfig, mockConfig: Partial {
- await agentCtx.plugin(ListModels)
+ await agentCtx.plugin(ControlTools)
const fiber = agentCtx.inject(tool.inject, (runtimeCtx) => {
return tool.apply(runtimeCtx, { ...config, modelSelection: true })
})
diff --git a/packages/subagent/tool-subagent/tests/model-selection-settings.spec.ts b/packages/subagent/tool-subagent/tests/model-selection-settings.spec.ts
index 1b2b11390a..c26643b14e 100644
--- a/packages/subagent/tool-subagent/tests/model-selection-settings.spec.ts
+++ b/packages/subagent/tool-subagent/tests/model-selection-settings.spec.ts
@@ -14,12 +14,12 @@ import { mountAgentLoopTestDependencies } from '@deepseek-ai/dsh-agent-loop-test
import SubagentRuntime from '@deepseek-ai/dsh-subagent'
import * as SubagentSpawn from '@deepseek-ai/dsh-subagent-spawn-in-process'
import * as tool from '../src/index.ts'
-import * as ListModels from '../src/list-models.ts'
+import * as ControlTools from '@deepseek-ai/dsh-tool-subagent-control'
import SubagentModelSelectionConfig from '../src/model-selection-settings.ts'
import {
subagentModelSelectionPolicy,
subagentModelSelectionProjectionDefinition,
-} from '../src/model-selection-state.ts'
+} from '@deepseek-ai/dsh-subagent'
import { callSubagent, ownContext, text } from './harness.ts'
const ALLOWED_MODELS = [{ provider: 'alpha', model: 'fast-model' }]
@@ -51,7 +51,7 @@ async function boot(withPreset = true): Promise {
await ctx.plugin(SubagentSpawn, { providerName: 'spawn' })
if (withPreset) {
const preset = createScope(ctx, { preset: 'model-selection-test' })
- await preset.ctx.plugin(ListModels)
+ await preset.ctx.plugin(ControlTools)
await preset.ctx.plugin(tool, {
provider: 'spawn',
modelSelection: true,
@@ -186,7 +186,7 @@ describe('SubagentModelSelectionConfig', () => {
sessionId: SessionId('direct-agent-setup'),
setup: async (agentCtx, agent) => {
prepared = agent
- await agentCtx.plugin(ListModels)
+ await agentCtx.plugin(ControlTools)
const fiber = agentCtx.inject(tool.inject, (runtimeCtx) => {
return tool.apply(runtimeCtx, {
provider: 'spawn',
@@ -226,7 +226,7 @@ describe('SubagentModelSelectionConfig', () => {
})
const outside = await ctx.agents.create({ sessionId: SessionId('existing-outside') })
await selectionConfigs.get(ctx)!.update({ enabled: false })
- await preset.ctx.plugin(ListModels)
+ await preset.ctx.plugin(ControlTools)
await preset.ctx.plugin(tool, { provider: 'spawn', modelSelection: true })
expect(subagentModelSelectionPolicy(ctx.sessionProjections, inside.agent.session)).toEqual(ALLOWED_MODELS)
expect(subagentModelSelectionPolicy(ctx.sessionProjections, outside.agent.session)).toEqual(ALLOWED_MODELS)
@@ -287,7 +287,7 @@ describe('SubagentModelSelectionConfig', () => {
const ctx = await boot(false)
const preset = createScope(ctx, { preset: 'standard' })
const other = createScope(ctx, { preset: 'minimal' })
- await preset.ctx.plugin(ListModels)
+ await preset.ctx.plugin(ControlTools)
await preset.ctx.plugin(tool, {
provider: 'spawn',
modelSelection: true,
diff --git a/packages/subagent/tool-subagent/tests/model-selection.spec.ts b/packages/subagent/tool-subagent/tests/model-selection.spec.ts
index 6a437cea37..272e861906 100644
--- a/packages/subagent/tool-subagent/tests/model-selection.spec.ts
+++ b/packages/subagent/tool-subagent/tests/model-selection.spec.ts
@@ -1,3 +1,4 @@
+import { assertAllowedModelRoutes } from '@deepseek-ai/dsh-subagent'
import { mountWorkingDirectoryFixture } from '../../subagent/tests/working-directory-fixture.ts'
import { describe, expect, it, vi } from 'vitest'
import { Context } from '@deepseek-ai/cordis'
@@ -12,9 +13,8 @@ import SessionProjectionRegistry from '@deepseek-ai/dsh-session-projection'
import { MockAdapter } from '../../../core/agent-loop/tests/mock-adapter.ts'
import * as mock from './scripted-provider.ts'
import * as tool from '../src/index.ts'
-import * as ListModels from '../src/list-models.ts'
+import * as ControlTools from '@deepseek-ai/dsh-tool-subagent-control'
import {
- assertAllowedModelRoutes,
assertAllowedModelSelection,
preflightChildLlmRoute,
} from '../src/model-selection.ts'
@@ -169,7 +169,7 @@ describe('dsh-tool-subagent model selection', () => {
expect(descriptions()).not.toContain(guidance)
expect(descriptions()).not.toContain('list_subagent_models')
- const discovery = await ctx.plugin(ListModels)
+ const discovery = await ctx.plugin(ControlTools)
expect(descriptions()).toContain(guidance)
const restore = agent.ctx.tools.restrict({ deny: ['list_subagent_models'] })
expect(descriptions()).not.toContain(guidance)
diff --git a/packages/subagent/tool-subagent/tsdown.config.ts b/packages/subagent/tool-subagent/tsdown.config.ts
index 8cdb8ec132..4a467f2c5e 100644
--- a/packages/subagent/tool-subagent/tsdown.config.ts
+++ b/packages/subagent/tool-subagent/tsdown.config.ts
@@ -15,5 +15,4 @@ const entry = (path: string) => ({
export default defineConfig([
entry('lib/types/index.js'),
entry('lib/types/model-selection-settings.js'),
- entry('lib/types/list-models.js'),
])
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 9c9bac75c2..00afac980a 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -14148,6 +14148,9 @@ importers:
'@deepseek-ai/dsh-tool-subagent':
specifier: workspace:*
version: link:../tool-subagent
+ '@deepseek-ai/dsh-tool-subagent-control':
+ specifier: workspace:*
+ version: link:../tool-subagent-control
packages/subagent/subagent-fork-in-process:
dependencies:
@@ -14289,6 +14292,9 @@ importers:
'@deepseek-ai/dsh-system-prompt':
specifier: workspace:*
version: link:../../core/system-prompt
+ '@deepseek-ai/dsh-tool-subagent-control':
+ specifier: workspace:*
+ version: link:../tool-subagent-control
'@deepseek-ai/dsh-tools':
specifier: workspace:*
version: link:../../core/tools
@@ -14341,6 +14347,9 @@ importers:
'@deepseek-ai/dsh-subagent-spawn-in-process':
specifier: workspace:*
version: link:../subagent-spawn-in-process
+ '@deepseek-ai/dsh-tool-subagent':
+ specifier: workspace:*
+ version: link:../tool-subagent
'@deepseek-ai/dsh-tools':
specifier: workspace:*
version: link:../../core/tools
diff --git a/scripts/check-workspace-constraints.ts b/scripts/check-workspace-constraints.ts
index 6d67ed453f..68380c0a7b 100644
--- a/scripts/check-workspace-constraints.ts
+++ b/scripts/check-workspace-constraints.ts
@@ -208,7 +208,7 @@ const packageFileExtras: Readonly> = {
'@deepseek-ai/dsh-agent-preset': ['skills'],
// The Web Host mounts the default-off settings owner independently of the
// delegation-tool instances.
- '@deepseek-ai/dsh-tool-subagent': ['lib/model-selection-settings.js', 'lib/list-models.js'],
+ '@deepseek-ai/dsh-tool-subagent': ['lib/model-selection-settings.js'],
// The JSONL backend resolves its private verification Worker relative to
// import.meta.url; it is shipped without a public package subpath.
'@deepseek-ai/dsh-session-persistence-jsonl': ['lib/worker.cjs'],
diff --git a/scripts/gen-tool-catalog.ts b/scripts/gen-tool-catalog.ts
index 5479177077..add457f4e1 100644
--- a/scripts/gen-tool-catalog.ts
+++ b/scripts/gen-tool-catalog.ts
@@ -38,7 +38,6 @@ import * as WebFetchLocal from '@deepseek-ai/dsh-web-fetch-http'
import SubagentRuntime from '@deepseek-ai/dsh-subagent'
import type { SubagentProvider } from '@deepseek-ai/dsh-subagent'
import * as ToolSubagentControl from '@deepseek-ai/dsh-tool-subagent-control'
-import * as ToolSubagentListAgents from '@deepseek-ai/dsh-tool-subagent-control/list-agents'
import SkillRegistry from '@deepseek-ai/dsh-skill'
import * as SkillFileSystem from '@deepseek-ai/dsh-skill-filesystem'
import LocalJobRegistry from '@deepseek-ai/dsh-jobs-local'
@@ -75,7 +74,6 @@ import * as PluginMarketTools from '@deepseek-ai/dsh-plugin-market/tools'
import SandboxPolicy from '@deepseek-ai/dsh-sandbox-policy'
import McpResources from '@deepseek-ai/dsh-mcp-resources'
import * as ToolSubagent from '@deepseek-ai/dsh-tool-subagent'
-import * as ListSubagentModels from '../packages/subagent/tool-subagent/src/list-models.ts'
import * as ToolWeb from '@deepseek-ai/dsh-tool-web'
import WorkflowEngine from '@deepseek-ai/dsh-workflow'
import type { WorkflowRun, WorkflowStartRequest } from '@deepseek-ai/dsh-workflow'
@@ -522,10 +520,9 @@ const TOOL_PACKAGES: ToolPackage[] = [
pkg: '@deepseek-ai/dsh-tool-subagent',
dir: 'tool-subagent',
source: {
- list_subagent_models: 'packages/subagent/tool-subagent/src/list-models.ts',
subagent: 'packages/subagent/tool-subagent/src/index.ts',
},
- requires: ['ctx.tools', 'ctx.subagents', 'ctx.systemPrompt', 'ctx.sessionProjections', 'ctx.llm for model discovery and selected-route validation'],
+ requires: ['ctx.tools', 'ctx.subagents', 'ctx.systemPrompt', 'ctx.sessionProjections', 'ctx.llm for selected-route validation'],
writes: ['tool/call', 'tool/result', 'child session events through the chosen provider'],
shippedNames: ['subagent', 'subagent_fork'],
async mount(ctx) {
@@ -533,10 +530,9 @@ const TOOL_PACKAGES: ToolPackage[] = [
await ctx.plugin(LlmRuntime)
registerCatalogSubagentProvider(ctx, 'mock')
await ctx.plugin(ToolSubagent, { provider: 'mock' })
- await ctx.plugin(ListSubagentModels)
},
note:
- 'The load-time `toolName` selects the delegation name (default `subagent`); `modelSelection` adds optional route fields. The independent `/list-models` plugin registers discovery. Web and Desktop presets mount discovery, enable spawn route fields, and leave `subagent_fork` route fields disabled. The Host settings service records authorization for each new top-level Session; child Sessions inherit it. Without a recorded policy, discovery and explicit selection permit only the current parent route. Every delegation returns a child id promptly; local children accept follow-ups, while external backends report their single execution automatically.',
+ 'The load-time `toolName` selects the delegation name (default `subagent`); `modelSelection` adds optional route fields. The shared `tool-subagent-control` plugin registers model discovery. Web and Desktop presets enable spawn route fields and leave `subagent_fork` route fields disabled. The Host settings service records authorization for each new top-level Session; child Sessions inherit it. Without a recorded policy, discovery and explicit selection permit only the current parent route. Every delegation returns a child id promptly; local children accept follow-ups, while external backends report their single execution automatically.',
},
{
pkg: '@deepseek-ai/dsh-tool-subagent-control',
@@ -544,9 +540,10 @@ const TOOL_PACKAGES: ToolPackage[] = [
source: {
interrupt_agent: 'packages/subagent/tool-subagent-control/src/index.ts',
list_agents: 'packages/subagent/tool-subagent-control/src/list-agents.ts',
+ list_subagent_models: 'packages/subagent/tool-subagent-control/src/list-models.ts',
send_message: 'packages/subagent/tool-subagent-control/src/index.ts',
},
- requires: ['ctx.tools', 'ctx.subagents', 'ctx.agents and ctx.sessionProjections (list_agents only)'],
+ requires: ['ctx.tools', 'ctx.subagents', 'ctx.agents', 'ctx.sessionProjections', 'ctx.llm for model discovery'],
writes: ['tool/call', 'tool/result', 'child session events through ctx.subagents'],
async mount(ctx) {
await ctx.plugin(SubagentRuntime)
@@ -554,10 +551,9 @@ const TOOL_PACKAGES: ToolPackage[] = [
await ctx.plugin(AgentRegistry)
await ctx.plugin(SessionStore)
await ctx.plugin(ToolSubagentControl)
- await ctx.plugin(ToolSubagentListAgents)
},
note:
- 'The globally named discovery, interruption, and local-message tools over managed subagents: provider-bound `tool-subagent` instances register distinct delegation tools, while this package registers `send_message` and `interrupt_agent` once, plus `list_agents` from its separately loaded `/list-agents` plugin (whose catalog rows use the sessionProjections and live Agent registries).',
+ 'The globally named discovery, interruption, and local-message tools over managed subagents: provider-bound `tool-subagent` instances register distinct delegation tools, while one instance of this package registers `send_message`, `interrupt_agent`, `list_agents`, and `list_subagent_models`. Model discovery reads the calling Session’s recorded authorization, or only its current parent route when no policy is recorded.',
},
{
pkg: '@deepseek-ai/dsh-tool-jobs',
diff --git a/scripts/smoke-python-runtime.py b/scripts/smoke-python-runtime.py
index 73c9bba3b3..0d6260b79c 100644
--- a/scripts/smoke-python-runtime.py
+++ b/scripts/smoke-python-runtime.py
@@ -89,7 +89,6 @@ LEGACY_CUSTOM_DISABLED_ROWS = (
"tool-skill",
"tool-str-replace-editor",
"tool-subagent-control",
- "tool-subagent-list-agents",
"tool-subagent-fork",
"tool-todo",
"tool-web",
diff --git a/snapshots/sdk/bash-tool/tool-schemas.expected.json b/snapshots/sdk/bash-tool/tool-schemas.expected.json
index 2b4b1f069f..93788fc8b2 100644
--- a/snapshots/sdk/bash-tool/tool-schemas.expected.json
+++ b/snapshots/sdk/bash-tool/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/sdk/dynamic-tool-updates/notifications.expected.jsonl b/snapshots/sdk/dynamic-tool-updates/notifications.expected.jsonl
index bfec6f1e36..b497f77dbd 100644
--- a/snapshots/sdk/dynamic-tool-updates/notifications.expected.jsonl
+++ b/snapshots/sdk/dynamic-tool-updates/notifications.expected.jsonl
@@ -6,7 +6,7 @@
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":8,"time":0,"data":{"content":[{"type":"text","text":"Read task.txt, call the newly available snapshot_ping tool once, then reply DONE."}],"source":{"kind":"user"},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"{{cwd}}\"."},{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}}
-{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/header","seq":10,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"initial"}}}}
+{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/header","seq":10,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","list_subagent_models","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"initial"}}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/context","seq":11,"time":0,"data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"session/title","seq":12,"time":0,"data":{"title":"Read task.txt, call the newly","messageSeqs":[8],"source":{"kind":"fallback"}}}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"assistant/message","seq":13,"time":0,"data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"tool-call","id":"call_task_read","name":"read","arguments":"{\"file_path\":\"task.txt\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{sessionId}}"},"usage":{"inputTokens":10,"outputTokens":5},"stream":[{"type":"chunk","time":0,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":0,"index":0,"dt":[],"id":"call_task_read","name":"read","args":["{\"file_path\":\"task.txt\"}"]},{"type":"chunk","time":0,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_task_read","name":"read","arguments":"{\"file_path\":\"task.txt\"}"}}},{"type":"chunk","time":0,"chunk":{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}}},{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}}}
@@ -14,14 +14,14 @@
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"tool/result","seq":15,"time":0,"data":{"turn":1,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"call_task_read"},"toolCallId":"call_task_read","content":[{"type":"text","text":"{{cwd}}/task.txt\nfile\n\n1: Reply with the single word DONE after reading this file.\n\n(End of file - total 1 lines)\n"}],"isError":false,"id":"{{sessionId}}"},"meta":{"path":"{{cwd}}/task.txt","offset":1,"lines":[{"number":1,"text":"Reply with the single word DONE after reading this file."}],"totalLines":1}},"sourceEventSeqs":[14],"surfaceOp":"append"}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"step/end","seq":16,"time":0,"data":{"turn":1,"step":1}}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"step/start","seq":17,"time":0,"data":{"turn":1,"step":2}}}}
-{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/header","seq":18,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","read","read_image","send_message","skill","snapshot_ping","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change"}}}}
+{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/header","seq":18,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","list_subagent_models","read","read_image","send_message","skill","snapshot_ping","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change"}}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"developer/message","seq":19,"time":0,"data":{"turn":1,"step":2,"message":{"source":{"kind":"tool-registry"},"content":[{"type":"tool-addition","toolName":"snapshot_ping"}],"role":"developer","id":"{{sessionId}}"},"headerSeq":18},"surfaceOp":"append"}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"assistant/message","seq":20,"time":0,"data":{"turn":1,"step":2,"message":{"role":"assistant","content":[{"type":"tool-call","id":"call_dynamic_ping","name":"snapshot_ping","arguments":"{}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{sessionId}}"},"stream":[{"type":"chunk","time":0,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":0,"index":0,"dt":[],"id":"call_dynamic_ping","name":"snapshot_ping","args":["{}"]},{"type":"chunk","time":0,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_dynamic_ping","name":"snapshot_ping","arguments":"{}"}}},{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"tool/call","seq":21,"time":0,"data":{"turn":1,"step":2,"callId":"call_dynamic_ping","name":"snapshot_ping","arguments":"{}"}}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"tool/result","seq":22,"time":0,"data":{"turn":1,"step":2,"message":{"role":"tool","source":{"kind":"tool","callId":"call_dynamic_ping"},"toolCallId":"call_dynamic_ping","content":[{"type":"text","text":"pong"}],"isError":false,"id":"{{sessionId}}"}},"sourceEventSeqs":[21],"surfaceOp":"append"}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"step/end","seq":23,"time":0,"data":{"turn":1,"step":2}}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"step/start","seq":24,"time":0,"data":{"turn":1,"step":3}}}}
-{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/header","seq":25,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change"}}}}
+{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/header","seq":25,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","list_subagent_models","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change"}}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"developer/message","seq":26,"time":0,"data":{"turn":1,"step":3,"message":{"source":{"kind":"tool-registry"},"content":[{"type":"tool-removal","toolName":"snapshot_ping"}],"role":"developer","id":"{{sessionId}}"}},"surfaceOp":"append"}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"assistant/message","seq":27,"time":0,"data":{"turn":1,"step":3,"message":{"role":"assistant","content":[{"type":"text","text":"DONE"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{sessionId}}"},"usage":{"inputTokens":12,"outputTokens":2,"cacheReadTokens":10},"stream":[{"type":"chunk","time":0,"chunk":{"type":"block-start","index":0,"blockType":"text"}},{"type":"text-chunks","time0":0,"index":0,"dt":[],"texts":["DONE"]},{"type":"chunk","time":0,"chunk":{"type":"block-end","index":0,"block":{"type":"text","text":"DONE"}}},{"type":"chunk","time":0,"chunk":{"type":"usage","usage":{"inputTokens":12,"outputTokens":2,"cacheReadTokens":10}}},{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"stop"}}}]},"surfaceOp":"append"}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"step/end","seq":28,"time":0,"data":{"turn":1,"step":3}}}}
diff --git a/snapshots/sdk/dynamic-tool-updates/session.v4.jsonl b/snapshots/sdk/dynamic-tool-updates/session.v4.jsonl
index aee79405da..8472750d16 100644
--- a/snapshots/sdk/dynamic-tool-updates/session.v4.jsonl
+++ b/snapshots/sdk/dynamic-tool-updates/session.v4.jsonl
@@ -9,7 +9,7 @@
{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{message:2}}"}},"surfaceOp":"append"}
{"type":"user/message","data":{"content":[{"type":"text","text":"Read task.txt, call the newly available snapshot_ping tool once, then reply DONE."}],"source":{"kind":"user"},"role":"user","id":"{{message:1}}"},"surfaceOp":"append"}
{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"{{cwd}}\"."},{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{message:3}}"},"surfaceOp":"append"}
-{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"initial"}}
+{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","list_subagent_models","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"initial"}}
{"type":"request/context","data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}
{"type":"session/title","data":{"title":"Read task.txt, call the newly","messageSeqs":[8],"source":{"kind":"fallback"}}}
{"type":"assistant/message","data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"tool-call","id":"call_task_read","name":"read","arguments":"{\"file_path\":\"task.txt\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:4}}"},"usage":{"inputTokens":10,"outputTokens":5},"stream":[{"type":"chunk","time":1790049391235,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1790049391235,"index":0,"dt":[],"id":"call_task_read","name":"read","args":["{\"file_path\":\"task.txt\"}"]},{"type":"chunk","time":1790049391235,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_task_read","name":"read","arguments":"{\"file_path\":\"task.txt\"}"}}},{"type":"chunk","time":1790049391235,"chunk":{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}}},{"type":"chunk","time":1790049391235,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
@@ -17,14 +17,14 @@
{"type":"tool/result","data":{"turn":1,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"call_task_read"},"toolCallId":"call_task_read","content":[{"type":"text","text":"{{cwd}}/task.txt\nfile\n\n1: Reply with the single word DONE after reading this file.\n\n(End of file - total 1 lines)\n"}],"isError":false,"id":"{{message:5}}"},"meta":{"path":"{{cwd}}/task.txt","offset":1,"lines":[{"number":1,"text":"Reply with the single word DONE after reading this file."}],"totalLines":1}},"sourceEventSeqs":[14],"surfaceOp":"append"}
{"type":"step/end","data":{"turn":1,"step":1}}
{"type":"step/start","data":{"turn":1,"step":2}}
-{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","read","read_image","send_message","skill","snapshot_ping","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change"}}
+{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","list_subagent_models","read","read_image","send_message","skill","snapshot_ping","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change"}}
{"type":"developer/message","data":{"turn":1,"step":2,"message":{"source":{"kind":"tool-registry"},"content":[{"type":"tool-addition","toolName":"snapshot_ping"}],"role":"developer","id":"{{message:6}}"},"headerSeq":18},"surfaceOp":"append"}
{"type":"assistant/message","data":{"turn":1,"step":2,"message":{"role":"assistant","content":[{"type":"tool-call","id":"call_dynamic_ping","name":"snapshot_ping","arguments":"{}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:7}}"},"stream":[{"type":"chunk","time":1790049391255,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1790049391255,"index":0,"dt":[],"id":"call_dynamic_ping","name":"snapshot_ping","args":["{}"]},{"type":"chunk","time":1790049391255,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_dynamic_ping","name":"snapshot_ping","arguments":"{}"}}},{"type":"chunk","time":1790049391255,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
{"type":"tool/call","data":{"turn":1,"step":2,"callId":"call_dynamic_ping","name":"snapshot_ping","arguments":"{}"}}
{"type":"tool/result","data":{"turn":1,"step":2,"message":{"role":"tool","source":{"kind":"tool","callId":"call_dynamic_ping"},"toolCallId":"call_dynamic_ping","content":[{"type":"text","text":"pong"}],"isError":false,"id":"{{message:8}}"}},"sourceEventSeqs":[21],"surfaceOp":"append"}
{"type":"step/end","data":{"turn":1,"step":2}}
{"type":"step/start","data":{"turn":1,"step":3}}
-{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change"}}
+{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","list_subagent_models","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change"}}
{"type":"developer/message","data":{"turn":1,"step":3,"message":{"source":{"kind":"tool-registry"},"content":[{"type":"tool-removal","toolName":"snapshot_ping"}],"role":"developer","id":"{{message:9}}"}},"surfaceOp":"append"}
{"type":"assistant/message","data":{"turn":1,"step":3,"message":{"role":"assistant","content":[{"type":"text","text":"DONE"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:10}}"},"usage":{"inputTokens":12,"outputTokens":2,"cacheReadTokens":10},"stream":[{"type":"chunk","time":1790049391270,"chunk":{"type":"block-start","index":0,"blockType":"text"}},{"type":"text-chunks","time0":1790049391270,"index":0,"dt":[],"texts":["DONE"]},{"type":"chunk","time":1790049391270,"chunk":{"type":"block-end","index":0,"block":{"type":"text","text":"DONE"}}},{"type":"chunk","time":1790049391270,"chunk":{"type":"usage","usage":{"inputTokens":12,"outputTokens":2,"cacheReadTokens":10}}},{"type":"chunk","time":1790049391270,"chunk":{"type":"finish","reason":{"kind":"stop"}}}]},"surfaceOp":"append"}
{"type":"step/end","data":{"turn":1,"step":3}}
diff --git a/snapshots/sdk/persistent-tools/cordis.yml b/snapshots/sdk/persistent-tools/cordis.yml
index 6262d2fb44..aabc122454 100644
--- a/snapshots/sdk/persistent-tools/cordis.yml
+++ b/snapshots/sdk/persistent-tools/cordis.yml
@@ -84,10 +84,6 @@
name: '@deepseek-ai/dsh-tool-subagent-control'
disabled: true
-- id: tool-subagent-list-agents
- name: '@deepseek-ai/dsh-tool-subagent-control/list-agents'
- disabled: true
-
- id: tool-subagent
name: '@deepseek-ai/dsh-tool-subagent'
disabled: true
diff --git a/snapshots/sdk/subagent-activation-limit/tool-schemas.1.expected.json b/snapshots/sdk/subagent-activation-limit/tool-schemas.1.expected.json
index 2b4b1f069f..93788fc8b2 100644
--- a/snapshots/sdk/subagent-activation-limit/tool-schemas.1.expected.json
+++ b/snapshots/sdk/subagent-activation-limit/tool-schemas.1.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/sdk/subagent-continuable-inheritance/tool-schemas.1.expected.json b/snapshots/sdk/subagent-continuable-inheritance/tool-schemas.1.expected.json
index 2b4b1f069f..93788fc8b2 100644
--- a/snapshots/sdk/subagent-continuable-inheritance/tool-schemas.1.expected.json
+++ b/snapshots/sdk/subagent-continuable-inheritance/tool-schemas.1.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/sdk/subagent-continuable/tool-schemas.1.expected.json b/snapshots/sdk/subagent-continuable/tool-schemas.1.expected.json
index 2b4b1f069f..93788fc8b2 100644
--- a/snapshots/sdk/subagent-continuable/tool-schemas.1.expected.json
+++ b/snapshots/sdk/subagent-continuable/tool-schemas.1.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/sdk/subagent-dsh-sdk-diagnostic/tool-schemas.expected.json b/snapshots/sdk/subagent-dsh-sdk-diagnostic/tool-schemas.expected.json
index ed6f50a025..948616254d 100644
--- a/snapshots/sdk/subagent-dsh-sdk-diagnostic/tool-schemas.expected.json
+++ b/snapshots/sdk/subagent-dsh-sdk-diagnostic/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/sdk/subagent-dsh-sdk-dynamic-route/tool-schemas.1.expected.json b/snapshots/sdk/subagent-dsh-sdk-dynamic-route/tool-schemas.1.expected.json
index 2b4b1f069f..93788fc8b2 100644
--- a/snapshots/sdk/subagent-dsh-sdk-dynamic-route/tool-schemas.1.expected.json
+++ b/snapshots/sdk/subagent-dsh-sdk-dynamic-route/tool-schemas.1.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/sdk/subagent-list-agents/tool-schemas.1.expected.json b/snapshots/sdk/subagent-list-agents/tool-schemas.1.expected.json
index 2b4b1f069f..93788fc8b2 100644
--- a/snapshots/sdk/subagent-list-agents/tool-schemas.1.expected.json
+++ b/snapshots/sdk/subagent-list-agents/tool-schemas.1.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/sdk/subagent-send-message/tool-schemas.1.expected.json b/snapshots/sdk/subagent-send-message/tool-schemas.1.expected.json
index 2b4b1f069f..93788fc8b2 100644
--- a/snapshots/sdk/subagent-send-message/tool-schemas.1.expected.json
+++ b/snapshots/sdk/subagent-send-message/tool-schemas.1.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/sdk/text-turn/tool-schemas.expected.json b/snapshots/sdk/text-turn/tool-schemas.expected.json
index 2b4b1f069f..93788fc8b2 100644
--- a/snapshots/sdk/text-turn/tool-schemas.expected.json
+++ b/snapshots/sdk/text-turn/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/sdk/tool-error-details/notifications.expected.jsonl b/snapshots/sdk/tool-error-details/notifications.expected.jsonl
index e6d6e7fde2..8d30d3d16c 100644
--- a/snapshots/sdk/tool-error-details/notifications.expected.jsonl
+++ b/snapshots/sdk/tool-error-details/notifications.expected.jsonl
@@ -6,7 +6,7 @@
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"system/message","seq":7,"time":0,"data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{sessionId}}"}},"surfaceOp":"append"}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":8,"time":0,"data":{"content":[{"type":"text","text":"Exercise a native denial and a caught PTC inner denial, then reply ERROR_DETAILS_OK."}],"source":{"kind":"user"},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"user/message","seq":9,"time":0,"data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"{{cwd}}\"."},{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{sessionId}}"},"surfaceOp":"append"}}}
-{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/header","seq":10,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"initial"}}}}
+{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/header","seq":10,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","list_subagent_models","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"initial"}}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/context","seq":11,"time":0,"data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"session/title","seq":12,"time":0,"data":{"title":"Exercise a native denial and","messageSeqs":[8],"source":{"kind":"fallback"}}}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"assistant/message","seq":13,"time":0,"data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"tool-call","id":"denied-native","name":"bash","arguments":"{\"command\":\"echo AUTO_DENIED\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{sessionId}}"},"stream":[{"type":"chunk","time":0,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":0,"index":0,"dt":[],"id":"denied-native","name":"bash","args":["{\"command\":\"echo AUTO_DENIED\"}"]},{"type":"chunk","time":0,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"denied-native","name":"bash","arguments":"{\"command\":\"echo AUTO_DENIED\"}"}}},{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}}}
@@ -16,7 +16,7 @@
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"step/start","seq":17,"time":0,"data":{"turn":1,"step":2}}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"system/message","seq":18,"time":0,"data":{"turn":1,"step":2,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{sessionId}}"}},"sourceEventSeqs":[7],"surfaceOp":{"op":"replace","startSeq":7,"endSeq":7}}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"request/header","seq":19,"time":0,"data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":["run_code"]},"reason":"change","startsSeries":true}}}}
-{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"developer/message","seq":20,"time":0,"data":{"turn":1,"step":2,"message":{"source":{"kind":"tool-registry"},"content":[{"type":"tool-addition","toolName":"run_code"},{"type":"tool-removal","toolName":"bash"},{"type":"tool-removal","toolName":"create_goal"},{"type":"tool-removal","toolName":"edit"},{"type":"tool-removal","toolName":"exit_plan_mode"},{"type":"tool-removal","toolName":"get_goal"},{"type":"tool-removal","toolName":"glob"},{"type":"tool-removal","toolName":"grep"},{"type":"tool-removal","toolName":"interrupt_agent"},{"type":"tool-removal","toolName":"job_kill"},{"type":"tool-removal","toolName":"job_list"},{"type":"tool-removal","toolName":"job_output"},{"type":"tool-removal","toolName":"list_agents"},{"type":"tool-removal","toolName":"read"},{"type":"tool-removal","toolName":"read_image"},{"type":"tool-removal","toolName":"send_message"},{"type":"tool-removal","toolName":"skill"},{"type":"tool-removal","toolName":"subagent"},{"type":"tool-removal","toolName":"subagent_fork"},{"type":"tool-removal","toolName":"todo_write"},{"type":"tool-removal","toolName":"update_goal"},{"type":"tool-removal","toolName":"web_fetch"},{"type":"tool-removal","toolName":"web_search"},{"type":"tool-removal","toolName":"workflow"},{"type":"tool-removal","toolName":"working_directory"},{"type":"tool-removal","toolName":"write"}],"role":"developer","id":"{{sessionId}}"},"headerSeq":19},"surfaceOp":"append"}}}
+{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"developer/message","seq":20,"time":0,"data":{"turn":1,"step":2,"message":{"source":{"kind":"tool-registry"},"content":[{"type":"tool-addition","toolName":"run_code"},{"type":"tool-removal","toolName":"bash"},{"type":"tool-removal","toolName":"create_goal"},{"type":"tool-removal","toolName":"edit"},{"type":"tool-removal","toolName":"exit_plan_mode"},{"type":"tool-removal","toolName":"get_goal"},{"type":"tool-removal","toolName":"glob"},{"type":"tool-removal","toolName":"grep"},{"type":"tool-removal","toolName":"interrupt_agent"},{"type":"tool-removal","toolName":"job_kill"},{"type":"tool-removal","toolName":"job_list"},{"type":"tool-removal","toolName":"job_output"},{"type":"tool-removal","toolName":"list_agents"},{"type":"tool-removal","toolName":"list_subagent_models"},{"type":"tool-removal","toolName":"read"},{"type":"tool-removal","toolName":"read_image"},{"type":"tool-removal","toolName":"send_message"},{"type":"tool-removal","toolName":"skill"},{"type":"tool-removal","toolName":"subagent"},{"type":"tool-removal","toolName":"subagent_fork"},{"type":"tool-removal","toolName":"todo_write"},{"type":"tool-removal","toolName":"update_goal"},{"type":"tool-removal","toolName":"web_fetch"},{"type":"tool-removal","toolName":"web_search"},{"type":"tool-removal","toolName":"workflow"},{"type":"tool-removal","toolName":"working_directory"},{"type":"tool-removal","toolName":"write"}],"role":"developer","id":"{{sessionId}}"},"headerSeq":19},"surfaceOp":"append"}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"assistant/message","seq":21,"time":0,"data":{"turn":1,"step":2,"message":{"role":"assistant","content":[{"type":"tool-call","id":"denied-code","name":"run_code","arguments":"{\"code\":\"try { await tools.bash({command: \\\"echo AUTO_DENIED\\\"}) } catch (error) { return error.message }\",\"description\":\"Catch one denied inner call\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{sessionId}}"},"stream":[{"type":"chunk","time":0,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":0,"index":0,"dt":[],"id":"denied-code","name":"run_code","args":["{\"code\":\"try { await tools.bash({command: \\\"echo AUTO_DENIED\\\"}) } catch (error) { return error.message }\",\"description\":\"Catch one denied inner call\"}"]},{"type":"chunk","time":0,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"denied-code","name":"run_code","arguments":"{\"code\":\"try { await tools.bash({command: \\\"echo AUTO_DENIED\\\"}) } catch (error) { return error.message }\",\"description\":\"Catch one denied inner call\"}"}}},{"type":"chunk","time":0,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"tool/call","seq":22,"time":0,"data":{"turn":1,"step":2,"callId":"denied-code","name":"run_code","arguments":"{\"code\":\"try { await tools.bash({command: \\\"echo AUTO_DENIED\\\"}) } catch (error) { return error.message }\",\"description\":\"Catch one denied inner call\"}"}}}}
{"method":"session.event","params":{"sessionId":"{{sessionId}}","event":{"type":"tool/ptc-dispatch-start","seq":23,"time":0,"data":{"rootCallId":"denied-code","parentCallId":"denied-code","subCallId":"denied-code:ptc:1","name":"bash","arguments":{"command":"echo AUTO_DENIED"}}}}}
diff --git a/snapshots/sdk/tool-error-details/session.v4.jsonl b/snapshots/sdk/tool-error-details/session.v4.jsonl
index 871095019b..806aa48ff4 100644
--- a/snapshots/sdk/tool-error-details/session.v4.jsonl
+++ b/snapshots/sdk/tool-error-details/session.v4.jsonl
@@ -9,7 +9,7 @@
{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{message:2}}"}},"surfaceOp":"append"}
{"type":"user/message","data":{"content":[{"type":"text","text":"Exercise a native denial and a caught PTC inner denial, then reply ERROR_DETAILS_OK."}],"source":{"kind":"user"},"role":"user","id":"{{message:1}}"},"surfaceOp":"append"}
{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"{{cwd}}\"."},{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{message:3}}"},"surfaceOp":"append"}
-{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"initial"}}
+{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","list_subagent_models","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"initial"}}
{"type":"request/context","data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}
{"type":"session/title","data":{"title":"Exercise a native denial and","messageSeqs":[8],"source":{"kind":"fallback"}}}
{"type":"assistant/message","data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"tool-call","id":"denied-native","name":"bash","arguments":"{\"command\":\"echo AUTO_DENIED\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:4}}"},"stream":[{"type":"chunk","time":1791315723125,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1791315723125,"index":0,"dt":[],"id":"denied-native","name":"bash","args":["{\"command\":\"echo AUTO_DENIED\"}"]},{"type":"chunk","time":1791315723125,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"denied-native","name":"bash","arguments":"{\"command\":\"echo AUTO_DENIED\"}"}}},{"type":"chunk","time":1791315723125,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
@@ -19,7 +19,7 @@
{"type":"step/start","data":{"turn":1,"step":2}}
{"type":"system/message","data":{"turn":1,"step":2,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{message:6}}"}},"sourceEventSeqs":[7],"surfaceOp":{"op":"replace","startSeq":7,"endSeq":7}}
{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":["run_code"]},"reason":"change","startsSeries":true}}
-{"type":"developer/message","data":{"turn":1,"step":2,"message":{"source":{"kind":"tool-registry"},"content":[{"type":"tool-addition","toolName":"run_code"},{"type":"tool-removal","toolName":"bash"},{"type":"tool-removal","toolName":"create_goal"},{"type":"tool-removal","toolName":"edit"},{"type":"tool-removal","toolName":"exit_plan_mode"},{"type":"tool-removal","toolName":"get_goal"},{"type":"tool-removal","toolName":"glob"},{"type":"tool-removal","toolName":"grep"},{"type":"tool-removal","toolName":"interrupt_agent"},{"type":"tool-removal","toolName":"job_kill"},{"type":"tool-removal","toolName":"job_list"},{"type":"tool-removal","toolName":"job_output"},{"type":"tool-removal","toolName":"list_agents"},{"type":"tool-removal","toolName":"read"},{"type":"tool-removal","toolName":"read_image"},{"type":"tool-removal","toolName":"send_message"},{"type":"tool-removal","toolName":"skill"},{"type":"tool-removal","toolName":"subagent"},{"type":"tool-removal","toolName":"subagent_fork"},{"type":"tool-removal","toolName":"todo_write"},{"type":"tool-removal","toolName":"update_goal"},{"type":"tool-removal","toolName":"web_fetch"},{"type":"tool-removal","toolName":"web_search"},{"type":"tool-removal","toolName":"workflow"},{"type":"tool-removal","toolName":"working_directory"},{"type":"tool-removal","toolName":"write"}],"role":"developer","id":"{{message:7}}"},"headerSeq":19},"surfaceOp":"append"}
+{"type":"developer/message","data":{"turn":1,"step":2,"message":{"source":{"kind":"tool-registry"},"content":[{"type":"tool-addition","toolName":"run_code"},{"type":"tool-removal","toolName":"bash"},{"type":"tool-removal","toolName":"create_goal"},{"type":"tool-removal","toolName":"edit"},{"type":"tool-removal","toolName":"exit_plan_mode"},{"type":"tool-removal","toolName":"get_goal"},{"type":"tool-removal","toolName":"glob"},{"type":"tool-removal","toolName":"grep"},{"type":"tool-removal","toolName":"interrupt_agent"},{"type":"tool-removal","toolName":"job_kill"},{"type":"tool-removal","toolName":"job_list"},{"type":"tool-removal","toolName":"job_output"},{"type":"tool-removal","toolName":"list_agents"},{"type":"tool-removal","toolName":"list_subagent_models"},{"type":"tool-removal","toolName":"read"},{"type":"tool-removal","toolName":"read_image"},{"type":"tool-removal","toolName":"send_message"},{"type":"tool-removal","toolName":"skill"},{"type":"tool-removal","toolName":"subagent"},{"type":"tool-removal","toolName":"subagent_fork"},{"type":"tool-removal","toolName":"todo_write"},{"type":"tool-removal","toolName":"update_goal"},{"type":"tool-removal","toolName":"web_fetch"},{"type":"tool-removal","toolName":"web_search"},{"type":"tool-removal","toolName":"workflow"},{"type":"tool-removal","toolName":"working_directory"},{"type":"tool-removal","toolName":"write"}],"role":"developer","id":"{{message:7}}"},"headerSeq":19},"surfaceOp":"append"}
{"type":"assistant/message","data":{"turn":1,"step":2,"message":{"role":"assistant","content":[{"type":"tool-call","id":"denied-code","name":"run_code","arguments":"{\"code\":\"try { await tools.bash({command: \\\"echo AUTO_DENIED\\\"}) } catch (error) { return error.message }\",\"description\":\"Catch one denied inner call\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:8}}"},"stream":[{"type":"chunk","time":1791315723151,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1791315723151,"index":0,"dt":[],"id":"denied-code","name":"run_code","args":["{\"code\":\"try { await tools.bash({command: \\\"echo AUTO_DENIED\\\"}) } catch (error) { return error.message }\",\"description\":\"Catch one denied inner call\"}"]},{"type":"chunk","time":1791315723151,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"denied-code","name":"run_code","arguments":"{\"code\":\"try { await tools.bash({command: \\\"echo AUTO_DENIED\\\"}) } catch (error) { return error.message }\",\"description\":\"Catch one denied inner call\"}"}}},{"type":"chunk","time":1791315723151,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
{"type":"tool/call","data":{"turn":1,"step":2,"callId":"denied-code","name":"run_code","arguments":"{\"code\":\"try { await tools.bash({command: \\\"echo AUTO_DENIED\\\"}) } catch (error) { return error.message }\",\"description\":\"Catch one denied inner call\"}"}}
{"type":"tool/ptc-dispatch-start","data":{"rootCallId":"denied-code","parentCallId":"denied-code","subCallId":"denied-code:ptc:1","name":"bash","arguments":{"command":"echo AUTO_DENIED"}}}
diff --git a/snapshots/sdk/tool-error-details/system-prompt.expected.md b/snapshots/sdk/tool-error-details/system-prompt.expected.md
index 3e07cf694e..2404a544b1 100644
--- a/snapshots/sdk/tool-error-details/system-prompt.expected.md
+++ b/snapshots/sdk/tool-error-details/system-prompt.expected.md
@@ -173,6 +173,13 @@ interface ToolArgsMap {
/** children (default) lists direct children, which accept send_message in any status. descendants lists the whole tree below you with each entry's parent session id and depth; entries deeper than 1 accept only interrupt_agent. */
scope?: "children" | "descendants";
} & Record;
+ /** Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation. */
+ list_subagent_models: {
+ /** Registered LLM provider id. */
+ provider?: string;
+ /** Exact model id; requires provider. */
+ model?: string;
+ } & Record;
/** Read a UTF-8 text file and return line-numbered content. */
read: {
/** Path to read, resolved by the filesystem backend. */
@@ -440,6 +447,7 @@ interface ToolOutputMap {
parent?: string;
depth?: number;
})[];
+ list_subagent_models: string;
read: {
/** Canonical absolute path in the filesystem execution world. */
path: string;
diff --git a/snapshots/sdk/tool-error-details/tool-schemas.expected.json b/snapshots/sdk/tool-error-details/tool-schemas.expected.json
index 1fc057eb2d..6dda3bd732 100644
--- a/snapshots/sdk/tool-error-details/tool-schemas.expected.json
+++ b/snapshots/sdk/tool-error-details/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/advanced-toolchain/session.v4.jsonl b/snapshots/session/advanced-toolchain/session.v4.jsonl
index c0f1a22b8d..b9591d4802 100644
--- a/snapshots/session/advanced-toolchain/session.v4.jsonl
+++ b/snapshots/session/advanced-toolchain/session.v4.jsonl
@@ -9,7 +9,7 @@
{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{message:2}}"}},"surfaceOp":"append"}
{"type":"user/message","data":{"content":[{"type":"text","text":"Run this advanced flow exactly once: list runtime inspect providers; discover providers through run_code when available; delegate once to a direct spawn child; run one workflow that delegates to another spawn child; list providers again; then reply with exactly ADVANCED_HEADLESS_OK."}],"source":{"kind":"user"},"role":"user","id":"{{message:1}}"},"surfaceOp":"append"}
{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"{{cwd}}\"."},{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{message:3}}"},"surfaceOp":"append"}
-{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":["bash","cordis_inspect_list","cordis_inspect_query","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"initial"}}
+{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":["bash","cordis_inspect_list","cordis_inspect_query","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","list_subagent_models","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"initial"}}
{"type":"request/context","data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}
{"type":"session/title","data":{"title":"Run this advanced flow exactly","messageSeqs":[8],"source":{"kind":"fallback"}}}
{"type":"assistant/message","data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"tool-call","id":"advanced-inspect-before","name":"cordis_inspect_list","arguments":"{}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:4}}"},"usage":{"inputTokens":3,"outputTokens":3},"stream":[{"type":"chunk","time":1791315715021,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1791315715022,"index":0,"dt":[],"id":"advanced-inspect-before","name":"cordis_inspect_list","args":["{}"]},{"type":"chunk","time":1791315715022,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"advanced-inspect-before","name":"cordis_inspect_list","arguments":"{}"}}},{"type":"chunk","time":1791315715022,"chunk":{"type":"usage","usage":{"inputTokens":3,"outputTokens":3}}},{"type":"chunk","time":1791315715022,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
@@ -19,7 +19,7 @@
{"type":"step/start","data":{"turn":1,"step":2}}
{"type":"system/message","data":{"turn":1,"step":2,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{message:6}}"}},"sourceEventSeqs":[7],"surfaceOp":{"op":"replace","startSeq":7,"endSeq":7}}
{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":["run_code"]},"reason":"change","startsSeries":true}}
-{"type":"developer/message","data":{"turn":1,"step":2,"message":{"source":{"kind":"tool-registry"},"content":[{"type":"tool-addition","toolName":"run_code"},{"type":"tool-removal","toolName":"bash"},{"type":"tool-removal","toolName":"cordis_inspect_list"},{"type":"tool-removal","toolName":"cordis_inspect_query"},{"type":"tool-removal","toolName":"create_goal"},{"type":"tool-removal","toolName":"edit"},{"type":"tool-removal","toolName":"exit_plan_mode"},{"type":"tool-removal","toolName":"get_goal"},{"type":"tool-removal","toolName":"glob"},{"type":"tool-removal","toolName":"grep"},{"type":"tool-removal","toolName":"interrupt_agent"},{"type":"tool-removal","toolName":"job_kill"},{"type":"tool-removal","toolName":"job_list"},{"type":"tool-removal","toolName":"job_output"},{"type":"tool-removal","toolName":"list_agents"},{"type":"tool-removal","toolName":"read"},{"type":"tool-removal","toolName":"read_image"},{"type":"tool-removal","toolName":"send_message"},{"type":"tool-removal","toolName":"skill"},{"type":"tool-removal","toolName":"subagent"},{"type":"tool-removal","toolName":"subagent_fork"},{"type":"tool-removal","toolName":"todo_write"},{"type":"tool-removal","toolName":"update_goal"},{"type":"tool-removal","toolName":"web_fetch"},{"type":"tool-removal","toolName":"web_search"},{"type":"tool-removal","toolName":"workflow"},{"type":"tool-removal","toolName":"working_directory"},{"type":"tool-removal","toolName":"write"}],"role":"developer","id":"{{message:7}}"},"headerSeq":19},"surfaceOp":"append"}
+{"type":"developer/message","data":{"turn":1,"step":2,"message":{"source":{"kind":"tool-registry"},"content":[{"type":"tool-addition","toolName":"run_code"},{"type":"tool-removal","toolName":"bash"},{"type":"tool-removal","toolName":"cordis_inspect_list"},{"type":"tool-removal","toolName":"cordis_inspect_query"},{"type":"tool-removal","toolName":"create_goal"},{"type":"tool-removal","toolName":"edit"},{"type":"tool-removal","toolName":"exit_plan_mode"},{"type":"tool-removal","toolName":"get_goal"},{"type":"tool-removal","toolName":"glob"},{"type":"tool-removal","toolName":"grep"},{"type":"tool-removal","toolName":"interrupt_agent"},{"type":"tool-removal","toolName":"job_kill"},{"type":"tool-removal","toolName":"job_list"},{"type":"tool-removal","toolName":"job_output"},{"type":"tool-removal","toolName":"list_agents"},{"type":"tool-removal","toolName":"list_subagent_models"},{"type":"tool-removal","toolName":"read"},{"type":"tool-removal","toolName":"read_image"},{"type":"tool-removal","toolName":"send_message"},{"type":"tool-removal","toolName":"skill"},{"type":"tool-removal","toolName":"subagent"},{"type":"tool-removal","toolName":"subagent_fork"},{"type":"tool-removal","toolName":"todo_write"},{"type":"tool-removal","toolName":"update_goal"},{"type":"tool-removal","toolName":"web_fetch"},{"type":"tool-removal","toolName":"web_search"},{"type":"tool-removal","toolName":"workflow"},{"type":"tool-removal","toolName":"working_directory"},{"type":"tool-removal","toolName":"write"}],"role":"developer","id":"{{message:7}}"},"headerSeq":19},"surfaceOp":"append"}
{"type":"assistant/message","data":{"turn":1,"step":2,"message":{"role":"assistant","content":[{"type":"tool-call","id":"advanced-code","name":"run_code","arguments":"{\"code\":\"const inspected = await tools.cordis_inspect_list({}); return inspected.providers.map(provider => provider.id);\",\"description\":\"Discover runtime APIs through PTC\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:8}}"},"usage":{"inputTokens":3,"outputTokens":3},"stream":[{"type":"chunk","time":1791315715055,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1791315715055,"index":0,"dt":[],"id":"advanced-code","name":"run_code","args":["{\"code\":\"const inspected = await tools.cordis_inspect_list({}); return inspected.providers.map(provider => provider.id);\",\"description\":\"Discover runtime APIs through PTC\"}"]},{"type":"chunk","time":1791315715055,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"advanced-code","name":"run_code","arguments":"{\"code\":\"const inspected = await tools.cordis_inspect_list({}); return inspected.providers.map(provider => provider.id);\",\"description\":\"Discover runtime APIs through PTC\"}"}}},{"type":"chunk","time":1791315715055,"chunk":{"type":"usage","usage":{"inputTokens":3,"outputTokens":3}}},{"type":"chunk","time":1791315715055,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
{"type":"tool/call","data":{"turn":1,"step":2,"callId":"advanced-code","name":"run_code","arguments":"{\"code\":\"const inspected = await tools.cordis_inspect_list({}); return inspected.providers.map(provider => provider.id);\",\"description\":\"Discover runtime APIs through PTC\"}"}}
{"type":"tool/ptc-dispatch-start","data":{"rootCallId":"advanced-code","parentCallId":"advanced-code","subCallId":"advanced-code:ptc:1","name":"cordis_inspect_list","arguments":{}}}
@@ -28,8 +28,8 @@
{"type":"step/end","data":{"turn":1,"step":2}}
{"type":"step/start","data":{"turn":1,"step":3}}
{"type":"system/message","data":{"turn":1,"step":3,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{message:10}}"}},"sourceEventSeqs":[18],"surfaceOp":{"op":"replace","startSeq":18,"endSeq":18}}
-{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":["bash","cordis_inspect_list","cordis_inspect_query","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change","startsSeries":true}}
-{"type":"developer/message","data":{"turn":1,"step":3,"message":{"source":{"kind":"tool-registry"},"content":[{"type":"tool-addition","toolName":"bash"},{"type":"tool-addition","toolName":"cordis_inspect_list"},{"type":"tool-addition","toolName":"cordis_inspect_query"},{"type":"tool-addition","toolName":"create_goal"},{"type":"tool-addition","toolName":"edit"},{"type":"tool-addition","toolName":"exit_plan_mode"},{"type":"tool-addition","toolName":"get_goal"},{"type":"tool-addition","toolName":"glob"},{"type":"tool-addition","toolName":"grep"},{"type":"tool-addition","toolName":"interrupt_agent"},{"type":"tool-addition","toolName":"job_kill"},{"type":"tool-addition","toolName":"job_list"},{"type":"tool-addition","toolName":"job_output"},{"type":"tool-addition","toolName":"list_agents"},{"type":"tool-addition","toolName":"read"},{"type":"tool-addition","toolName":"read_image"},{"type":"tool-addition","toolName":"send_message"},{"type":"tool-addition","toolName":"skill"},{"type":"tool-addition","toolName":"subagent"},{"type":"tool-addition","toolName":"subagent_fork"},{"type":"tool-addition","toolName":"todo_write"},{"type":"tool-addition","toolName":"update_goal"},{"type":"tool-addition","toolName":"web_fetch"},{"type":"tool-addition","toolName":"web_search"},{"type":"tool-addition","toolName":"workflow"},{"type":"tool-addition","toolName":"working_directory"},{"type":"tool-addition","toolName":"write"},{"type":"tool-removal","toolName":"run_code"}],"role":"developer","id":"{{message:11}}"},"headerSeq":29},"surfaceOp":"append"}
+{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash"},"tools":["bash","cordis_inspect_list","cordis_inspect_query","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","list_subagent_models","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change","startsSeries":true}}
+{"type":"developer/message","data":{"turn":1,"step":3,"message":{"source":{"kind":"tool-registry"},"content":[{"type":"tool-addition","toolName":"bash"},{"type":"tool-addition","toolName":"cordis_inspect_list"},{"type":"tool-addition","toolName":"cordis_inspect_query"},{"type":"tool-addition","toolName":"create_goal"},{"type":"tool-addition","toolName":"edit"},{"type":"tool-addition","toolName":"exit_plan_mode"},{"type":"tool-addition","toolName":"get_goal"},{"type":"tool-addition","toolName":"glob"},{"type":"tool-addition","toolName":"grep"},{"type":"tool-addition","toolName":"interrupt_agent"},{"type":"tool-addition","toolName":"job_kill"},{"type":"tool-addition","toolName":"job_list"},{"type":"tool-addition","toolName":"job_output"},{"type":"tool-addition","toolName":"list_agents"},{"type":"tool-addition","toolName":"list_subagent_models"},{"type":"tool-addition","toolName":"read"},{"type":"tool-addition","toolName":"read_image"},{"type":"tool-addition","toolName":"send_message"},{"type":"tool-addition","toolName":"skill"},{"type":"tool-addition","toolName":"subagent"},{"type":"tool-addition","toolName":"subagent_fork"},{"type":"tool-addition","toolName":"todo_write"},{"type":"tool-addition","toolName":"update_goal"},{"type":"tool-addition","toolName":"web_fetch"},{"type":"tool-addition","toolName":"web_search"},{"type":"tool-addition","toolName":"workflow"},{"type":"tool-addition","toolName":"working_directory"},{"type":"tool-addition","toolName":"write"},{"type":"tool-removal","toolName":"run_code"}],"role":"developer","id":"{{message:11}}"},"headerSeq":29},"surfaceOp":"append"}
{"type":"assistant/message","data":{"turn":1,"step":3,"message":{"role":"assistant","content":[{"type":"tool-call","id":"advanced-direct-child","name":"subagent","arguments":"{\"description\":\"Check direct child\",\"prompt\":\"Reply with exactly DIRECT_CHILD_OK and nothing else.\",\"run_in_background\":false}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:12}}"},"usage":{"inputTokens":3,"outputTokens":3},"stream":[{"type":"chunk","time":1791315715200,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1791315715200,"index":0,"dt":[],"id":"advanced-direct-child","name":"subagent","args":["{\"description\":\"Check direct child\",\"prompt\":\"Reply with exactly DIRECT_CHILD_OK and nothing else.\",\"run_in_background\":false}"]},{"type":"chunk","time":1791315715200,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"advanced-direct-child","name":"subagent","arguments":"{\"description\":\"Check direct child\",\"prompt\":\"Reply with exactly DIRECT_CHILD_OK and nothing else.\",\"run_in_background\":false}"}}},{"type":"chunk","time":1791315715200,"chunk":{"type":"usage","usage":{"inputTokens":3,"outputTokens":3}}},{"type":"chunk","time":1791315715200,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
{"type":"tool/call","data":{"turn":1,"step":3,"callId":"advanced-direct-child","name":"subagent","arguments":"{\"description\":\"Check direct child\",\"prompt\":\"Reply with exactly DIRECT_CHILD_OK and nothing else.\",\"run_in_background\":false}"}}
{"type":"subagent/catalog","data":{"version":0,"childId":"{{session:2}}","childCreatedAt":1791315715221,"mode":"continuable","label":"Check direct child"}}
diff --git a/snapshots/session/advanced-toolchain/system-prompt.expected.md b/snapshots/session/advanced-toolchain/system-prompt.expected.md
index 71138e38ad..b413ee5015 100644
--- a/snapshots/session/advanced-toolchain/system-prompt.expected.md
+++ b/snapshots/session/advanced-toolchain/system-prompt.expected.md
@@ -186,6 +186,13 @@ interface ToolArgsMap {
/** children (default) lists direct children, which accept send_message in any status. descendants lists the whole tree below you with each entry's parent session id and depth; entries deeper than 1 accept only interrupt_agent. */
scope?: "children" | "descendants";
} & Record;
+ /** Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation. */
+ list_subagent_models: {
+ /** Registered LLM provider id. */
+ provider?: string;
+ /** Exact model id; requires provider. */
+ model?: string;
+ } & Record;
/** Read a UTF-8 text file and return line-numbered content. */
read: {
/** Path to read, resolved by the filesystem backend. */
@@ -455,6 +462,7 @@ interface ToolOutputMap {
parent?: string;
depth?: number;
})[];
+ list_subagent_models: string;
read: {
/** Canonical absolute path in the filesystem execution world. */
path: string;
diff --git a/snapshots/session/advanced-toolchain/tool-schemas.expected.json b/snapshots/session/advanced-toolchain/tool-schemas.expected.json
index fd6dd221e8..3f43f0c5b4 100644
--- a/snapshots/session/advanced-toolchain/tool-schemas.expected.json
+++ b/snapshots/session/advanced-toolchain/tool-schemas.expected.json
@@ -301,6 +301,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
@@ -1014,6 +1031,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/agent-instructions/tool-schemas.expected.json b/snapshots/session/agent-instructions/tool-schemas.expected.json
index 00e71002a7..b42c59f636 100644
--- a/snapshots/session/agent-instructions/tool-schemas.expected.json
+++ b/snapshots/session/agent-instructions/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
@@ -893,6 +910,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/background-confinement-failure/tool-schemas.expected.json b/snapshots/session/background-confinement-failure/tool-schemas.expected.json
index 2b4b1f069f..93788fc8b2 100644
--- a/snapshots/session/background-confinement-failure/tool-schemas.expected.json
+++ b/snapshots/session/background-confinement-failure/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/both-mode-turn/system-prompt.expected.md b/snapshots/session/both-mode-turn/system-prompt.expected.md
index 9aaa613e04..34bf2d96ac 100644
--- a/snapshots/session/both-mode-turn/system-prompt.expected.md
+++ b/snapshots/session/both-mode-turn/system-prompt.expected.md
@@ -140,6 +140,13 @@ interface ToolArgsMap {
/** children (default) lists direct children, which accept send_message in any status. descendants lists the whole tree below you with each entry's parent session id and depth; entries deeper than 1 accept only interrupt_agent. */
scope?: "children" | "descendants";
} & Record;
+ /** Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation. */
+ list_subagent_models: {
+ /** Registered LLM provider id. */
+ provider?: string;
+ /** Exact model id; requires provider. */
+ model?: string;
+ } & Record;
/** Read a UTF-8 text file and return line-numbered content. */
read: {
/** Path to read, resolved by the filesystem backend. */
@@ -407,6 +414,7 @@ interface ToolOutputMap {
parent?: string;
depth?: number;
})[];
+ list_subagent_models: string;
read: {
/** Canonical absolute path in the filesystem execution world. */
path: string;
diff --git a/snapshots/session/browser-use-chrome-devtools-mcp/tool-schemas.expected.json b/snapshots/session/browser-use-chrome-devtools-mcp/tool-schemas.expected.json
index cd473bea70..8e796691a4 100644
--- a/snapshots/session/browser-use-chrome-devtools-mcp/tool-schemas.expected.json
+++ b/snapshots/session/browser-use-chrome-devtools-mcp/tool-schemas.expected.json
@@ -300,6 +300,23 @@
]
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "mcp__chrome-devtools-mcp__take_screenshot",
"description": "Take a screenshot of the page or element.",
diff --git a/snapshots/session/browser-use-playwright-mcp/tool-schemas.expected.json b/snapshots/session/browser-use-playwright-mcp/tool-schemas.expected.json
index 2d24d7c17d..b75a77d0c2 100644
--- a/snapshots/session/browser-use-playwright-mcp/tool-schemas.expected.json
+++ b/snapshots/session/browser-use-playwright-mcp/tool-schemas.expected.json
@@ -300,6 +300,23 @@
]
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "mcp__playwright-mcp__browser_take_screenshot",
"description": "Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.",
diff --git a/snapshots/session/browser-use-stagehand-native/tool-schemas.expected.json b/snapshots/session/browser-use-stagehand-native/tool-schemas.expected.json
index e1acbc8206..c31143de2c 100644
--- a/snapshots/session/browser-use-stagehand-native/tool-schemas.expected.json
+++ b/snapshots/session/browser-use-stagehand-native/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/claude-code-mods/tool-schemas.expected.json b/snapshots/session/claude-code-mods/tool-schemas.expected.json
index 2b4b1f069f..93788fc8b2 100644
--- a/snapshots/session/claude-code-mods/tool-schemas.expected.json
+++ b/snapshots/session/claude-code-mods/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/compaction-output-reserve/cordis.snapshot.yml b/snapshots/session/compaction-output-reserve/cordis.snapshot.yml
index 09b732a14a..4ae939ccab 100644
--- a/snapshots/session/compaction-output-reserve/cordis.snapshot.yml
+++ b/snapshots/session/compaction-output-reserve/cordis.snapshot.yml
@@ -1,5 +1,5 @@
# With 1,800 tokens of headroom, a 1,000-token output reservation lowers the
-# trigger from 6,822 to 5,822, between the history and its condensed replacement.
+# trigger from 6,951 to 5,951, between the history and its condensed replacement.
- id: agent-instructions
disabled: true
@@ -31,7 +31,7 @@
name: DeepSeek
models:
- id: deepseek-v4-flash
- contextWindow: 8622
+ contextWindow: 8751
defaultMaxTokens: 1000
- id: compaction-working-directory
name: '../../../packages/test-support/session-snapshot/tests/fixtures/compaction-working-directory.ts'
diff --git a/snapshots/session/compaction-output-reserve/cordis.yml b/snapshots/session/compaction-output-reserve/cordis.yml
index c2bcbbfc1d..e623bba863 100644
--- a/snapshots/session/compaction-output-reserve/cordis.yml
+++ b/snapshots/session/compaction-output-reserve/cordis.yml
@@ -7,7 +7,7 @@
config:
models:
- id: deepseek-v4-flash
- contextWindow: 8622
+ contextWindow: 8751
maxTokens: 1000
- id: compaction-basic
diff --git a/snapshots/session/compaction-output-reserve/session.v4.jsonl b/snapshots/session/compaction-output-reserve/session.v4.jsonl
index 98bb166284..47f182ca06 100644
--- a/snapshots/session/compaction-output-reserve/session.v4.jsonl
+++ b/snapshots/session/compaction-output-reserve/session.v4.jsonl
@@ -11,7 +11,7 @@
{"type":"user/message","data":{"content":[{"type":"text","text":"Establish a durable compaction premise before continuing. Record every part of this historical evidence: the snapshot uses keyless replay; persistence uses JSONL; the assembled headless application loads its real Cordis composition; model-visible inputs remain logged; tool calls and results remain paired and ordered; output reservation reduces the message budget before proactive compaction; compaction opens with compaction/start and closes with compaction/end; a successful auxiliary summary records compaction/summary source metadata; the replacement surface shadows only an older balanced range; the checkpoint remains smaller than the history it replaces; the newest tool result remains verbatim; the next request sees that checkpoint; the final response proves the same turn continued; deterministic snapshot evidence stays separate from the live-provider smoke; and no external API key is needed. Emit one alpha marker through bash, then finish the task after proactive compaction with the exact words PROACTIVE COMPACTION COMPLETE."}],"source":{"kind":"user"},"role":"user","id":"{{message:1}}"},"surfaceOp":"append"}
{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"/tmp\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"/tmp\"."},{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{message:3}}"},"surfaceOp":"append"}
{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":1000},"adapterDefaults":{"maxTokens":true},"tools":"{{tools}}"},"reason":"initial"}}
-{"type":"request/context","data":{"provider":"deepseek-official","model":"deepseek-v4-flash","contextWindow":8622}}
+{"type":"request/context","data":{"provider":"deepseek-official","model":"deepseek-v4-flash","contextWindow":8751}}
{"type":"session/title","data":{"title":"Establish a durable compaction premise","messageSeqs":[9],"source":{"kind":"fallback"}}}
{"type":"assistant/message","data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"tool-call","id":"call_compaction_marker","name":"bash","arguments":"{\"command\":\"printf 'alpha\\n'\",\"description\":\"Emit compaction premise marker\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:4}}"},"usage":{"inputTokens":24,"outputTokens":6},"stream":[{"type":"chunk","time":1791427805327,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1791427805327,"index":0,"dt":[],"id":"call_compaction_marker","name":"bash","args":["{\"command\":\"printf 'alpha\\n'\",\"description\":\"Emit compaction premise marker\"}"]},{"type":"chunk","time":1791427805327,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_compaction_marker","name":"bash","arguments":"{\"command\":\"printf 'alpha\\n'\",\"description\":\"Emit compaction premise marker\"}"}}},{"type":"chunk","time":1791427805327,"chunk":{"type":"usage","usage":{"inputTokens":24,"outputTokens":6}}},{"type":"chunk","time":1791427805327,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
{"type":"tool/call","data":{"turn":1,"step":1,"callId":"call_compaction_marker","name":"bash","arguments":"{\"command\":\"printf 'alpha\\n'\",\"description\":\"Emit compaction premise marker\"}"}}
diff --git a/snapshots/session/compaction-recovery/tool-schemas.expected.json b/snapshots/session/compaction-recovery/tool-schemas.expected.json
index 00e71002a7..b42c59f636 100644
--- a/snapshots/session/compaction-recovery/tool-schemas.expected.json
+++ b/snapshots/session/compaction-recovery/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
@@ -893,6 +910,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/compaction-summary-headroom/cordis.snapshot.yml b/snapshots/session/compaction-summary-headroom/cordis.snapshot.yml
index 2c6f7de38e..21edfaf357 100644
--- a/snapshots/session/compaction-summary-headroom/cordis.snapshot.yml
+++ b/snapshots/session/compaction-summary-headroom/cordis.snapshot.yml
@@ -1,5 +1,5 @@
# The summary output cap inherits the 1,800-token headroom. A 1,000-token
-# request output reservation lowers the proactive trigger to 5,822 tokens.
+# request output reservation lowers the proactive trigger to 5,951 tokens.
- id: agent-instructions
disabled: true
@@ -30,7 +30,7 @@
name: DeepSeek
models:
- id: deepseek-v4-flash
- contextWindow: 8622
+ contextWindow: 8751
defaultMaxTokens: 1000
- id: compaction-working-directory
name: '../../../packages/test-support/session-snapshot/tests/fixtures/compaction-working-directory.ts'
diff --git a/snapshots/session/compaction-summary-headroom/cordis.yml b/snapshots/session/compaction-summary-headroom/cordis.yml
index d7791a840a..999dfd1bdb 100644
--- a/snapshots/session/compaction-summary-headroom/cordis.yml
+++ b/snapshots/session/compaction-summary-headroom/cordis.yml
@@ -7,7 +7,7 @@
config:
models:
- id: deepseek-v4-flash
- contextWindow: 8622
+ contextWindow: 8751
maxTokens: 1000
- id: compaction-basic
diff --git a/snapshots/session/compaction-summary-headroom/session.v4.jsonl b/snapshots/session/compaction-summary-headroom/session.v4.jsonl
index 91473dcf98..cdd993fb04 100644
--- a/snapshots/session/compaction-summary-headroom/session.v4.jsonl
+++ b/snapshots/session/compaction-summary-headroom/session.v4.jsonl
@@ -11,7 +11,7 @@
{"type":"user/message","data":{"content":[{"type":"text","text":"Establish a durable compaction premise before continuing. Record every part of this historical evidence: the snapshot uses keyless replay; persistence uses JSONL; the assembled headless application loads its real Cordis composition; model-visible inputs remain logged; tool calls and results remain paired and ordered; output reservation reduces the message budget before proactive compaction; compaction opens with compaction/start and closes with compaction/end; a successful auxiliary summary records compaction/summary source metadata; the replacement surface shadows only an older balanced range; the checkpoint remains smaller than the history it replaces; the newest tool result remains verbatim; the next request sees that checkpoint; the final response proves the same turn continued; deterministic snapshot evidence stays separate from the live-provider smoke; and no external API key is needed. Emit one alpha marker through bash, then finish the task after proactive compaction with the exact words PROACTIVE COMPACTION COMPLETE."}],"source":{"kind":"user"},"role":"user","id":"{{message:1}}"},"surfaceOp":"append"}
{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"/tmp\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"/tmp\"."},{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{message:3}}"},"surfaceOp":"append"}
{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":1000},"adapterDefaults":{"maxTokens":true},"tools":"{{tools}}"},"reason":"initial"}}
-{"type":"request/context","data":{"provider":"deepseek-official","model":"deepseek-v4-flash","contextWindow":8622}}
+{"type":"request/context","data":{"provider":"deepseek-official","model":"deepseek-v4-flash","contextWindow":8751}}
{"type":"session/title","data":{"title":"Establish a durable compaction premise","messageSeqs":[9],"source":{"kind":"fallback"}}}
{"type":"assistant/message","data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"tool-call","id":"call_compaction_marker","name":"bash","arguments":"{\"command\":\"printf 'alpha\\n'\",\"description\":\"Emit compaction premise marker\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:4}}"},"usage":{"inputTokens":24,"outputTokens":6},"stream":[{"type":"chunk","time":1791427807038,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1791427807038,"index":0,"dt":[],"id":"call_compaction_marker","name":"bash","args":["{\"command\":\"printf 'alpha\\n'\",\"description\":\"Emit compaction premise marker\"}"]},{"type":"chunk","time":1791427807038,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_compaction_marker","name":"bash","arguments":"{\"command\":\"printf 'alpha\\n'\",\"description\":\"Emit compaction premise marker\"}"}}},{"type":"chunk","time":1791427807038,"chunk":{"type":"usage","usage":{"inputTokens":24,"outputTokens":6}}},{"type":"chunk","time":1791427807038,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
{"type":"tool/call","data":{"turn":1,"step":1,"callId":"call_compaction_marker","name":"bash","arguments":"{\"command\":\"printf 'alpha\\n'\",\"description\":\"Emit compaction premise marker\"}"}}
diff --git a/snapshots/session/computer-use-cua-driver-mcp/tool-schemas.expected.json b/snapshots/session/computer-use-cua-driver-mcp/tool-schemas.expected.json
index 4b839adb31..5555ebf222 100644
--- a/snapshots/session/computer-use-cua-driver-mcp/tool-schemas.expected.json
+++ b/snapshots/session/computer-use-cua-driver-mcp/tool-schemas.expected.json
@@ -300,6 +300,23 @@
]
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "mcp__cua-driver-mcp__disconnect",
"description": "Disconnect the fixture.",
diff --git a/snapshots/session/computer-use-cua-driver-native/tool-schemas.expected.json b/snapshots/session/computer-use-cua-driver-native/tool-schemas.expected.json
index 802ed2fe0d..d2d8c07a2c 100644
--- a/snapshots/session/computer-use-cua-driver-native/tool-schemas.expected.json
+++ b/snapshots/session/computer-use-cua-driver-native/tool-schemas.expected.json
@@ -306,6 +306,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/cordis-inspect-jsdoc/tool-schemas.expected.json b/snapshots/session/cordis-inspect-jsdoc/tool-schemas.expected.json
index 5d880fdde7..e893407989 100644
--- a/snapshots/session/cordis-inspect-jsdoc/tool-schemas.expected.json
+++ b/snapshots/session/cordis-inspect-jsdoc/tool-schemas.expected.json
@@ -301,6 +301,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/cua-native/tool-schemas.expected.json b/snapshots/session/cua-native/tool-schemas.expected.json
index 970dd64091..e5b78cb6a2 100644
--- a/snapshots/session/cua-native/tool-schemas.expected.json
+++ b/snapshots/session/cua-native/tool-schemas.expected.json
@@ -1399,6 +1399,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/cua-ptc/system-prompt.expected.md b/snapshots/session/cua-ptc/system-prompt.expected.md
index 724b9bc2f3..c8e0c9c95b 100644
--- a/snapshots/session/cua-ptc/system-prompt.expected.md
+++ b/snapshots/session/cua-ptc/system-prompt.expected.md
@@ -185,6 +185,13 @@ interface ToolArgsMap {
/** children (default) lists direct children, which accept send_message in any status. descendants lists the whole tree below you with each entry's parent session id and depth; entries deeper than 1 accept only interrupt_agent. */
scope?: "children" | "descendants";
} & Record;
+ /** Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation. */
+ list_subagent_models: {
+ /** Registered LLM provider id. */
+ provider?: string;
+ /** Exact model id; requires provider. */
+ model?: string;
+ } & Record;
/** Read a UTF-8 text file and return line-numbered content. */
read: {
/** Path to read, resolved by the filesystem backend. */
@@ -453,6 +460,7 @@ interface ToolOutputMap {
parent?: string;
depth?: number;
})[];
+ list_subagent_models: string;
read: {
/** Canonical absolute path in the filesystem execution world. */
path: string;
diff --git a/snapshots/session/deepseek-messages-system-prompt/tool-schemas.expected.json b/snapshots/session/deepseek-messages-system-prompt/tool-schemas.expected.json
index 2b4b1f069f..93788fc8b2 100644
--- a/snapshots/session/deepseek-messages-system-prompt/tool-schemas.expected.json
+++ b/snapshots/session/deepseek-messages-system-prompt/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/deepseek-protocol-system-prompt/tool-schemas.expected.json b/snapshots/session/deepseek-protocol-system-prompt/tool-schemas.expected.json
index 2b4b1f069f..93788fc8b2 100644
--- a/snapshots/session/deepseek-protocol-system-prompt/tool-schemas.expected.json
+++ b/snapshots/session/deepseek-protocol-system-prompt/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/dynamic-tool-prompt-updates/session.v4.jsonl b/snapshots/session/dynamic-tool-prompt-updates/session.v4.jsonl
index cff0e5a329..53e2ccd74b 100644
--- a/snapshots/session/dynamic-tool-prompt-updates/session.v4.jsonl
+++ b/snapshots/session/dynamic-tool-prompt-updates/session.v4.jsonl
@@ -9,7 +9,7 @@
{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{message:2}}"}},"surfaceOp":"append"}
{"type":"user/message","data":{"content":[{"type":"text","text":"Read task.txt, call the newly available snapshot_ping tool once, then reply DONE."}],"source":{"kind":"user"},"role":"user","id":"{{message:1}}"},"surfaceOp":"append"}
{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"{{cwd}}\"."},{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{message:3}}"},"surfaceOp":"append"}
-{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"initial"}}
+{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","list_subagent_models","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"initial"}}
{"type":"request/context","data":{"provider":"deepseek-official","model":"deepseek-v4-flash","systemPromptUpdate":"in-history"}}
{"type":"session/title","data":{"title":"Read task.txt, call the newly","messageSeqs":[8],"source":{"kind":"fallback"}}}
{"type":"assistant/message","data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"tool-call","id":"call_task_read","name":"read","arguments":"{\"file_path\":\"task.txt\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:4}}"},"usage":{"inputTokens":10,"outputTokens":5},"stream":[{"type":"chunk","time":1790149644504,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1790149644504,"index":0,"dt":[],"id":"call_task_read","name":"read","args":["{\"file_path\":\"task.txt\"}"]},{"type":"chunk","time":1790149644504,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_task_read","name":"read","arguments":"{\"file_path\":\"task.txt\"}"}}},{"type":"chunk","time":1790149644504,"chunk":{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}}},{"type":"chunk","time":1790149644504,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
@@ -18,14 +18,14 @@
{"type":"step/end","data":{"turn":1,"step":1}}
{"type":"step/start","data":{"turn":1,"step":2}}
{"type":"system/message","data":{"turn":1,"step":2,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{message:6}}"}},"surfaceOp":"append"}
-{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","read","read_image","send_message","skill","snapshot_ping","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change"}}
+{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","list_subagent_models","read","read_image","send_message","skill","snapshot_ping","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change"}}
{"type":"developer/message","data":{"turn":1,"step":2,"message":{"source":{"kind":"tool-registry"},"content":[{"type":"tool-addition","toolName":"snapshot_ping"}],"role":"developer","id":"{{message:7}}"},"headerSeq":19},"surfaceOp":"append"}
{"type":"assistant/message","data":{"turn":1,"step":2,"message":{"role":"assistant","content":[{"type":"tool-call","id":"call_dynamic_ping","name":"snapshot_ping","arguments":"{}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:8}}"},"stream":[{"type":"chunk","time":1790149644534,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1790149644534,"index":0,"dt":[],"id":"call_dynamic_ping","name":"snapshot_ping","args":["{}"]},{"type":"chunk","time":1790149644534,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_dynamic_ping","name":"snapshot_ping","arguments":"{}"}}},{"type":"chunk","time":1790149644535,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
{"type":"tool/call","data":{"turn":1,"step":2,"callId":"call_dynamic_ping","name":"snapshot_ping","arguments":"{}"}}
{"type":"tool/result","data":{"turn":1,"step":2,"message":{"role":"tool","source":{"kind":"tool","callId":"call_dynamic_ping"},"toolCallId":"call_dynamic_ping","content":[{"type":"text","text":"pong"}],"isError":false,"id":"{{message:9}}"}},"sourceEventSeqs":[22],"surfaceOp":"append"}
{"type":"step/end","data":{"turn":1,"step":2}}
{"type":"step/start","data":{"turn":1,"step":3}}
-{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change"}}
+{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","list_subagent_models","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change"}}
{"type":"developer/message","data":{"turn":1,"step":3,"message":{"source":{"kind":"tool-registry"},"content":[{"type":"tool-removal","toolName":"snapshot_ping"}],"role":"developer","id":"{{message:10}}"}},"surfaceOp":"append"}
{"type":"assistant/message","data":{"turn":1,"step":3,"message":{"role":"assistant","content":[{"type":"text","text":"DONE"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:11}}"},"usage":{"inputTokens":12,"outputTokens":2,"cacheReadTokens":10},"stream":[{"type":"chunk","time":1790149644557,"chunk":{"type":"block-start","index":0,"blockType":"text"}},{"type":"text-chunks","time0":1790149644557,"index":0,"dt":[],"texts":["DONE"]},{"type":"chunk","time":1790149644557,"chunk":{"type":"block-end","index":0,"block":{"type":"text","text":"DONE"}}},{"type":"chunk","time":1790149644557,"chunk":{"type":"usage","usage":{"inputTokens":12,"outputTokens":2,"cacheReadTokens":10}}},{"type":"chunk","time":1790149644557,"chunk":{"type":"finish","reason":{"kind":"stop"}}}]},"surfaceOp":"append"}
{"type":"step/end","data":{"turn":1,"step":3}}
diff --git a/snapshots/session/dynamic-tool-updates/session.v4.jsonl b/snapshots/session/dynamic-tool-updates/session.v4.jsonl
index aee79405da..8472750d16 100644
--- a/snapshots/session/dynamic-tool-updates/session.v4.jsonl
+++ b/snapshots/session/dynamic-tool-updates/session.v4.jsonl
@@ -9,7 +9,7 @@
{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{message:2}}"}},"surfaceOp":"append"}
{"type":"user/message","data":{"content":[{"type":"text","text":"Read task.txt, call the newly available snapshot_ping tool once, then reply DONE."}],"source":{"kind":"user"},"role":"user","id":"{{message:1}}"},"surfaceOp":"append"}
{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"{{cwd}}\"."},{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{message:3}}"},"surfaceOp":"append"}
-{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"initial"}}
+{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","list_subagent_models","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"initial"}}
{"type":"request/context","data":{"provider":"deepseek-official","model":"deepseek-v4-flash"}}
{"type":"session/title","data":{"title":"Read task.txt, call the newly","messageSeqs":[8],"source":{"kind":"fallback"}}}
{"type":"assistant/message","data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"tool-call","id":"call_task_read","name":"read","arguments":"{\"file_path\":\"task.txt\"}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:4}}"},"usage":{"inputTokens":10,"outputTokens":5},"stream":[{"type":"chunk","time":1790049391235,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1790049391235,"index":0,"dt":[],"id":"call_task_read","name":"read","args":["{\"file_path\":\"task.txt\"}"]},{"type":"chunk","time":1790049391235,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_task_read","name":"read","arguments":"{\"file_path\":\"task.txt\"}"}}},{"type":"chunk","time":1790049391235,"chunk":{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}}},{"type":"chunk","time":1790049391235,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
@@ -17,14 +17,14 @@
{"type":"tool/result","data":{"turn":1,"step":1,"message":{"role":"tool","source":{"kind":"tool","callId":"call_task_read"},"toolCallId":"call_task_read","content":[{"type":"text","text":"{{cwd}}/task.txt\nfile\n\n1: Reply with the single word DONE after reading this file.\n\n(End of file - total 1 lines)\n"}],"isError":false,"id":"{{message:5}}"},"meta":{"path":"{{cwd}}/task.txt","offset":1,"lines":[{"number":1,"text":"Reply with the single word DONE after reading this file."}],"totalLines":1}},"sourceEventSeqs":[14],"surfaceOp":"append"}
{"type":"step/end","data":{"turn":1,"step":1}}
{"type":"step/start","data":{"turn":1,"step":2}}
-{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","read","read_image","send_message","skill","snapshot_ping","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change"}}
+{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","list_subagent_models","read","read_image","send_message","skill","snapshot_ping","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change"}}
{"type":"developer/message","data":{"turn":1,"step":2,"message":{"source":{"kind":"tool-registry"},"content":[{"type":"tool-addition","toolName":"snapshot_ping"}],"role":"developer","id":"{{message:6}}"},"headerSeq":18},"surfaceOp":"append"}
{"type":"assistant/message","data":{"turn":1,"step":2,"message":{"role":"assistant","content":[{"type":"tool-call","id":"call_dynamic_ping","name":"snapshot_ping","arguments":"{}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:7}}"},"stream":[{"type":"chunk","time":1790049391255,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1790049391255,"index":0,"dt":[],"id":"call_dynamic_ping","name":"snapshot_ping","args":["{}"]},{"type":"chunk","time":1790049391255,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_dynamic_ping","name":"snapshot_ping","arguments":"{}"}}},{"type":"chunk","time":1790049391255,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
{"type":"tool/call","data":{"turn":1,"step":2,"callId":"call_dynamic_ping","name":"snapshot_ping","arguments":"{}"}}
{"type":"tool/result","data":{"turn":1,"step":2,"message":{"role":"tool","source":{"kind":"tool","callId":"call_dynamic_ping"},"toolCallId":"call_dynamic_ping","content":[{"type":"text","text":"pong"}],"isError":false,"id":"{{message:8}}"}},"sourceEventSeqs":[21],"surfaceOp":"append"}
{"type":"step/end","data":{"turn":1,"step":2}}
{"type":"step/start","data":{"turn":1,"step":3}}
-{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change"}}
+{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"high"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","list_subagent_models","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change"}}
{"type":"developer/message","data":{"turn":1,"step":3,"message":{"source":{"kind":"tool-registry"},"content":[{"type":"tool-removal","toolName":"snapshot_ping"}],"role":"developer","id":"{{message:9}}"}},"surfaceOp":"append"}
{"type":"assistant/message","data":{"turn":1,"step":3,"message":{"role":"assistant","content":[{"type":"text","text":"DONE"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash"},"id":"{{message:10}}"},"usage":{"inputTokens":12,"outputTokens":2,"cacheReadTokens":10},"stream":[{"type":"chunk","time":1790049391270,"chunk":{"type":"block-start","index":0,"blockType":"text"}},{"type":"text-chunks","time0":1790049391270,"index":0,"dt":[],"texts":["DONE"]},{"type":"chunk","time":1790049391270,"chunk":{"type":"block-end","index":0,"block":{"type":"text","text":"DONE"}}},{"type":"chunk","time":1790049391270,"chunk":{"type":"usage","usage":{"inputTokens":12,"outputTokens":2,"cacheReadTokens":10}}},{"type":"chunk","time":1790049391270,"chunk":{"type":"finish","reason":{"kind":"stop"}}}]},"surfaceOp":"append"}
{"type":"step/end","data":{"turn":1,"step":3}}
diff --git a/snapshots/session/dynamic-tool-updates/tool-schemas.expected.json b/snapshots/session/dynamic-tool-updates/tool-schemas.expected.json
index 87bccafb3f..cd4251cb09 100644
--- a/snapshots/session/dynamic-tool-updates/tool-schemas.expected.json
+++ b/snapshots/session/dynamic-tool-updates/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
@@ -893,6 +910,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
@@ -1533,6 +1567,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/foreground-confinement-timeout/tool-schemas.expected.json b/snapshots/session/foreground-confinement-timeout/tool-schemas.expected.json
index 2b4b1f069f..93788fc8b2 100644
--- a/snapshots/session/foreground-confinement-timeout/tool-schemas.expected.json
+++ b/snapshots/session/foreground-confinement-timeout/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/fs-glob-sampling/tool-schemas.expected.json b/snapshots/session/fs-glob-sampling/tool-schemas.expected.json
index 3fb3980c3b..717234555b 100644
--- a/snapshots/session/fs-glob-sampling/tool-schemas.expected.json
+++ b/snapshots/session/fs-glob-sampling/tool-schemas.expected.json
@@ -180,6 +180,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/lsp-definition/tool-schemas.expected.json b/snapshots/session/lsp-definition/tool-schemas.expected.json
index 76087bb96f..59f7b37d78 100644
--- a/snapshots/session/lsp-definition/tool-schemas.expected.json
+++ b/snapshots/session/lsp-definition/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "lsp",
"description": "Query a language server for precise code navigation. operation is one of goToDefinition, findReferences, goToImplementation, hover. line and character are one-based UTF-16 cursor coordinates. findReferences includes the declaration.",
diff --git a/snapshots/session/mcp-resources-ptc/system-prompt.expected.md b/snapshots/session/mcp-resources-ptc/system-prompt.expected.md
index 404616e055..f21235ef44 100644
--- a/snapshots/session/mcp-resources-ptc/system-prompt.expected.md
+++ b/snapshots/session/mcp-resources-ptc/system-prompt.expected.md
@@ -162,6 +162,13 @@ interface ToolArgsMap {
/** Continuation cursor returned by this server. */
cursor?: string;
} & Record;
+ /** Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation. */
+ list_subagent_models: {
+ /** Registered LLM provider id. */
+ provider?: string;
+ /** Exact model id; requires provider. */
+ model?: string;
+ } & Record;
/** Read a UTF-8 text file and return line-numbered content. */
read: {
/** Path to read, resolved by the filesystem backend. */
@@ -438,6 +445,7 @@ interface ToolOutputMap {
})[];
list_mcp_resource_templates: JsonValue;
list_mcp_resources: JsonValue;
+ list_subagent_models: string;
read: {
/** Canonical absolute path in the filesystem execution world. */
path: string;
diff --git a/snapshots/session/mcp-resources/tool-schemas.expected.json b/snapshots/session/mcp-resources/tool-schemas.expected.json
index 4e5e9d557c..d203af935d 100644
--- a/snapshots/session/mcp-resources/tool-schemas.expected.json
+++ b/snapshots/session/mcp-resources/tool-schemas.expected.json
@@ -300,6 +300,23 @@
]
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/multimodal-spill-ends/tool-schemas.expected.json b/snapshots/session/multimodal-spill-ends/tool-schemas.expected.json
index 637c069b74..4fa6f15a7e 100644
--- a/snapshots/session/multimodal-spill-ends/tool-schemas.expected.json
+++ b/snapshots/session/multimodal-spill-ends/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "mcp__fixture__inspect",
"description": "Read a fixed window snapshot.",
diff --git a/snapshots/session/office-progressive-native/tool-schemas.expected.json b/snapshots/session/office-progressive-native/tool-schemas.expected.json
index 79d6891abc..ec07d14352 100644
--- a/snapshots/session/office-progressive-native/tool-schemas.expected.json
+++ b/snapshots/session/office-progressive-native/tool-schemas.expected.json
@@ -215,6 +215,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/office-progressive-ptc/system-prompt.expected.md b/snapshots/session/office-progressive-ptc/system-prompt.expected.md
index 61dbd6d0d1..ae0d462932 100644
--- a/snapshots/session/office-progressive-ptc/system-prompt.expected.md
+++ b/snapshots/session/office-progressive-ptc/system-prompt.expected.md
@@ -119,6 +119,13 @@ interface ToolArgsMap {
/** children (default) lists direct children, which accept send_message in any status. descendants lists the whole tree below you with each entry's parent session id and depth; entries deeper than 1 accept only interrupt_agent. */
scope?: "children" | "descendants";
} & Record;
+ /** Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation. */
+ list_subagent_models: {
+ /** Registered LLM provider id. */
+ provider?: string;
+ /** Exact model id; requires provider. */
+ model?: string;
+ } & Record;
/** Read a UTF-8 text file and return line-numbered content. */
read: {
/** Path to read, resolved by the filesystem backend. */
@@ -350,6 +357,7 @@ interface ToolOutputMap {
parent?: string;
depth?: number;
})[];
+ list_subagent_models: string;
read: {
/** Canonical absolute path in the filesystem execution world. */
path: string;
diff --git a/snapshots/session/office-skills/tool-schemas.expected.json b/snapshots/session/office-skills/tool-schemas.expected.json
index 79d6891abc..ec07d14352 100644
--- a/snapshots/session/office-skills/tool-schemas.expected.json
+++ b/snapshots/session/office-skills/tool-schemas.expected.json
@@ -215,6 +215,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/persistent-pwsh-tool-turn/tool-schemas.expected.json b/snapshots/session/persistent-pwsh-tool-turn/tool-schemas.expected.json
index d1b4eef213..85b59240ce 100644
--- a/snapshots/session/persistent-pwsh-tool-turn/tool-schemas.expected.json
+++ b/snapshots/session/persistent-pwsh-tool-turn/tool-schemas.expected.json
@@ -135,6 +135,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "pwsh",
"description": "Run commands in a persistent PowerShell shell. State, including the current directory and exported environment variables, persists across calls for this agent.",
diff --git a/snapshots/session/pi-ai-conversation-updates/session.v4.jsonl b/snapshots/session/pi-ai-conversation-updates/session.v4.jsonl
index 843a75e88d..6e26da9e41 100644
--- a/snapshots/session/pi-ai-conversation-updates/session.v4.jsonl
+++ b/snapshots/session/pi-ai-conversation-updates/session.v4.jsonl
@@ -9,7 +9,7 @@
{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{message:2}}"}},"surfaceOp":"append"}
{"type":"user/message","data":{"content":[{"type":"text","text":"Read task.txt, call the newly available snapshot_ping tool once, then reply DONE."}],"source":{"kind":"user"},"role":"user","id":"{{message:1}}"},"surfaceOp":"append"}
{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"{{cwd}}\"."},{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{message:3}}"},"surfaceOp":"append"}
-{"type":"request/header","data":{"header":{"config":{"provider":"moonshotai","model":"kimi-k3"},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"initial"}}
+{"type":"request/header","data":{"header":{"config":{"provider":"moonshotai","model":"kimi-k3"},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","list_subagent_models","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"initial"}}
{"type":"request/context","data":{"provider":"moonshotai","model":"kimi-k3","contextWindow":1048576,"systemPromptUpdate":"in-history"}}
{"type":"session/title","data":{"title":"Read task.txt, call the newly","messageSeqs":[8],"source":{"kind":"fallback"}}}
{"type":"assistant/message","data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"tool-call","id":"call_task_read","name":"read","arguments":"{\"file_path\":\"task.txt\"}"}],"source":{"kind":"model","provider":"moonshotai","model":"kimi-k3"},"id":"{{message:4}}"},"usage":{"inputTokens":10,"outputTokens":5},"stream":[{"type":"chunk","time":1790149644504,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1790149644504,"index":0,"dt":[],"id":"call_task_read","name":"read","args":["{\"file_path\":\"task.txt\"}"]},{"type":"chunk","time":1790149644504,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_task_read","name":"read","arguments":"{\"file_path\":\"task.txt\"}"}}},{"type":"chunk","time":1790149644504,"chunk":{"type":"usage","usage":{"inputTokens":10,"outputTokens":5}}},{"type":"chunk","time":1790149644504,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
@@ -18,14 +18,14 @@
{"type":"step/end","data":{"turn":1,"step":1}}
{"type":"step/start","data":{"turn":1,"step":2}}
{"type":"system/message","data":{"turn":1,"step":2,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{message:6}}"}},"surfaceOp":"append"}
-{"type":"request/header","data":{"header":{"config":{"provider":"moonshotai","model":"kimi-k3"},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","read","read_image","send_message","skill","snapshot_ping","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change"}}
+{"type":"request/header","data":{"header":{"config":{"provider":"moonshotai","model":"kimi-k3"},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","list_subagent_models","read","read_image","send_message","skill","snapshot_ping","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change"}}
{"type":"developer/message","data":{"turn":1,"step":2,"message":{"source":{"kind":"tool-registry"},"content":[{"type":"tool-addition","toolName":"snapshot_ping"}],"role":"developer","id":"{{message:7}}"},"headerSeq":19},"surfaceOp":"append"}
{"type":"assistant/message","data":{"turn":1,"step":2,"message":{"role":"assistant","content":[{"type":"tool-call","id":"call_dynamic_ping","name":"snapshot_ping","arguments":"{}"}],"source":{"kind":"model","provider":"moonshotai","model":"kimi-k3"},"id":"{{message:8}}"},"stream":[{"type":"chunk","time":1790149644534,"chunk":{"type":"block-start","index":0,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1790149644534,"index":0,"dt":[],"id":"call_dynamic_ping","name":"snapshot_ping","args":["{}"]},{"type":"chunk","time":1790149644534,"chunk":{"type":"block-end","index":0,"block":{"type":"tool-call","id":"call_dynamic_ping","name":"snapshot_ping","arguments":"{}"}}},{"type":"chunk","time":1790149644535,"chunk":{"type":"finish","reason":{"kind":"tool-calls"}}}]},"surfaceOp":"append"}
{"type":"tool/call","data":{"turn":1,"step":2,"callId":"call_dynamic_ping","name":"snapshot_ping","arguments":"{}"}}
{"type":"tool/result","data":{"turn":1,"step":2,"message":{"role":"tool","source":{"kind":"tool","callId":"call_dynamic_ping"},"toolCallId":"call_dynamic_ping","content":[{"type":"text","text":"pong"}],"isError":false,"id":"{{message:9}}"}},"sourceEventSeqs":[22],"surfaceOp":"append"}
{"type":"step/end","data":{"turn":1,"step":2}}
{"type":"step/start","data":{"turn":1,"step":3}}
-{"type":"request/header","data":{"header":{"config":{"provider":"moonshotai","model":"kimi-k3"},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change"}}
+{"type":"request/header","data":{"header":{"config":{"provider":"moonshotai","model":"kimi-k3"},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","list_subagent_models","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change"}}
{"type":"developer/message","data":{"turn":1,"step":3,"message":{"source":{"kind":"tool-registry"},"content":[{"type":"tool-removal","toolName":"snapshot_ping"}],"role":"developer","id":"{{message:10}}"}},"surfaceOp":"append"}
{"type":"assistant/message","data":{"turn":1,"step":3,"message":{"role":"assistant","content":[{"type":"text","text":"DONE"}],"source":{"kind":"model","provider":"moonshotai","model":"kimi-k3"},"id":"{{message:11}}"},"usage":{"inputTokens":12,"outputTokens":2,"cacheReadTokens":10},"stream":[{"type":"chunk","time":1790149644557,"chunk":{"type":"block-start","index":0,"blockType":"text"}},{"type":"text-chunks","time0":1790149644557,"index":0,"dt":[],"texts":["DONE"]},{"type":"chunk","time":1790149644557,"chunk":{"type":"block-end","index":0,"block":{"type":"text","text":"DONE"}}},{"type":"chunk","time":1790149644557,"chunk":{"type":"usage","usage":{"inputTokens":12,"outputTokens":2,"cacheReadTokens":10}}},{"type":"chunk","time":1790149644557,"chunk":{"type":"finish","reason":{"kind":"stop"}}}]},"surfaceOp":"append"}
{"type":"step/end","data":{"turn":1,"step":3}}
diff --git a/snapshots/session/plugin-manager-mcp/session.v4.jsonl b/snapshots/session/plugin-manager-mcp/session.v4.jsonl
index 794d19b23f..0036cc1272 100644
--- a/snapshots/session/plugin-manager-mcp/session.v4.jsonl
+++ b/snapshots/session/plugin-manager-mcp/session.v4.jsonl
@@ -9,7 +9,7 @@
{"type":"system/message","data":{"turn":1,"step":1,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{message:2}}"}},"surfaceOp":"append"}
{"type":"user/message","data":{"content":[{"type":"text","text":"Use plugin_manager with action set_plugin, target include:demo, enabled true to activate the configured MCP entry. Then call its newly discovered mcp__demo__ping tool and report the result. Do not use other tools."}],"source":{"kind":"user"},"role":"user","id":"{{message:1}}"},"surfaceOp":"append"}
{"type":"user/message","data":{"content":[{"type":"text","text":"Current runtime context. This snapshot supersedes earlier runtime-context snapshots.\n\nCurrent working directory: \"{{cwd}}\".\n\nCurrent DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations.\n\nApproval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}],"source":{"kind":"runtime-context","form":"snapshot","sections":[{"name":"working-directory:current","text":"Current working directory: \"{{cwd}}\"."},{"name":"sandbox:policy","text":"Current DSH file policy: danger-full-access. The DSH file sandbox does not restrict file modifications by available operations."},{"name":"approval:policy","text":"Approval prompts are disabled in this session: actions that require approval are rejected automatically — do not request sandbox escalation (do not set `sandbox_permissions`)."}]},"role":"user","id":"{{message:3}}"},"surfaceOp":"append"}
-{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"max"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","plugin_manager","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"initial"}}
+{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"max"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","list_subagent_models","plugin_manager","read","read_image","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"initial"}}
{"type":"request/context","data":{"provider":"deepseek-official","model":"deepseek-v4-flash","contextWindow":1000000}}
{"type":"session/title","data":{"title":"Use plugin_manager with action set_plugi","messageSeqs":[8],"source":{"kind":"fallback"}}}
{"type":"assistant/message","data":{"turn":1,"step":1,"message":{"role":"assistant","content":[{"type":"reasoning","text":"The user wants me to activate a plugin via plugin_manager, then call an MCP tool. Let me do the plugin_manager call first.\n\nNote: they say \"Do not use other tools\" other than plugin_manager and the mcp tool. But I need to first enable it. Let's call plugin_manager set_plugin.\n\nLet me also list plugins first? The instruction says use plugin_manager with action set_plugin, target include:demo, enabled true. Let's just do that."},{"type":"tool-call","id":"call_00_xLhr9wia3A5m7wuSRWwD0436","name":"plugin_manager","arguments":"{\"action\": \"set_plugin\", \"target\": \"include:demo\", \"enabled\": true}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash","replayState":{"response":{"kind":"deepseek-messages","version":1,"model":"deepseek-v4-flash"},"blocks":[{"type":"reasoning","signature":"75d99e21-1d47-4a33-bb88-340a1e84b749"},{"type":"tool-call"}]}},"id":"{{message:4}}"},"usage":{"inputTokens":7220,"outputTokens":174,"cacheReadTokens":0,"cacheWriteTokens":0,"totalTokens":7394},"stream":[{"type":"chunk","time":1789984418848,"chunk":{"type":"block-start","index":0,"blockType":"reasoning"}},{"type":"reasoning-chunks","time0":1789984418848,"index":0,"dt":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"texts":["The"," user"," wants"," me"," to"," activate"," a"," plugin"," via"," plugin","_manager",","," then"," call"," an"," M","CP"," tool","."," Let"," me"," do"," the"," plugin","_manager"," call"," first",".\n\n","Note",":"," they"," say"," \"","Do"," not"," use"," other"," tools","\""," other"," than"," plugin","_manager"," and"," the"," m","cp"," tool","."," But"," I"," need"," to"," first"," enable"," it","."," Let","'s"," call"," plugin","_manager"," set","_","plugin",".\n\n","Let"," me"," also"," list"," plugins"," first","?"," The"," instruction"," says"," use"," plugin","_manager"," with"," action"," set","_","plugin",","," target"," include",":","demo",","," enabled"," true","."," Let","'s"," just"," do"," that","."]},{"type":"chunk","time":1789984418849,"chunk":{"type":"block-end","index":0,"block":{"type":"reasoning","text":"The user wants me to activate a plugin via plugin_manager, then call an MCP tool. Let me do the plugin_manager call first.\n\nNote: they say \"Do not use other tools\" other than plugin_manager and the mcp tool. But I need to first enable it. Let's call plugin_manager set_plugin.\n\nLet me also list plugins first? The instruction says use plugin_manager with action set_plugin, target include:demo, enabled true. Let's just do that."}}},{"type":"chunk","time":1789984418849,"chunk":{"type":"block-start","index":1,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1789984418849,"index":1,"dt":[],"id":"call_00_xLhr9wia3A5m7wuSRWwD0436","name":"plugin_manager","args":[""]},{"type":"tool-call-chunks","time0":1789984418849,"index":1,"dt":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"id":"call_00_xLhr9wia3A5m7wuSRWwD0436","args":["{","\"","action","\"",": ","\"","set","_","plugin","\"",", ","\"","target","\"",": ","\"","include",":","demo","\"",", ","\"","en","abled","\"",": ","true","}"]},{"type":"chunk","time":1789984418849,"chunk":{"type":"block-end","index":1,"block":{"type":"tool-call","id":"call_00_xLhr9wia3A5m7wuSRWwD0436","name":"plugin_manager","arguments":"{\"action\": \"set_plugin\", \"target\": \"include:demo\", \"enabled\": true}"}}},{"type":"chunk","time":1789984418849,"chunk":{"type":"usage","usage":{"inputTokens":7220,"outputTokens":174,"cacheReadTokens":0,"cacheWriteTokens":0,"totalTokens":7394}}},{"type":"chunk","time":1789984418849,"chunk":{"type":"finish","reason":{"kind":"tool-calls"},"replayState":{"response":{"kind":"deepseek-messages","version":1,"model":"deepseek-v4-flash"},"blocks":[{"type":"reasoning","signature":"75d99e21-1d47-4a33-bb88-340a1e84b749"},{"type":"tool-call"}]}}}]},"surfaceOp":"append"}
@@ -18,7 +18,7 @@
{"type":"step/end","data":{"turn":1,"step":1}}
{"type":"step/start","data":{"turn":1,"step":2}}
{"type":"system/message","data":{"turn":1,"step":2,"message":{"role":"system","content":[{"type":"text","text":"{{system}}"}],"source":{"kind":"system-prompt"},"id":"{{message:6}}"}},"sourceEventSeqs":[7],"surfaceOp":{"op":"replace","startSeq":7,"endSeq":7}}
-{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"max"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","list_mcp_resource_templates","list_mcp_resources","mcp__demo__ping","plugin_manager","read","read_image","read_mcp_resource","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change","startsSeries":true}}
+{"type":"request/header","data":{"header":{"config":{"provider":"deepseek-official","model":"deepseek-v4-flash","maxTokens":256000,"reasoningEffort":"max"},"adapterDefaults":{"reasoningEffort":true,"maxTokens":true},"tools":["bash","create_goal","edit","exit_plan_mode","get_goal","glob","grep","interrupt_agent","job_kill","job_list","job_output","list_agents","list_mcp_resource_templates","list_mcp_resources","list_subagent_models","mcp__demo__ping","plugin_manager","read","read_image","read_mcp_resource","send_message","skill","subagent","subagent_fork","todo_write","update_goal","web_fetch","web_search","workflow","working_directory","write"]},"reason":"change","startsSeries":true}}
{"type":"developer/message","data":{"turn":1,"step":2,"message":{"source":{"kind":"tool-registry"},"content":[{"type":"tool-addition","toolName":"list_mcp_resource_templates"},{"type":"tool-addition","toolName":"list_mcp_resources"},{"type":"tool-addition","toolName":"mcp__demo__ping"},{"type":"tool-addition","toolName":"read_mcp_resource"}],"role":"developer","id":"{{message:7}}"},"headerSeq":19},"surfaceOp":"append"}
{"type":"assistant/message","data":{"turn":1,"step":2,"message":{"role":"assistant","content":[{"type":"reasoning","text":"The plugin was enabled. Now call mcp__demo__ping.\n\nWait — the tool was already listed in my tools before enabling. Let's call it anyway."},{"type":"tool-call","id":"call_00_miuKfLCTz5Cb38gdp8kK5186","name":"mcp__demo__ping","arguments":"{}"}],"source":{"kind":"model","provider":"deepseek-official","model":"deepseek-v4-flash","replayState":{"response":{"kind":"deepseek-messages","version":1,"model":"deepseek-v4-flash"},"blocks":[{"type":"reasoning","signature":"b1ec1efe-4be6-4836-a10c-e5d6bfdce520"},{"type":"tool-call"}]}},"id":"{{message:8}}"},"usage":{"inputTokens":7035,"outputTokens":59,"cacheReadTokens":768,"cacheWriteTokens":0,"totalTokens":7862},"stream":[{"type":"chunk","time":1789984418998,"chunk":{"type":"block-start","index":0,"blockType":"reasoning"}},{"type":"reasoning-chunks","time0":1789984418998,"index":0,"dt":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"texts":["The"," plugin"," was"," enabled","."," Now"," call"," m","cp","__","demo","__","ping",".\n\n","Wait"," —"," the"," tool"," was"," already"," listed"," in"," my"," tools"," before"," enabling","."," Let","'s"," call"," it"," anyway","."]},{"type":"chunk","time":1789984418998,"chunk":{"type":"block-end","index":0,"block":{"type":"reasoning","text":"The plugin was enabled. Now call mcp__demo__ping.\n\nWait — the tool was already listed in my tools before enabling. Let's call it anyway."}}},{"type":"chunk","time":1789984418998,"chunk":{"type":"block-start","index":1,"blockType":"tool-call"}},{"type":"tool-call-chunks","time0":1789984418998,"index":1,"dt":[],"id":"call_00_miuKfLCTz5Cb38gdp8kK5186","name":"mcp__demo__ping","args":[""]},{"type":"tool-call-chunks","time0":1789984418998,"index":1,"dt":[],"id":"call_00_miuKfLCTz5Cb38gdp8kK5186","args":["{}"]},{"type":"chunk","time":1789984418998,"chunk":{"type":"block-end","index":1,"block":{"type":"tool-call","id":"call_00_miuKfLCTz5Cb38gdp8kK5186","name":"mcp__demo__ping","arguments":"{}"}}},{"type":"chunk","time":1789984418998,"chunk":{"type":"usage","usage":{"inputTokens":7035,"outputTokens":59,"cacheReadTokens":768,"cacheWriteTokens":0,"totalTokens":7862}}},{"type":"chunk","time":1789984418998,"chunk":{"type":"finish","reason":{"kind":"tool-calls"},"replayState":{"response":{"kind":"deepseek-messages","version":1,"model":"deepseek-v4-flash"},"blocks":[{"type":"reasoning","signature":"b1ec1efe-4be6-4836-a10c-e5d6bfdce520"},{"type":"tool-call"}]}}}]},"surfaceOp":"append"}
{"type":"tool/call","data":{"turn":1,"step":2,"callId":"call_00_miuKfLCTz5Cb38gdp8kK5186","name":"mcp__demo__ping","arguments":"{}"}}
diff --git a/snapshots/session/plugin-manager-mcp/tool-schemas.expected.json b/snapshots/session/plugin-manager-mcp/tool-schemas.expected.json
index e34aaf2db4..b66bf47927 100644
--- a/snapshots/session/plugin-manager-mcp/tool-schemas.expected.json
+++ b/snapshots/session/plugin-manager-mcp/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "plugin_manager",
"description": "List plugins or bundles in the current profile, enable or disable them, install a bundle, or remove an installed bundle. Every action requires danger-full-access permission or approval for this call. Approval does not change the session permission mode. Changes affect every session in this profile. List first to obtain exact identifiers. Package installation can execute allowed build scripts. Live profiles apply changes immediately, including upgrades of installed packages; a change result that is not applied carries nextStep, which says what to do or tell the user. Unmet DSH version requirements (engines.dsh, else DSH peer dependencies) block installation and activation. Version exemptions risk crashes and data loss: warn the user and obtain explicit permission for the exact plugin and runtime versions before granting one.",
@@ -994,6 +1011,23 @@
]
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "mcp__demo__ping",
"description": "Replies pong.",
diff --git a/snapshots/session/plugin-manager/tool-schemas.expected.json b/snapshots/session/plugin-manager/tool-schemas.expected.json
index 88ee8e01ee..ed829cd405 100644
--- a/snapshots/session/plugin-manager/tool-schemas.expected.json
+++ b/snapshots/session/plugin-manager/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "plugin_manager",
"description": "List plugins or bundles in the current profile, enable or disable them, install a bundle, or remove an installed bundle. Every action requires danger-full-access permission or approval for this call. Approval does not change the session permission mode. Changes affect every session in this profile. List first to obtain exact identifiers. Package installation can execute allowed build scripts. Live profiles apply changes immediately, including upgrades of installed packages; a change result that is not applied carries nextStep, which says what to do or tell the user. Unmet DSH version requirements (engines.dsh, else DSH peer dependencies) block installation and activation. Version exemptions risk crashes and data loss: warn the user and obtain explicit permission for the exact plugin and runtime versions before granting one.",
diff --git a/snapshots/session/product-subagent-both/tool-schemas.expected.json b/snapshots/session/product-subagent-both/tool-schemas.expected.json
index 2b36308f92..e34c16db7e 100644
--- a/snapshots/session/product-subagent-both/tool-schemas.expected.json
+++ b/snapshots/session/product-subagent-both/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/product-subagent-codex/tool-schemas.expected.json b/snapshots/session/product-subagent-codex/tool-schemas.expected.json
index d9f3cfa9d0..cc96a9a836 100644
--- a/snapshots/session/product-subagent-codex/tool-schemas.expected.json
+++ b/snapshots/session/product-subagent-codex/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/product-subagent-result-diagnostic/tool-schemas.expected.json b/snapshots/session/product-subagent-result-diagnostic/tool-schemas.expected.json
index 11f07197a2..2f0b7a8983 100644
--- a/snapshots/session/product-subagent-result-diagnostic/tool-schemas.expected.json
+++ b/snapshots/session/product-subagent-result-diagnostic/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/provider-cwd/tool-schemas.expected.json b/snapshots/session/provider-cwd/tool-schemas.expected.json
index 2b4b1f069f..93788fc8b2 100644
--- a/snapshots/session/provider-cwd/tool-schemas.expected.json
+++ b/snapshots/session/provider-cwd/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/ptc-node-read-only/system-prompt.expected.md b/snapshots/session/ptc-node-read-only/system-prompt.expected.md
index bdc72148bc..759471a283 100644
--- a/snapshots/session/ptc-node-read-only/system-prompt.expected.md
+++ b/snapshots/session/ptc-node-read-only/system-prompt.expected.md
@@ -140,6 +140,13 @@ interface ToolArgsMap {
/** children (default) lists direct children, which accept send_message in any status. descendants lists the whole tree below you with each entry's parent session id and depth; entries deeper than 1 accept only interrupt_agent. */
scope?: "children" | "descendants";
} & Record;
+ /** Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation. */
+ list_subagent_models: {
+ /** Registered LLM provider id. */
+ provider?: string;
+ /** Exact model id; requires provider. */
+ model?: string;
+ } & Record;
/** Read a UTF-8 text file and return line-numbered content. */
read: {
/** Path to read, resolved by the filesystem backend. */
@@ -411,6 +418,7 @@ interface ToolOutputMap {
parent?: string;
depth?: number;
})[];
+ list_subagent_models: string;
read: {
/** Canonical absolute path in the filesystem execution world. */
path: string;
diff --git a/snapshots/session/ptc-node-workspace/system-prompt.expected.md b/snapshots/session/ptc-node-workspace/system-prompt.expected.md
index bdc72148bc..759471a283 100644
--- a/snapshots/session/ptc-node-workspace/system-prompt.expected.md
+++ b/snapshots/session/ptc-node-workspace/system-prompt.expected.md
@@ -140,6 +140,13 @@ interface ToolArgsMap {
/** children (default) lists direct children, which accept send_message in any status. descendants lists the whole tree below you with each entry's parent session id and depth; entries deeper than 1 accept only interrupt_agent. */
scope?: "children" | "descendants";
} & Record;
+ /** Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation. */
+ list_subagent_models: {
+ /** Registered LLM provider id. */
+ provider?: string;
+ /** Exact model id; requires provider. */
+ model?: string;
+ } & Record;
/** Read a UTF-8 text file and return line-numbered content. */
read: {
/** Path to read, resolved by the filesystem backend. */
@@ -411,6 +418,7 @@ interface ToolOutputMap {
parent?: string;
depth?: number;
})[];
+ list_subagent_models: string;
read: {
/** Canonical absolute path in the filesystem execution world. */
path: string;
diff --git a/snapshots/session/ptc-persistent/system-prompt.expected.md b/snapshots/session/ptc-persistent/system-prompt.expected.md
index d80c07d248..58db4d9ac5 100644
--- a/snapshots/session/ptc-persistent/system-prompt.expected.md
+++ b/snapshots/session/ptc-persistent/system-prompt.expected.md
@@ -140,6 +140,13 @@ interface ToolArgsMap {
/** children (default) lists direct children, which accept send_message in any status. descendants lists the whole tree below you with each entry's parent session id and depth; entries deeper than 1 accept only interrupt_agent. */
scope?: "children" | "descendants";
} & Record;
+ /** Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation. */
+ list_subagent_models: {
+ /** Registered LLM provider id. */
+ provider?: string;
+ /** Exact model id; requires provider. */
+ model?: string;
+ } & Record;
/** Read a UTF-8 text file and return line-numbered content. */
read: {
/** Path to read, resolved by the filesystem backend. */
@@ -411,6 +418,7 @@ interface ToolOutputMap {
parent?: string;
depth?: number;
})[];
+ list_subagent_models: string;
read: {
/** Canonical absolute path in the filesystem execution world. */
path: string;
diff --git a/snapshots/session/ptc-policy-change/system-prompt.expected.md b/snapshots/session/ptc-policy-change/system-prompt.expected.md
index c0e70b33b9..d6ae673a02 100644
--- a/snapshots/session/ptc-policy-change/system-prompt.expected.md
+++ b/snapshots/session/ptc-policy-change/system-prompt.expected.md
@@ -140,6 +140,13 @@ interface ToolArgsMap {
/** children (default) lists direct children, which accept send_message in any status. descendants lists the whole tree below you with each entry's parent session id and depth; entries deeper than 1 accept only interrupt_agent. */
scope?: "children" | "descendants";
} & Record;
+ /** Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation. */
+ list_subagent_models: {
+ /** Registered LLM provider id. */
+ provider?: string;
+ /** Exact model id; requires provider. */
+ model?: string;
+ } & Record;
/** Read a UTF-8 text file and return line-numbered content. */
read: {
/** Path to read, resolved by the filesystem backend. */
@@ -409,6 +416,7 @@ interface ToolOutputMap {
parent?: string;
depth?: number;
})[];
+ list_subagent_models: string;
read: {
/** Canonical absolute path in the filesystem execution world. */
path: string;
diff --git a/snapshots/session/ptc-python-turn/system-prompt.expected.md b/snapshots/session/ptc-python-turn/system-prompt.expected.md
index 9feca57237..9780bec809 100644
--- a/snapshots/session/ptc-python-turn/system-prompt.expected.md
+++ b/snapshots/session/ptc-python-turn/system-prompt.expected.md
@@ -287,6 +287,13 @@ class ListAgentsOutput2(TypedDict):
parent: NotRequired[str]
depth: NotRequired[float]
+class ListSubagentModelsArgs(TypedDict):
+ # Registered LLM provider id.
+ provider: NotRequired[str]
+ # Exact model id; requires provider.
+ model: NotRequired[str]
+ # Additional keys beyond those declared are allowed.
+
class ReadArgs(TypedDict):
# Path to read, resolved by the filesystem backend.
file_path: str
@@ -535,6 +542,8 @@ class Tools(Protocol):
"""Read a background job: output since the previous read for stream jobs, or the result of a finished final-output job."""
async def list_agents(self, args: ListAgentsArgs) -> list[ListAgentsOutput1 | ListAgentsOutput2]:
"""List subagents you started, with their ids, labels, and status. running means it is working; inactive means it is not currently working. You will be notified when a subagent finishes; there is no need to keep checking its status. Use send_message to continue the conversation."""
+ async def list_subagent_models(self, args: ListSubagentModelsArgs) -> str:
+ """Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation."""
async def read(self, args: ReadArgs) -> ReadOutput:
"""Read a UTF-8 text file and return line-numbered content."""
async def read_image(self, args: ReadImageArgs) -> ReadImageOutput:
diff --git a/snapshots/session/ptc-read-image/system-prompt.expected.md b/snapshots/session/ptc-read-image/system-prompt.expected.md
index 9389f2c761..ce6019d091 100644
--- a/snapshots/session/ptc-read-image/system-prompt.expected.md
+++ b/snapshots/session/ptc-read-image/system-prompt.expected.md
@@ -140,6 +140,13 @@ interface ToolArgsMap {
/** children (default) lists direct children, which accept send_message in any status. descendants lists the whole tree below you with each entry's parent session id and depth; entries deeper than 1 accept only interrupt_agent. */
scope?: "children" | "descendants";
} & Record;
+ /** Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation. */
+ list_subagent_models: {
+ /** Registered LLM provider id. */
+ provider?: string;
+ /** Exact model id; requires provider. */
+ model?: string;
+ } & Record;
/** Read a UTF-8 text file and return line-numbered content. */
read: {
/** Path to read, resolved by the filesystem backend. */
@@ -407,6 +414,7 @@ interface ToolOutputMap {
parent?: string;
depth?: number;
})[];
+ list_subagent_models: string;
read: {
/** Canonical absolute path in the filesystem execution world. */
path: string;
diff --git a/snapshots/session/ptc-turn/system-prompt.expected.md b/snapshots/session/ptc-turn/system-prompt.expected.md
index bdc72148bc..759471a283 100644
--- a/snapshots/session/ptc-turn/system-prompt.expected.md
+++ b/snapshots/session/ptc-turn/system-prompt.expected.md
@@ -140,6 +140,13 @@ interface ToolArgsMap {
/** children (default) lists direct children, which accept send_message in any status. descendants lists the whole tree below you with each entry's parent session id and depth; entries deeper than 1 accept only interrupt_agent. */
scope?: "children" | "descendants";
} & Record;
+ /** Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation. */
+ list_subagent_models: {
+ /** Registered LLM provider id. */
+ provider?: string;
+ /** Exact model id; requires provider. */
+ model?: string;
+ } & Record;
/** Read a UTF-8 text file and return line-numbered content. */
read: {
/** Path to read, resolved by the filesystem backend. */
@@ -411,6 +418,7 @@ interface ToolOutputMap {
parent?: string;
depth?: number;
})[];
+ list_subagent_models: string;
read: {
/** Canonical absolute path in the filesystem execution world. */
path: string;
diff --git a/snapshots/session/pty-tools-sandbox-backend/tool-schemas.expected.json b/snapshots/session/pty-tools-sandbox-backend/tool-schemas.expected.json
index 95ffc0255b..a2d964cd97 100644
--- a/snapshots/session/pty-tools-sandbox-backend/tool-schemas.expected.json
+++ b/snapshots/session/pty-tools-sandbox-backend/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/pwsh-tool-turn/tool-schemas.expected.json b/snapshots/session/pwsh-tool-turn/tool-schemas.expected.json
index d1a1729417..3c7ce1d750 100644
--- a/snapshots/session/pwsh-tool-turn/tool-schemas.expected.json
+++ b/snapshots/session/pwsh-tool-turn/tool-schemas.expected.json
@@ -187,6 +187,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "pwsh",
"description": "Execute a PowerShell command (`pwsh -Command`) and return its stdout/stderr. Each call runs in a fresh pwsh process; pass `workdir` instead of using `cd`. Paths use native Windows form (`C:\\...`); read environment variables with `$env:NAME`. Managed `$env:DSH_*` variables expose current harness environment facts. Long output is truncated to its tail; the full output is saved to a file whose path is reported when available. On Windows a force-killed command settles as `[exit code: 1]` without a signal marker — treat it as an interruption, not a command failure. Provide `description` before `command` in the arguments. Before any delete or move, verify that the resolved absolute target path is the intended one; never run it against a computed path you have not checked. Do not assign to automatic variables such as `$HOME`; variable names are case-insensitive, so `$home` is the same read-only variable. Commands may run under a file sandbox; a blocked file operation is reported as `[sandbox: file access denied under mode]`, a policy denial: do not retry another way. Under the Windows sandbox, read-only pwsh runs in PowerShell ConstrainedLanguage mode, while workspace-write stays in FullLanguage unless host policy says otherwise. In read-only, prefer cmdlets and core types (`[string]`, `[datetime]`, `[regex]`, `[guid]`); .NET static calls (`[System.IO.*]::`, `[math]::`), `Add-Type`, COM objects, and reflection fail with \"only core types\" errors. `-f` formatting, property access, and core cmdlets work. In both confined modes, programs cannot open named pipes, so a command that captures another program's output through piped stdio (Node.js `child_process.spawn`/`exec` with the default `stdio: 'pipe'`) fails with EPERM, while `stdio: 'inherit'` and `stdio: 'ignore'` spawns work and PowerShell's own pipelines are unaffected. That EPERM is the documented boundary: do not retry the command another way — escalate the exact command once or restructure it to avoid capturing output.",
diff --git a/snapshots/session/ralph-loop/tool-schemas.1.expected.json b/snapshots/session/ralph-loop/tool-schemas.1.expected.json
index 02ebdc4baf..5dc0507816 100644
--- a/snapshots/session/ralph-loop/tool-schemas.1.expected.json
+++ b/snapshots/session/ralph-loop/tool-schemas.1.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "ralph",
"description": "Run a foreground fresh-agent Ralph loop toward one immutable objective. Use only when the direct human explicitly asks for Ralph or fresh-agent iteration. Each round opens a new child with no parent conversation or prior child session; the shared workspace is long-term memory, and only a bounded structured report crosses rounds. The call returns when a worker reports completion or a concrete blocker, or at the round limit. Ordinary long-running same-session work belongs to goal tools.",
diff --git a/snapshots/session/ralph-loop/tool-schemas.2.expected.json b/snapshots/session/ralph-loop/tool-schemas.2.expected.json
index 02ebdc4baf..5dc0507816 100644
--- a/snapshots/session/ralph-loop/tool-schemas.2.expected.json
+++ b/snapshots/session/ralph-loop/tool-schemas.2.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "ralph",
"description": "Run a foreground fresh-agent Ralph loop toward one immutable objective. Use only when the direct human explicitly asks for Ralph or fresh-agent iteration. Each round opens a new child with no parent conversation or prior child session; the shared workspace is long-term memory, and only a bounded structured report crosses rounds. The call returns when a worker reports completion or a concrete blocker, or at the round limit. Ordinary long-running same-session work belongs to goal tools.",
diff --git a/snapshots/session/ralph-loop/tool-schemas.expected.json b/snapshots/session/ralph-loop/tool-schemas.expected.json
index deabaf4a0d..ca3e7e9684 100644
--- a/snapshots/session/ralph-loop/tool-schemas.expected.json
+++ b/snapshots/session/ralph-loop/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "ralph",
"description": "Run a foreground fresh-agent Ralph loop toward one immutable objective. Use only when the direct human explicitly asks for Ralph or fresh-agent iteration. Each round opens a new child with no parent conversation or prior child session; the shared workspace is long-term memory, and only a bounded structured report crosses rounds. The call returns when a worker reports completion or a concrete blocker, or at the round limit. Ordinary long-running same-session work belongs to goal tools.",
diff --git a/snapshots/session/session-query-spill/tool-schemas.expected.json b/snapshots/session/session-query-spill/tool-schemas.expected.json
index 9d66381297..c17d58b099 100644
--- a/snapshots/session/session-query-spill/tool-schemas.expected.json
+++ b/snapshots/session/session-query-spill/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/subagent-acp-diagnostic/tool-schemas.expected.json b/snapshots/session/subagent-acp-diagnostic/tool-schemas.expected.json
index 46abe32771..dafcb0d461 100644
--- a/snapshots/session/subagent-acp-diagnostic/tool-schemas.expected.json
+++ b/snapshots/session/subagent-acp-diagnostic/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/subagent-agent-preset/tool-schemas.1.expected.json b/snapshots/session/subagent-agent-preset/tool-schemas.1.expected.json
index 3e61dbecf5..a328105739 100644
--- a/snapshots/session/subagent-agent-preset/tool-schemas.1.expected.json
+++ b/snapshots/session/subagent-agent-preset/tool-schemas.1.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/subagent-agent-preset/tool-schemas.expected.json b/snapshots/session/subagent-agent-preset/tool-schemas.expected.json
index e6e376230d..cfd69bbe1a 100644
--- a/snapshots/session/subagent-agent-preset/tool-schemas.expected.json
+++ b/snapshots/session/subagent-agent-preset/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/subagent-child-question-rejection/tool-schemas.expected.json b/snapshots/session/subagent-child-question-rejection/tool-schemas.expected.json
index b8dc7c20a8..81c9ddc9f6 100644
--- a/snapshots/session/subagent-child-question-rejection/tool-schemas.expected.json
+++ b/snapshots/session/subagent-child-question-rejection/tool-schemas.expected.json
@@ -323,6 +323,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/subagent-no-message-tool/tool-schemas.1.expected.json b/snapshots/session/subagent-no-message-tool/tool-schemas.1.expected.json
index 70cf9069f3..8e605f38f4 100644
--- a/snapshots/session/subagent-no-message-tool/tool-schemas.1.expected.json
+++ b/snapshots/session/subagent-no-message-tool/tool-schemas.1.expected.json
@@ -141,23 +141,6 @@
]
}
},
- {
- "name": "list_agents",
- "description": "List subagents you started, with their ids, labels, and status. running means it is working; inactive means it is not currently working. You will be notified when a subagent finishes; there is no need to keep checking its status. Use send_message to continue the conversation.",
- "parameters": {
- "type": "object",
- "properties": {
- "scope": {
- "type": "string",
- "description": "children (default) lists direct children, which accept send_message in any status. descendants lists the whole tree below you with each entry's parent session id and depth; entries deeper than 1 accept only interrupt_agent.",
- "enum": [
- "children",
- "descendants"
- ]
- }
- }
- }
- },
{
"name": "skill",
"description": "Load the full instructions for a skill. Call it before acting on a task that names or clearly matches a skill in the session skill catalog.",
diff --git a/snapshots/session/subagent-structured-parent/tool-schemas.1.expected.json b/snapshots/session/subagent-structured-parent/tool-schemas.1.expected.json
index d217c78441..7a5fead188 100644
--- a/snapshots/session/subagent-structured-parent/tool-schemas.1.expected.json
+++ b/snapshots/session/subagent-structured-parent/tool-schemas.1.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/subagent-structured-parent/tool-schemas.expected.json b/snapshots/session/subagent-structured-parent/tool-schemas.expected.json
index 25793c1cd4..cd23ee479c 100644
--- a/snapshots/session/subagent-structured-parent/tool-schemas.expected.json
+++ b/snapshots/session/subagent-structured-parent/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/subagent-tool-filter/tool-schemas.1.expected.json b/snapshots/session/subagent-tool-filter/tool-schemas.1.expected.json
index 5f66af4607..6848c75079 100644
--- a/snapshots/session/subagent-tool-filter/tool-schemas.1.expected.json
+++ b/snapshots/session/subagent-tool-filter/tool-schemas.1.expected.json
@@ -174,6 +174,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "send_message",
"description": "Send a message to an agent. A working agent receives it at its next step; an idle agent starts a new turn with it. Returns delivery confirmation, not the agent's answer.",
diff --git a/snapshots/session/system-prompt-in-history/tool-schemas.expected.json b/snapshots/session/system-prompt-in-history/tool-schemas.expected.json
index 2b4b1f069f..93788fc8b2 100644
--- a/snapshots/session/system-prompt-in-history/tool-schemas.expected.json
+++ b/snapshots/session/system-prompt-in-history/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/team-targets/cordis.snapshot.yml b/snapshots/session/team-targets/cordis.snapshot.yml
index 577ac1976c..7d64190eba 100644
--- a/snapshots/session/team-targets/cordis.snapshot.yml
+++ b/snapshots/session/team-targets/cordis.snapshot.yml
@@ -46,8 +46,6 @@
- id: tool-subagent-control
disabled: true
-- id: tool-subagent-list-agents
- disabled: true
- id: tool-subagent-report
disabled: true
- id: tool-subagent
diff --git a/snapshots/session/team-targets/cordis.yml b/snapshots/session/team-targets/cordis.yml
index 30d20d1a35..19f0ccebfc 100644
--- a/snapshots/session/team-targets/cordis.yml
+++ b/snapshots/session/team-targets/cordis.yml
@@ -1,7 +1,5 @@
- id: tool-subagent-control
disabled: true
-- id: tool-subagent-list-agents
- disabled: true
- id: tool-subagent-report
disabled: true
- id: tool-subagent
diff --git a/snapshots/session/text-turn/tool-schemas.expected.json b/snapshots/session/text-turn/tool-schemas.expected.json
index 2b4b1f069f..93788fc8b2 100644
--- a/snapshots/session/text-turn/tool-schemas.expected.json
+++ b/snapshots/session/text-turn/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/web-fetch/tool-schemas.expected.json b/snapshots/session/web-fetch/tool-schemas.expected.json
index 5ef902c18a..3ec262b94f 100644
--- a/snapshots/session/web-fetch/tool-schemas.expected.json
+++ b/snapshots/session/web-fetch/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/workflow-confinement/tool-schemas.expected.json b/snapshots/session/workflow-confinement/tool-schemas.expected.json
index 2b4b1f069f..93788fc8b2 100644
--- a/snapshots/session/workflow-confinement/tool-schemas.expected.json
+++ b/snapshots/session/workflow-confinement/tool-schemas.expected.json
@@ -260,6 +260,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/snapshots/session/workspace-dependencies/tool-schemas.expected.json b/snapshots/session/workspace-dependencies/tool-schemas.expected.json
index 4d3db178b9..bb07dd0e8e 100644
--- a/snapshots/session/workspace-dependencies/tool-schemas.expected.json
+++ b/snapshots/session/workspace-dependencies/tool-schemas.expected.json
@@ -215,6 +215,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "load_workspace_dependencies",
"description": "Get absolute paths to bundled Python and library directories, plus bundled Python distribution versions. Node.js and pnpm paths are included when the payload provides them. Python includes numpy, pandas, python-docx, python-pptx, openpyxl, Pillow, lxml, and XlsxWriter. Use these libraries for Office files unless the user or workspace instructions select another environment. When Node.js and pnpm paths are returned, run pnpm with that Node executable and pnpm script path. This does not change PATH or package-manager settings.",
diff --git a/snapshots/session/worktree/tool-schemas.expected.json b/snapshots/session/worktree/tool-schemas.expected.json
index 6641f8f0b2..b0dfaed328 100644
--- a/snapshots/session/worktree/tool-schemas.expected.json
+++ b/snapshots/session/worktree/tool-schemas.expected.json
@@ -277,6 +277,23 @@
}
}
},
+ {
+ "name": "list_subagent_models",
+ "description": "Inspect subagent models without changing the current Agent. No arguments: providers; `provider`: allowed models; `provider` + `model`: that model and its reasoning efforts. Inspect options here before selecting a child provider and model; use returned ids for delegation.",
+ "parameters": {
+ "type": "object",
+ "properties": {
+ "provider": {
+ "type": "string",
+ "description": "Registered LLM provider id."
+ },
+ "model": {
+ "type": "string",
+ "description": "Exact model id; requires provider."
+ }
+ }
+ }
+ },
{
"name": "read",
"description": "Read a UTF-8 text file and return line-numbered content.",
diff --git a/tsconfig.base.json b/tsconfig.base.json
index 5f3c18469b..509357e523 100644
--- a/tsconfig.base.json
+++ b/tsconfig.base.json
@@ -195,8 +195,6 @@
"@deepseek-ai/dsh-session-reference/types": ["./packages/context/session-reference/src/types.ts"],
"@deepseek-ai/dsh-tools/presentation": ["./packages/core/tools/src/presentation.ts"],
"@deepseek-ai/dsh-tools/types": ["./packages/core/tools/src/types.ts"],
- "@deepseek-ai/dsh-tool-subagent-control/list-agents": ["./packages/subagent/tool-subagent-control/src/list-agents.ts"],
- "@deepseek-ai/dsh-tool-subagent/list-models": ["./packages/subagent/tool-subagent/src/list-models.ts"],
"@deepseek-ai/dsh-tool-subagent/model-selection-settings": ["./packages/subagent/tool-subagent/src/model-selection-settings.ts"],
"@deepseek-ai/dsh-user-approval/types": ["./packages/interaction/user-approval/src/types.ts"],
"@deepseek-ai/dsh-user-questions/types": ["./packages/interaction/user-questions/src/types.ts"],