Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
6ab42db
feat: add hybrid code mode
DragonnZhang Sep 14, 2026
fda09c0
fix(core): address hybrid code mode review feedback
DragonnZhang Sep 15, 2026
9a0cd57
chore: merge main into code mode branch
DragonnZhang Sep 15, 2026
30b2a6c
fix(code-mode): address review feedback
DragonnZhang Sep 18, 2026
6c919b7
fix(web-shell): map tool mode setting alias
DragonnZhang Sep 18, 2026
02afce8
fix(core): align code mode bindings and reported tool surfaces
DragonnZhang Sep 20, 2026
2ecf53e
merge: sync main and preserve CodeMode context tests
DragonnZhang Sep 20, 2026
4a38632
merge: preserve hybrid execution with stable tool bridge
DragonnZhang Sep 21, 2026
3239c68
fix: repair web-shell alias tests and address code-mode review feedback
qwen-code-ci-bot Sep 22, 2026
f35beb1
Merge remote-tracking branch 'origin/main' into dragon/add-codemode
qwen-code-ci-bot Sep 22, 2026
28df8ee
fix: align hybrid tool guidance with available invocation surfaces
DragonnZhang Sep 22, 2026
a7315eb
fix: address code-mode review feedback on exec binding narrowing and …
qwen-code-ci-bot Sep 22, 2026
3c69762
Merge branch 'main' into dragon/add-codemode
qwen-code-dev-bot Sep 23, 2026
34711cf
fix(core): avoid unverified agent zoom hints and clarify tool exposure
DragonnZhang Sep 23, 2026
ce7e57d
Merge remote-tracking branch 'origin/main' into dragon/add-codemode
qwen-code-ci-bot Sep 23, 2026
fa457bd
fix(core): narrow MCP nested bindings by the agent tools allowlist
qwen-code-ci-bot Sep 23, 2026
ae35809
fix(core): keep CodeModeOnly exec expansion from bypassing MCP narrowing
qwen-code-ci-bot Sep 24, 2026
4c53574
Merge branch 'main' into dragon/add-codemode
qwen-code-dev-bot Sep 24, 2026
22a9a40
fix: preserve code-mode fork boundaries and update mode guidance
DragonnZhang Sep 26, 2026
779d689
merge: refresh main OAuth discovery before publishing code-mode fixes
DragonnZhang Sep 26, 2026
b1561b7
fix: preserve nested-only fork access and legacy mode resets
DragonnZhang Sep 27, 2026
e6fbdcd
fix(core): preserve empty tool policies when syncing main
DragonnZhang Sep 28, 2026
6edd151
fix: merge main and translate current tool mode settings
DragonnZhang Sep 28, 2026
f746b88
fix(core): merge main and preserve hybrid skill lifecycle
DragonnZhang Oct 1, 2026
ed2e58c
fix(core): merge main and preserve hybrid agent permissions
DragonnZhang Oct 3, 2026
4a72ef8
fix(core): align child skill routes and merge current main
DragonnZhang Oct 4, 2026
cad9407
fix(core): retain code-mode behavior with current main
DragonnZhang Oct 5, 2026
1df2386
fix(cli): align tool mode readouts and merge main
DragonnZhang Oct 6, 2026
71ab2c9
fix(core): preserve code mode policy when merging MCP rule fixes
DragonnZhang Oct 7, 2026
68ceea7
Merge branch 'main' into dragon/add-codemode
qwen-code-dev-bot Oct 7, 2026
f669bd7
Merge branch 'main' into dragon/add-codemode
qwen-code-dev-bot Oct 7, 2026
f183ce0
fix(core): align hybrid tool visibility and prompt budgets
DragonnZhang Oct 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
merge: preserve hybrid execution with stable tool bridge
  • Loading branch information
DragonnZhang committed Sep 21, 2026
commit 4a3863233c43e5220d634d2599a02242fe83b9d9
34 changes: 20 additions & 14 deletions docs/design/code-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,29 @@ force `direct`. Container execution exposes direct tools only: selecting

## Exposure policy

| Surface | `direct` | `code_mode` | `code_mode_only` |
| -------------------- | ------------------------ | ------------------------------- | ---------------- |
| Ordinary eager tools | Direct | Direct and nested | Nested only |
| Deferred tools | `tool_search` | `tool_search` and nested | Nested only |
| Direct-control tools | Direct | Direct only | Direct only |
| `exec` | Not registered | Direct | Direct |
| Hidden bridge tools | Existing direct behavior | Direct where already applicable | Hidden |
| Surface | `direct` | `code_mode` | `code_mode_only` |
| -------------------- | --------------------------- | ------------------------------- | ---------------- |
| Ordinary eager tools | Direct | Direct and nested | Nested only |
| Deferred tools | `tool_search` + `tool_call` | Bridge and nested | Nested only |
| Direct-control tools | Direct | Direct only | Direct only |
| `exec` | Not registered | Direct | Direct |
| Hidden bridge tools | Existing direct behavior | Direct where already applicable | Hidden |

In `code_mode`, ordinary visible tool descriptions gain an `exec` declaration
for that tool. The `exec` description keeps the complete `ALL_TOOLS` metadata
but does not duplicate every schema. Deferred tools gain their declaration when
their normal top-level declaration is revealed. In `code_mode_only`, the
existing behavior remains: all nested declarations live in the `exec`
description because no later top-level reveal is possible. `tools.eager` and
`tools.visible` do not reduce those nested schemas in CodeModeOnly: `tool_search`
is hidden, deferred reminders and the no-ToolSearch warning are skipped, and
surviving callable tools remain available through `exec`.
without duplicating every schema. With both bridge tools available, `tool_search`
returns deferred parameter schemas without changing the top-level declarations.
Match each returned schema name exactly to `ALL_TOOLS.name`, then invoke
`tools[entry.jsName]` with arguments shaped by that schema. If there is no entry,
do not normalize or guess a binding; use `tool_call` outside `exec`, or an
available direct tool, subject to normal validation and approval.

When either bridge half is absent or the agent surface is filtered, `exec`
includes signatures for nested tools whose schemas are otherwise unavailable.
In `code_mode_only`, all nested declarations live in the `exec` description.
Both bridge tools are hidden, deferred reminders and the incomplete-bridge
warning are skipped, and `tools.eager` / `tools.visible` do not reduce those
nested schemas. Callable tools remain available through `exec`.

Nested bindings prefer an exact canonical JavaScript name over names rewritten
to that property. Other collisions retain canonical-name ordering; omitted
Expand Down
30 changes: 18 additions & 12 deletions docs/design/code-mode.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,26 @@ CodeModeOnly。

## 暴露策略

| 调用面 | `direct` | `code_mode` | `code_mode_only` |
| ------------ | -------------------- | ------------------------ | ---------------- |
| 普通即时工具 | 直接调用 | 直接调用和嵌套调用 | 仅嵌套调用 |
| 延迟工具 | `tool_search` | `tool_search` 和嵌套调用 | 仅嵌套调用 |
| 直接控制工具 | 直接调用 | 仅直接调用 | 仅直接调用 |
| `exec` | 未注册 | 直接调用 | 直接调用 |
| 隐藏桥接工具 | 保持现有直接模式行为 | 在原本适用时直接调用 | 隐藏 |
| 调用面 | `direct` | `code_mode` | `code_mode_only` |
| ------------ | --------------------------- | -------------------- | ---------------- |
| 普通即时工具 | 直接调用 | 直接调用和嵌套调用 | 仅嵌套调用 |
| 延迟工具 | `tool_search` + `tool_call` | 桥接和嵌套调用 | 仅嵌套调用 |
| 直接控制工具 | 直接调用 | 仅直接调用 | 仅直接调用 |
| `exec` | 未注册 | 直接调用 | 直接调用 |
| 隐藏桥接工具 | 保持现有直接模式行为 | 在原本适用时直接调用 | 隐藏 |

在 `code_mode` 中,普通可见工具的描述会附加该工具的 `exec` 调用声明。
`exec` 描述保留完整的 `ALL_TOOLS` 元数据,但不重复所有 schema。延迟工具在
按正常流程暴露顶层声明时获得对应声明。在 `code_mode_only` 中保持现有行为:
由于后续无法暴露顶层声明,所有嵌套声明都集中在 `exec` 描述中。CodeModeOnly 中
`tools.eager` 和 `tools.visible` 不会减少这些嵌套 schema:`tool_search` 被隐藏,
延迟提醒和缺少 ToolSearch 的警告被跳过,仍可调用的工具继续通过 `exec` 使用。
`exec` 描述保留完整的 `ALL_TOOLS` 元数据,但不重复所有 schema。两个桥接工具
都可用时,`tool_search` 返回延迟工具的参数 schema,不改变顶层声明列表。
用返回的 schema 名称精确匹配 `ALL_TOOLS.name`,再按该 schema 构造参数调用
`tools[entry.jsName]`。没有匹配项时不能自行规范化或猜测绑定名称;应在 `exec`
外使用 `tool_call`,或调用可用的直接工具,沿用正常的参数校验和审批。

任一桥接工具缺失或智能体调用面经过过滤时,`exec` 会为无法从其他途径取得
schema 的嵌套工具附上签名。在 `code_mode_only` 中,所有嵌套声明集中在 `exec`
描述中;两个桥接工具都被隐藏,延迟提醒和桥接不完整的警告被跳过。
`tools.eager` 和 `tools.visible` 不会减少这些嵌套 schema,仍可调用的工具继续
通过 `exec` 使用。

嵌套绑定优先保留与 JavaScript 属性精确一致的规范名称,再考虑改写为该属性的
名称。其他碰撞沿用规范名称字典序;被省略的绑定不出现在嵌套签名中,
Expand Down
Loading
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.