What Is Claude Code and What It Can Touch on Your Machine
What Claude Code is, what it can read, edit and run locally, and how permission modes and rules gate each action.
Updated · Markdown version
Claude Code is Anthropic's agentic coding tool. It works on your repository from a terminal, an IDE, the desktop app or the browser: it can open and change files and run commands, and a permission system you configure determines which of those actions go ahead.
What it can touch in Manual mode
Reads are the cheapest action. According to the permissions documentation, file reads and searches inside the working directory need no approval. The prompts described in this section are those of Manual mode, whose config value is default. In Manual mode, approval depends on the tool. Shell commands prompt except for a built-in set of read-only commands. File edits prompt. WebSearch prompts. WebFetch prompts except for a built-in set of preapproved documentation domains.
Manual mode is not necessarily the mode a session starts in, even though its config value is named default. The permission-modes page says that with Claude Code v2.1.283 or later, auto mode is the built-in starting mode for interactive terminal and VS Code sessions. If auto mode is not available to the session, it starts in Manual. A --permission-mode flag or a permissions.defaultMode setting can select another mode. In auto mode a classifier reviews actions instead of you, so the prompts below may not appear. claude -p and Agent SDK runs start in default. To follow the example below, start the session with claude --permission-mode default, or press Shift+Tab to cycle modes, and check that the terminal status bar shows manual mode on.
Picture a failing test and a request for a fix, in a session in Manual mode. Claude Code opens the test file and the module under test without asking. It proposes an edit, which prompts you; approving it lasts until the session ends. It then wants to run the test command, which prompts again. If you choose "Yes, and don't ask again" for that command, Claude Code saves a rule to .claude/settings.local.json (at the git repository root; on Windows it stays beside .claude/settings.json), and that rule applies to future sessions in the repo. File-edit approvals are not saved this way.
What Claude Code is not: its permission system is not a sandbox, and the optional OS sandbox is off by default. Permission rules are enforced by Claude Code, not by the model, so instructions in your prompt or in CLAUDE.md shape what Claude attempts but do not block anything. Your account also decides access. On the overview page, checked as of 2026-11-26, most surfaces are tied to a Claude plan or an Anthropic Console login, with no prices printed, so look at claude.com/pricing for current plans.
Control what it can do
- Pick a permission mode. Set
defaultModein a settings file (theautoandbypassPermissionsmodes take effect only from user or managed settings, or from--permission-modefor one session). The modes aredefault(Manual mode, which prompts before most edits, shell commands, and network requests),acceptEdits(auto-accepts edits and simple filesystem commands inside the working directory),plan(explores and edits no source files),auto(a background classifier checks actions),dontAsk(auto-denies anything that would prompt), andbypassPermissions(skips prompts). The docs say to usebypassPermissionsonly in containers or VMs. - Write allow, ask, and deny rules under
permissionsin a settings file. Rules take the formToolorTool(specifier), for exampleBash(npm run build),Read(./.env), orWebFetch(domain:example.com). A scoped deny such asBash(rm *)blocks matching calls when Claude attempts them; it matches command text, so it is not a boundary around every way of running the program. - Remember the precedence. Deny is checked first, then ask, then allow. A broad deny such as
Bash(aws *)blocks a call even when a narrower allow rule also matches it. - Add a PreToolUse hook when a rule is too coarse. The hook receives JSON about the pending call and can block it. Project hooks go in
.claude/settings.json(committable) or.claude/settings.local.json(not shared). - Review the result with
/permissions, which lists every rule and the settings file it comes from.
Check that it worked: open /permissions and confirm your new rule appears with the expected source file. Then test with a harmless command, one that only prints text and changes nothing, covered by a deny rule you wrote for the test. Ask Claude to run it and confirm Claude Code blocks it. If it runs, stop and inspect the rule name, the pattern and the source file shown in /permissions before you test again. (This test is a suggestion from this guide, not a documented procedure.)
Pitfalls
- Treating CLAUDE.md as enforcement. A line that says "never run migrations" changes intent, not access. Fix it by adding a deny rule or a PreToolUse hook.
- Accumulating saved approvals. "Don't ask again" rules persist per repository. Notice broad entries such as a generic shell pattern in
/permissions, and remove the ones you do not want. - Expecting edit approvals to persist. File-edit approvals last only for the session. Expect prompts again in a new Manual mode session.
- Using bypass mode on your daily machine. Skipping prompts also skips checks on protected paths such as
.gitand.claude. Keep Manual (default) mode, and an admin can blockbypassPermissionswithpermissions.disableBypassPermissionsMode. - Writing rules against labels. The docs note that a transcript label can differ from the canonical tool name, and rules match canonical names. A rule written with a display label silently matches nothing. Use the names in the tools reference.
When to use a skill instead
A one-off question is fine as an ad-hoc prompt. A reusable skill helps when the same guardrails or file maintenance recur across sessions and repositories. coding-agent-guardrails gives the agent a short decision procedure and two read-only scripts. Its description says they catch destructive git commands, edits to generated files, skipped or weakened tests, scope creep and committed secrets. Its skill page shows its recorded evaluation. agent-instruction-files drafts the CLAUDE.md and AGENTS.md files that Claude Code can load at the start of a session, then audits them. Neither replaces permission rules, which remain the enforcement layer.
FAQ
Is Claude Code free? Anthropic's overview lists a Claude plan or Anthropic Console access as the usual requirement, and the desktop app needs a paid plan. The page gives no prices, so look at claude.com/pricing for the plans in effect as of 2026-11-26.
How do I start using Claude Code? Use the native installer described on Anthropic's overview page, which lists a separate command for each platform. Then run claude inside a project directory and log in when prompted.
What are hooks in Claude Code? Hooks are user-defined actions that run at lifecycle points such as PreToolUse and PostToolUse. A hook can be a shell command, an HTTP endpoint, an MCP tool call, an LLM prompt, or a subagent, and a PreToolUse hook can block the tool call.
Related skills in this catalog
Platform Score is our assessment under a published method. It is not a safety guarantee.
Related guides
- Agentic Coding Tools: What They Are and How to Choose One
- What Is Claude Cowork? Plans, Beta Status, vs Code
- Codex vs Claude Code: Config Files and Sandbox
- Claude Code Slash Commands: Built-in vs Custom
- Cursor vs Claude Code: Editor or Terminal Workflow
- Install Claude Code: Native, Homebrew, WinGet, or npm
Terms this guide uses
This item is a worked example in the AI glossary for:
Sources
- https://code.claude.com/docs/en/overview (accessed 2026-11-26)
- https://code.claude.com/docs/en/permissions (accessed 2026-11-26)
- https://code.claude.com/docs/en/permission-modes (accessed 2026-11-26)
- https://code.claude.com/docs/en/hooks (accessed 2026-11-26)