You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dsh-tool-skill 的合同(packages/skill/tool-skill README):不另注 synthetic context,因为「freshly loaded result is already recorded as the tool result and becomes available to the next model step」。这只对 Native 成立。Code Mode 下 nested result 的 canonical JSON 只到 worker binding,durable content 只到 dispatch 日志。
Catalog 文案仍按 Native 说话:Load all applicable skills, then follow their full instructions. 没说必须把 content 从程序里带出来。标准模式切换到 PTC 模式后技能第一轮调用报错 #1755 若只改成「请在 run_code 里调 tools.skill」,会把模型从 UNKNOWN_TOOL 推进到本问题。
I traced this against rc.7 (99f6f02). The behavior comes from three distinct observers: the Code Mode program receives the canonical Skill value, the trajectory/UI persists the nested dispatch, but deriveMessages() only exposes the outer run_code result plus additionalContexts to the next model step. The Skill tool currently returns/renders its value without deferring an identified instruction context. That is why a fire-and-forget await tools.skill(...) can appear successful while the next model sees only (run_code completed with no output). An rc.7-safe workaround is to explicitly return or log loaded.content; a durable fix should forward Skill content as a Skill-specific identified instruction context through the existing nested additionalContexts path, without exposing ordinary nested tool results. I wrote up the source map, nearby-case distinctions, and regression gates here: https://sandbaseai.github.io/deepseek-harness-handbook/code-mode-skill-context.html
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Code Mode 下
skill调用成功,但技能正文不进入下一轮模型上下文Related: #1755(那是顶层直接调
skill被unknown tool "skill"拒绝;本讨论是 嵌套tools.skill(...)已经成功之后,正文仍然进不了模型。)现象
Web / PTC(
tools.mode: code)里,模型按 SDK 在run_code程序内加载技能:随后出现分裂视野:
Skill · <name>行(ui-skill/ Inspect)<skill_instructions>正文run_code输出为空(run_code completed with no output),Think 里写 “The skill content wasn't returned in the output”,然后去读SKILL.md或重调用户看到技能「已经加载」,模型却按「加载失败」继续。这不是 SkillRow 画错了:它按设计渲染的是
tool/code-dispatch日志,不是下一轮会发给模型的 payload。复现
code-review/domain-modeling/diagnosing-bugs均可)。console.log/return的程序(这是 Native 语义下的自然写法)。output.render(renderSkillContent)。run_code没有把content带回来。对照实验(同一会话):
await tools.skill({ name })且不打印 → 模型侧空输出;UI 仍有完整卡。{ name, provider, resourceBase, content },content是完整说明书。工具本身是好的。机制
这是两条各自成立的合同撞车,不是
skillexecute 失败。Code Mode 的核心合同(Code Mode Agent Note,SDK 固定句):嵌套工具结果只回给程序;只有
console.log/return进入下一轮。tool/code-dispatch给 UI / 回放,不进模型历史。图片有「run 结束后贴给模型」的特例,技能没有。dsh-tool-skill的合同(packages/skill/tool-skillREADME):不另注 synthetic context,因为「freshly loaded result is already recorded as the tool result and becomes available to the next model step」。这只对 Native 成立。Code Mode 下 nested result 的 canonical JSON 只到 worker binding,durablecontent只到 dispatch 日志。Catalog 文案仍按 Native 说话:
Load all applicable skills, then follow their full instructions.没说必须把content从程序里带出来。标准模式切换到 PTC 模式后技能第一轮调用报错 #1755 若只改成「请在run_code里调tools.skill」,会把模型从 UNKNOWN_TOOL 推进到本问题。用户显式
/name已经走注入路径(skill-invocationinstructions context)。模型调用路径没有对等物。Code Mode 会把 nestedadditionalContextsdeferContext()到外层run_code之后(packages/core/tools/src/code-mode.ts),但skill现在不挂 context。SkillRow Agent Note(
2026-08-06-web-skill-tool-row.md)写「preserving exactly what reached the model」。Native 真,Code Mode 假:卡上是 dispatch 日志,模型看到的是外层 curated output。这为什么值得改合同,而不是再写一句 prompt
skill不是 bash/read 那种「程序消化的中间数据」。它的产品语义是 把说明书装进模型上下文再执行。Code Mode 把中间结果藏起来,对 grep 结果是优化,对 skill 是功能缺失。模型会反复踩这个坑:SDK 说 extract just what you need,catalog 说 load then follow。Native 写法是 fire-and-forget load。Web 默认又是 code mode,所以这是默认用户路径,不是边角。
Prompt-only(catalog/SDK 加粗「必须 print
content」)治不好:模型仍会忘;即使用return把整份说明书塞进外层 result,也会和「curate / 省 token」对着干,还可能顶到run_codeoutput cap。请核心决定的问题
skill在 Code Mode 里是「装进对话的说明书」,还是「给程序的数据 fetch」?若是前者(与 Native、与
/name注入、与 catalog「follow their full instructions」一致),模型调用成功后正文应自动出现在外层run_code之后,不依赖模型记得 extract。方向(供讨论,不是补丁):
skill成功时带上渲染后的<skill_content>,作为additionalContexts/ instructions 注入;Code Mode 已有 parentdeferContext,会跟在外层 result 后面。与用户/name路径对齐,避免和程序return重复时要定义谁为准。skilldescription 写明必须 extract。便宜,但不改变「加载 = 进上下文」的缺口。不改 UI 也能解释现状,但用户会继续以为模型已经读过卡里那份正文。
不在本讨论范围
All reactions