Repository navigation
ACP profile: agentOptions() only passes provider/model — sandbox/permission config is dropped, fs tools escape the workspace boundary (0.2.0-rc.2) #9693
Replies: 1 comment
|
Thanks for the write-up — the code path is right. I'd sharpen the diagnosis in one place, because it moves where the fix has to go.
That is the channel difference you measured: a deployment whose sandbox/permission rows live in a preset gets them for headless/web sessions, which join the deployment preset, and gets none for ACP sessions, which join nothing. It is not listed in the package README's "Known Limitations and Deferred Work" either. I'd file it as the composition gap rather than "sandbox not forwarded", because "add the field to On the workaround, one caveat worth writing down for whoever reads this later: a So I'd keep the gate as defence in depth, but treat the boundary itself as belonging back in the composition. |
Uh oh!
There was an error while loading. Please reload this page.
Version:
@deepseek-ai/dsh0.2.0-rc.2 (npm) — posting here since issues are disabled on this repo.Summary
With the same composed patch (
fs-sandboxcwd +permissionpresetworkspace-write/ask), fs tool writes outside the session cwd behave differently per channel:sandbox: file access denied under workspace-write mode(fail-closed).dsh --profile acp): the same write succeeds — the file is created on disk outside the workspace. No sandbox denial, no permission request.Code path
@deepseek-ai/dsh-acp/lib/index.jsbuilds the agent creation options via:This is passed as
agentOptionstoAcpSession.create(...)/AcpSession.resume(...)for bothsession/newandsession/resume. Other channel entry points surface sandbox/permission configuration to the agent; the ACP path reduces it to{provider, model}, so a workspace-write sandbox configured in the patch (or in the deployment config) never reaches agents created through ACP sessions.Repro
fs-sandbox: {cwd: <workspace>}and thepermissionpreset row (workspace-writesandbox,askapproval,defaultPreset: workspace-write).dsh --profile acp --patch <patch>,initialize, thensession/newwithcwd: <workspace>.writetool at an absolute path outside<workspace>(shell tools disallowed in the prompt).The composed patch itself is correct —
dsh dump-configshows the sandbox/permission rows; a headless session with the identical patch denies the same request.session/request_permissionworks fine over ACP, so the approval plumbing is there; only the sandbox wiring is dropped.Impact & workaround
Embedders driving DSH over ACP (the standard Agent Client Protocol surface) silently lose the workspace-write path boundary; the channel difference is invisible from the patch/config side. We worked around it in our product with a host-side plugin that gates the
tools/pre-executewaterfall (path policy per tool call), which fully restores the boundary for fs tools — but the underlying gap looks unintended for rc.2.All reactions