by default, Claude Code runs with strict read-only
permissions. reading files, grep, git status, basic navigation, these run without a prompt.
the moment an action could modify something, write
a file, run a command that changes state, make a
network call, the permission system steps in and asks before proceeding.
as of mid-2026, the official docs describe the
evaluation order as deny, then ask, then allow. deny rules are checked first and cannot be overridden by anything downstream, including hooks.
this is the graduated trust spectrum in practice.
not every action gets the same scrutiny read operations are cheap to allow. write and execute operations get a prompt. operations that are hard to reverse, deleting files, pushing to git, running destructive database commands, get the strongest scrutiny regardless of what mode the session is running in.
there are several permission modes available,each trading oversight for speed differently.
default mode keeps every action visible. acceptEdits assumes file edits are low risk once you know the codebase, but still prompts for bash commands and anything touching the system outside the editor.
then there is bypassPermissions, sometimes called
"YOLO mode." it disables permission checks entirely.
the documentation is honest about this: it exists for automated pipelines with no human in the loop, and using it on a main developmentmachine is generally discouraged.
permissions are one layer. sandboxing is the other.
permissions control which tools and files an agent
can touch. sandboxing enforces that at the OS level,
restricting what a bash command and its child
processes can actually reach on disk and over
the network. the two layers are complementary,
not redundant. permissions can be reasoned about
and configured. sandboxing holds even if
the permission layer is somehow bypassed.