# What Claude Code is

Claude Code is an agent harness that reads, edits and runs things in your project. What sets it apart is that it acts and then checks, and that you decide where it runs.

## Not a completer, not a chat window

Autocomplete guesses the next few tokens at your cursor. It never sees whether the guess works. A chat window answers from what you pasted into it, and you carry the result back to your project by hand.

Claude Code sits somewhere else. It runs in your project, reads the files it needs, edits them, runs commands, and reads what those commands printed. You give it a goal in plain language, and it works toward it while you watch.

The practical consequence is that your job changes. You stop being the person who copies text between a chat and an editor. You become the person who states the goal, sets the limits, and judges the result.

## What it can touch

Inside a session, Claude works through a small set of kinds of action, and the permission system is organised around them. Reading files inside the working directory needs no approval. Running shell commands needs approval, apart from a built-in set of read-only ones. Editing files is approved separately.

That split tells you what the tool really is: a program that can change your machine, with a gate in front of every change. The next lessons are mostly about that gate and about how to use it well.

> **Context is not empty when you start**
Before you type anything, your CLAUDE.md files, auto memory notes, MCP tool names and skill descriptions are already in the context. Every file read and every command output then adds more. A fresh session is a smaller thing than it looks.


**Question:** What is the main difference between Claude Code and a chat window?

- It uses a larger model
- It works inside your project and sees the results of what it does
- It never makes mistakes
- It answers without reading anything

**Answer:** It works inside your project and sees the results of what it does. Claude Code reads your files, runs commands and reads their output. That feedback is what a chat window lacks.


## Where it runs

The terminal is where it starts: you open a repository and run `claude`. But it is not only a terminal tool. The docs list the same agent in VS Code and JetBrains, in a Desktop app, on the web as cloud sessions, in Slack, with a Chrome integration, and on mobile.

You can also move a session between them. `/teleport` pulls a cloud session into your terminal, `/desktop` continues in the Desktop app, and `/remote-control` exposes the running session to claude.ai.

One more mode matters for scripts. `claude -p "prompt"` runs once without a conversation, and you can pipe input in:

```terminal
$ cat error.log | claude -p "what's going on here"
# One question, one answer, no interactive session.
```

For unattended runs the guide asks five questions before you leave: does it know what done is, can it check itself, what may it touch, what stops it, and who signs off.

## Your own judgment versus enforcement

The most useful idea in the official guide is a distinction. Some things are Claude's judgment: prompts, CLAUDE.md, and the auto-mode classifier. Some things are enforced by the harness: hooks, deny rules, the sandbox, and tests.

Use the second kind only for rules with no exceptions, and do not expect the first kind to hold under pressure. "Never push to main" written in CLAUDE.md is a request. The same line as a deny rule is a wall.

> **Ask which kind a rule is**
When you want something to always or never happen, ask yourself whether it is a preference or a guarantee. Preferences go in text. Guarantees go in settings or hooks.


**Question:** A rule must hold with no exceptions. Where should it live?

- In CLAUDE.md only
- In a deny rule or a hook
- In the first prompt of the session
- In a comment in the code

**Answer:** In a deny rule or a hook. CLAUDE.md is context that Claude reads and weighs. Deny rules and hooks are enforced by the harness itself.


> **Look at where you are**
Open a repository you know and run `claude`, then type `/context`. Notice how much is already loaded before your first message.
