PTS security notes / Guides

Is --dangerously-skip-permissions safe? Running Claude Code and Codex without prompts

By PTS · Published 2026-12-03 · Updated 2026-12-03 · Docs checked December 3, 2026

Short answer: not on your everyday machine. Both Anthropic and OpenAI say so in their own docs, and the reasons are specific. This guide shows what the "skip all prompts" switches turn off, what still applies, and how to cut the prompt fatigue without handing your whole account to the agent.

What Claude Code's bypass mode does

Claude Code has several permission modes. The most permissive is bypassPermissions. Anthropic's table lists what runs without asking as "Everything" and the best use as "Isolated containers and VMs only" (permission modes).

You turn it on at launch, with claude --permission-mode bypassPermissions or the older flag --dangerously-skip-permissions. You cannot switch into it from a session that started without it.

The docs carry a plain warning: bypassPermissions "offers no protection against prompt injection or unintended actions." Prompt injection is when text the agent reads, such as a web page, an issue or a file in a repo you cloned, contains instructions the agent then follows. With prompts off, nothing stops it.

What still applies in bypass mode

Not everything is switched off. According to the same page:

So a deny list in your settings is still worth having, even when you plan to run without prompts. Remember its limits: deny rules cover Claude's built-in tools and some shell commands, not every way a script can read a file. The sandbox is what enforces limits at the operating-system level. More on that in How to stop your AI coding agent reading .env and secrets.

Built-in guardrails around the switch

Claude Code adds a few guardrails of its own:

A middle path: fewer prompts without bypass

If your real problem is "too many prompts," Anthropic suggests auto mode instead. In auto mode a second model, the classifier, reviews actions in place of you, with background safety checks. The docs say that from Claude Code v2.1.283 it is the starting mode for interactive terminal and VS Code sessions, and earlier versions use it on certain paid plans. Check your version and your own mode with Shift+Tab.

Other options from the same page:

What the Codex equivalent does

Codex has two separate layers: a sandbox mode (what it can technically do) and an approval policy (when it must ask). That split gives you a useful distinction (agent approvals and security).

If you want fewer interruptions, change the approval side and keep the sandbox. The docs also describe a granular approval policy, which keeps some prompt categories interactive while rejecting the others, and an Auto-review mode that sends eligible approval requests to a reviewer agent instead of to you.

One more Codex rule worth knowing: destructive app or MCP tool calls always require approval when the tool advertises a destructive annotation, unless the tool advertises a read annotation.

When no-prompt mode is reasonable

Both vendors point to the same place: an isolated environment. OpenAI notes that inside a container you may need danger-full-access because the Linux sandbox can fail to start under Docker, and then the container is your boundary. It also warns that a malicious project can exfiltrate anything available inside the dev container, including Codex credentials, so use that pattern only with trusted repositories.

Our checklist for a throwaway environment, based on those warnings:

  1. Use a container or VM you can delete. Do not use your daily laptop session.
  2. Put only the project folder in it. Do not mount ~/.ssh, ~/.aws, ~/.kube or your cloud CLI config.
  3. Give it a narrowly scoped, short-lived token for the one job, never an admin login or production credentials.
  4. Keep the repo trusted. Do not point a no-prompt agent at code you just cloned from a stranger.
  5. Limit outbound network access if you can, since that is how data leaves.
  6. Review the result like any other pull request before it goes near main.

Quick answer for your setup

To see what your agent could reach today, run the 15-minute inventory. For the settings themselves, see the 10-minute permissions audit. If your agent also uses MCP servers, read the MCP server security checklist.

Setting names and flags in this article were checked against official Claude Code and Codex docs on December 3, 2026. Tools change fast, so check your version.

Want the checklist?

PTS wrote a free 9-page checklist with a worksheet and starter files for Claude Code and Codex: Agent Blast Radius Checklist on Gumroad.

Get the free checklist

A 9-page worksheet plus starter files for Claude Code and Codex. Download it on Gumroad. This site does not collect email.

Get the free checklist

Or get both free guides in one checkout.

Keep reading