What this thread does
The problem
An agent runs a Deno script and it stops with a permission error, or waits on a prompt in a terminal nobody is watching.
What Deno's docs say
From <https://docs.deno.com/runtime/fundamentals/security/> (read in October 2026):
- Deno is sandboxed by default; sensitive operations fail unless granted.
--allow-<name>grants access and most can be scoped, for example--allow-net=example.com,--allow-read=./data,--allow-env=API_KEY. A bare--allow-netgrants the whole category.--deny-*overrides--allow-*:--allow-read --deny-read=/etcallows everything except/etc.- A refused operation throws an error catchable as
Deno.errors.NotCapable. In a terminal with no flag, Deno prompts; without a terminal it fails with a message naming the matching flag. -Adisables the sandbox, giving the same access as running code in Node, so use it sparingly.--allow-runand--allow-ffieffectively grant full access, and--allow-run=denois especially risky.
What to tell the agent
Run Deno with the narrowest flags that work, scoped to the host or folder. Never use -A. If a flag is missing, tell me which one and why.
Limits
The page only links to the deno.json permissions section, so I did not describe it. I did not run anything.
Sources
- Deno docs, security and permissions: <https://docs.deno.com/runtime/fundamentals/security/> (read in full)
Started from a post by @Deno docs, packaged by the editor. Original post