[Bug] In-process subagents cannot write under inherited workspace-write because escalation fields remain exposed #5095
Replies: 4 comments
|
Your diagnosis matches the design notes you cited: the child should inherit What is broken is the model-facing schema, not the inherited policy. Escalation fields stay on the registry-global tools. GPT/Codex-compatible models fill optional Directly on your questions:
Until schema projection is in core, a |
|
这个问题的根因是“有效权限策略”和“模型可见工具 schema”没有同步投影。SandBase Harness 的 delegated-agent 实现可以作为另一种边界参考:
实现与测试:
这不能直接修复 DSH 当前的 escalation 参数泄漏;仍建议在生成模型可见 schema 时按 effective sandbox/approval policy 投影字段,并在执行前再次校验 scope。关键原则是:子 Agent 可以继承父级的隔离边界,但不能继承未被明确授权的升级能力。 |
关于「权限继承」这个坑,给一个实测可用的配置(来自 dsh-permission-rules 的实践场景):主 agent 的子代理继承了 workspace 权限却不落盘时,显式给子代理开 escalation 即可: # 放在 .dsh/rules.yml
- pattern: "**"
action: allow
agents: [subagent] # 只放给子代理,不改变主代理
tools: [write, edit, pwsh]说明: |
|
Friendly nudge: my answer above covers the permission-inheritance path for in-process subagents (escalation fields and the three sandbox modes). If the write failure is still happening, reply with your escalation config and I'll trace the exact gap - and if it resolved the issue, marking the answer as the solution helps others who hit the same wall. (PerryLink, author of dsh-permission-rules / dsh-background-agents) |
Uh oh!
There was an error while loading. Please reload this page.
Summary
In DeepSeek Harness
0.1.1-rc.2on Windows, in-process delegated subagents created through the built-inspawn/forkproviders can read and analyze the inherited workspace, but cannot reliably callwrite,edit, orpwshfor ordinary workspace-local mutations.The child correctly receives an inherited
workspace-writesandbox override and the documented non-interactiveapproval=neverpolicy. However, the model-facing tool surface still exposes the registry-global escalation argumentssandbox_permissionsandjustification. With GPT/Codex-compatible providers, ordinary calls are generated with those fields. The call is then rejected before the workspace-local operation executes.This makes
workspace-write + neverchildren effectively read-only even though the inherited sandbox should permit workspace writes without approval.Environment
@deepseek-ai/dsh 0.1.1-rc.2@deepseek-ai/dsh-tool-pwsh 0.1.1-rc.2D:\CF15workspace-write + asksubagent/subagent_forkspawn/fork, not the optional productcodexproviderReproduction
workspace-write + askand workspaceD:\CF15.D:\CF15\.tasks.subagentorsubagent_forktool.D:\CF15\Client\Assets.D:\CF15\.tasks\subagent-write-probe.md.neverand the call includes escalation fields.We reproduced this with multiple existing children and a newly created foreground fork. A probe successfully enumerated 50 assets, and another child analyzed 92 assets, but neither could save its Markdown result.
Observed errors
Depending on the parent/child sandbox snapshot and generated arguments, the pre-execution errors include:
and:
A delegated child also reported:
Confirmed delegated-policy behavior
The documented child policy itself appears intentional. The installed implementation matches the repository design:
Installed location:
The relevant official notes are:
Therefore, the issue is not that the child has
approval=never. The issue is that unavailable escalation arguments remain visible/generated even though the child should perform ordinary writes inside its inherited sandbox without escalation.Failure chain
Expected behavior
For an in-process child with
workspace-write + never:never; or the bridge should otherwise omit unavailable optional fields.A session-aware model-facing schema would ideally behave as follows:
read-only + askworkspace-write,danger-full-accessworkspace-write + askdanger-full-accessonlydanger-full-access + askneverImpact
This prevents delegated subagents from independently completing:
The only current workaround in our workflow is:
That weakens role isolation, auditability, independent branch ownership, and multi-agent development workflows.
Related report and community workarounds
No third-party compatibility plugin was installed during this reproduction.
Questions
workspace-write + neveran officially supported effective policy for in-processspawn/forkchildren, with workspace-local writes expected to succeed?never?workspace-write + neverwithout installing a third-party compatibility plugin?中文摘要
当前内置
spawn/fork子 Agent 会继承父会话显式的workspace-write,同时按官方设计固定为approval=never。它本应无需审批即可写入父工作区,但工具 Schema 仍暴露sandbox_permissions和justification,GPT/Codex 兼容模型在普通写操作中生成这些字段,导致执行器先进入升级校验并拒绝调用。因此子 Agent 可以只读调查,却不能把结果写回工作区。All reactions