Repository navigation
Replies: 2 comments
|
Your reading of the code is correct, and the gap is slightly narrower than "stderr only" — there are three places that would each have to learn about stdout, and only one of them decides whether the model is told. 1. The classifier is stderr-only by construction.
2. The marker and the hint are produced by the render layer, not by the classifier.
That pairing is worth knowing because it splits the fix in two: the marker is a pure function of 3. Why
On the suggestion. "Determine the denial from the attempted path rather than from the output text" is strictly better in principle but needs a fact the current design does not carry to that point: the set of writable roots is the policy, while the matched signatures travel on the wrap ( One correction to the write-up, since it changes what a fix has to touch: The instance of this I would most want to be sure about is your |
|
A plugin-shaped fix for the stdout half of this is now published, in case it is useful while the classifier itself is unchanged:
npm install @argszero/dsh-stdout-denial-guardMount it, or apply the bundle patch it ships: - insert:
- id: stdout-denial-guard
name: '@argszero/dsh-stdout-denial-guard'What it does, and what it deliberately does not do. It does not print a marker of its own. The one thing that cannot travel that way is the escalation hint, because it is gated on an The predicate is deliberately narrow, because a false positive is worse here than a missed marker: a non-zero exit, a confining mode, not killed by a timeout/abort/signal,
Two limits worth naming honestly: it inherits the harness's substring-matching limit (a runner whose dialect is not in the table is not recognised), and it classifies by dialect, so a command that swallowed its own failure and exited 0 stays unclassified. The underlying fix — matching stdout in |
Uh oh!
There was an error while loading. Please reload this page.
Version: DSH 0.2.1-alpha.2, Linux (Docker container, Landlock runner, "partial enforcement (older Landlock ABI)"),
workspace-writesandbox,askapproval policy,@deepseek-ai/dsh-tool-bash.What happens
A bash tool call fails because the sandbox denies a write outside the writable roots, but the result has neither the
[sandbox: file access denied under workspace-write mode]marker nor the escalation hint. The model therefore does not learn that this was a policy denial, and works around it (for example by overridingXDG_CONFIG_HOME) instead of retrying withsandbox_permissions.Real example: running
npx astro dev --helpin a project. Astro's telemetry triesmkdir '/data/config/astro'(outside the writable roots) and prints the error on stdout:stderr only contains the informational launcher line, so no denial is detected.
Why (from reading the code)
dsh-sandbox-localmatchesDENIAL_SIGNATURES(landlock: ["permission denied"],bwrap: ["read-only file system"], ...) against stderr only. Any program that reports file errors on stdout is missed, and so is any command that merges the streams with2>&1, which agents do often.Suggestion
Also classify a denial when the exit code is non-zero and the signature appears on stdout, or determine the denial from the attempted path (outside the writable roots) rather than from the output text, so the existing escalation hint reaches the model.
All reactions