Module 1: What Claude Code Is and Why It Matters

How Claude Code Works

How Claude Code Works

Overview

Claude Code is an AI agent that combines three components: a language model (LLM), a set of tools, and a terminal interface. Understanding how those three components work together is the basis for using Claude Code effectively.

This capsule takes you inside the architecture. You're going to understand what happens when you give Claude Code a prompt: how it reads your codebase, how it reasons about the task, how it decides which tools to use, how it asks for permission before acting, and how it iterates until the work is done. You'll also learn exactly what it can and can't do — so your expectations are precise, not magical.

By the end of this capsule, the phrase "an agent in your terminal" won't be an abstraction. It'll be a concrete mental model you can use to predict how Claude Code will behave on any task.


The architecture: LLM + tools + terminal

Claude Code has three layers that work together:

┌───────────────────────────────────────────────┐
│                 YOUR TERMINAL                 │
│                                               │
│  You type a prompt                            │
│         │                                     │
│         ▼                                     │
│  ┌─────────────────────────────────────────┐  │
│  │           CLAUDE CODE (agent)           │  │
│  │                                         │  │
│  │  ┌───────────┐    ┌──────────────────┐  │  │
│  │  │    LLM    │    │     TOOLS        │  │  │
│  │  │           │    │                  │  │  │
│  │  │ Opus 5    │◄──►│ Read files       │  │  │
│  │  │ Sonnet 5  │    │ Write files      │  │  │
│  │  │ Haiku 4.5 │    │ Run commands     │  │  │
│  │  │ Reasons   │    │ Search patterns  │  │  │
│  │  │ Plans     │    │ Web requests     │  │  │
│  │  │ Decides   │    │ Git operations   │  │  │
│  │  └───────────┘    └──────────────────┘  │  │
│  │                                         │  │
│  └─────────────────────────────────────────┘  │
│         │                                     │
│         ▼                                     │
│  Result in your terminal                      │
└───────────────────────────────────────────────┘

The LLM: the brain

The LLM is the component that understands your code, reasons about problems, and generates solutions. Claude Code uses Anthropic's models:

  • Opus 5: The most capable model. Up to 1M tokens of context, 128K of output. Deep reasoning, ideal for complex tasks.
  • Sonnet 5: The best balance between speed and intelligence. Up to 1M tokens of context, 64K of output. Ideal for day-to-day coding work.
  • Haiku 4.5: The fastest and cheapest. 200K of context, 64K of output. Ideal for simple tasks where speed and cost matter more than depth of reasoning.

The LLM doesn't execute code directly. It reasons about what to do and decides which tools to use. It's the "brain" that analyzes, plans, and makes decisions.

The tools: the hands

The tools are the concrete actions Claude Code can perform on your system. The LLM decides when and how to use them:

ToolWhat it does
ReadRead files in your project
WriteCreate or overwrite files
EditModify specific sections of a file
BashRun commands in your terminal (npm, git, python, etc.)
GlobFind files by pattern (e.g. *.tsx)
GrepSearch for text inside files
WebFetchFetch the contents of a specific URL
WebSearchSearch the web
AgentSpin up subagents with their own context window for delegated tasks
LSPCode intelligence: jump to definitions, find references, report type errors
MonitorBackground event stream — Claude can tail logs and react live (April 2026)
Computer UseControl mouse/keyboard/screen — open apps, navigate a GUI, verify changes visually (Desktop March 2026, CLI April 2026 research preview)

That table shows the main tools. Claude Code has 30+ tools in total, including tools for task management, Jupyter notebooks, skills, and more. Each tool is an atomic action. Claude Code combines them to carry out complex tasks: read a file, understand its structure, make a change, run the tests, check that they pass, and commit.

A note on Computer Use: Computer Use used to live only in Claude Cowork. In March-April 2026 it expanded to Claude Code Desktop (GA) and the CLI (research preview). It lets Claude open native apps, click on UI, and verify changes visually — useful for automating apps with no API, verifying end-to-end flows, or driving GUI-only tools.

The terminal (and other interfaces): where you interact

Your terminal is Claude Code's original interface. You write prompts in natural language. Claude Code responds with text, code, and actions. It's the same terminal where you run git, npm, python — Claude Code operates in that same environment.

# You open Claude Code in your project directory
cd my-project
claude

# You type a prompt
> Find the bug in the authentication function and fix it

# Claude Code:
# 1. Reads the relevant files (auth.ts, middleware.ts, etc.)
# 2. Analyzes the code
# 3. Identifies the bug
# 4. Proposes a fix
# 5. Asks your permission to apply it
# 6. Edits the file
# 7. Runs the tests to verify

But the terminal isn't the only way to use Claude Code. Right now it's available on 5 platforms:

PlatformDescription
CLI (terminal)The original interface. Maximum flexibility and control.
VS Code extensionIntegrated straight into VS Code as a side panel.
JetBrains extensionFor IntelliJ, WebStorm, PyCharm users, etc.
Desktop appNative application for Mac and Windows.
Web app (claude.ai/code)Access from the browser with no local install.

Every platform shares the same agentic engine, the same tools, and the same CLAUDE.md system. What differs is the interface, not the capability. In this guide we focus on the CLI because it's the most flexible and gives you the most control over the agent.


The agentic loop

When you give Claude Code a prompt, it kicks off a cycle that repeats until the task is done:

┌──────────────────────────────────────────────┐
│               THE AGENTIC LOOP               │
│                                              │
│  1. PROMPT ─── You give an instruction       │
│       │                                      │
│  2. READING ── Claude reads the relevant     │
│       │        files in your project         │
│       │                                      │
│  3. REASONING ── Claude analyzes,            │
│       │          plans, decides              │
│       │                                      │
│  4. ACTION ──── Claude proposes actions:     │
│       │         edit a file, run a           │
│       │         command, create a file...    │
│       │                                      │
│  5. PERMISSION ── You approve or reject      │
│       │                                      │
│  6. EXECUTION ── Claude runs the action      │
│       │                                      │
│  7. VERIFICATION ── Is the task complete?    │
│       │                                      │
│  ┌────┴───┐                                  │
│  │ Done?  │                                  │
│  └────┬───┘                                  │
│   No  │  Yes                                 │
│   │   └──── Final result                     │
│   │                                          │
│   └──── Back to step 2 (iterate)             │
│                                              │
└──────────────────────────────────────────────┘

Step 1: Prompt

You give an instruction in natural language. It can be as broad as "improve this app's performance" or as specific as "change the submit button color to #3B82F6 in Header.tsx".

Step 2: Reading

Claude Code reads files in your project to understand the context. It doesn't read the whole codebase blindly — it uses heuristics to decide which files are relevant. If you ask it to fix a bug in authentication, it looks for files related to auth, middleware, login, and so on.

Step 3: Reasoning

The LLM analyzes the context (your prompt + the files it read) and plans what to do. This step is invisible to you — but it's where the agent's "thinking" happens. The higher the reasoning effort (controlled with /effort), the deeper this analysis goes.

Step 4: Action

Claude Code proposes one or more concrete actions: edit a file, create a new one, run a command. It shows you exactly what it's about to do before it does it.

Step 5: Permission

By default, Claude Code asks for approval before running actions that modify your system. That includes writing files and running terminal commands. You can approve, reject, or modify the proposed action.

Step 6: Execution

Once approved, Claude Code performs the action on your real system. The file gets edited, the command runs, the test executes.

Step 7: Verification and iteration

Claude Code evaluates the result. If the change introduced an error (a test fails, a lint warning shows up), it goes back to step 2 and fixes it. That iteration cycle is what makes an agent different from a code generator: it doesn't just produce — it verifies and corrects.


What Claude Code CAN do

Reading and analysis

  • Read any file in your project (code, configs, markdown, JSON, etc.)
  • Search for patterns in your codebase (grep, glob, regex)
  • Analyze the structure of the project (directories, dependencies, imports)
  • Understand relationships between files (who imports what, where each function is used)

Writing and editing

  • Create new files (code, tests, configs, documentation)
  • Edit existing files with precise changes (it doesn't rewrite everything, it modifies what's needed)
  • Multi-file refactoring (rename a function and update every import)
  • Generate boilerplate (components, routes, models, migrations)

Running commands

  • npm/yarn/pnpm: Install dependencies, run scripts, build
  • git: Add, commit, push, create branches, resolve conflicts
  • python: Run scripts, tests, install packages with pip
  • Tests: Run testing suites (pytest, jest, vitest, etc.)
  • Linters/formatters: Run eslint, prettier, black, ruff
  • Docker: Build, run, compose
  • Any command you can run in your terminal

Content creation

  • Generate tests for existing code
  • Write documentation (README, docstrings, comments)
  • Create configurations (tsconfig, eslint, Docker, CI/CD)

Basic example

> Create a React component called UserCard that takes name and email as props

Claude Code:
1. Reads the project structure to understand its conventions
2. Identifies whether you use TypeScript or JavaScript
3. Detects the style of the existing components (functional, class, hooks)
4. Creates the file UserCard.tsx with the component
5. Adds types if the project uses TypeScript
6. Follows the conventions it detected

Intermediate example

> The /api/users endpoint returns 500 when the user doesn't exist. 
> It should return 404. Fix it and add a test.

Claude Code:
1. Looks for files related to /api/users (routes, controllers, handlers)
2. Reads the endpoint's code
3. Identifies where it breaks (there's no "not found" handling)
4. Edits the handler to return 404 when the user doesn't exist
5. Reads the existing tests to understand the pattern
6. Creates a new test that verifies the 404
7. Runs the tests to confirm they pass
8. Shows you the result

What Claude Code CANNOT do

Knowing the limits matters as much as knowing the capabilities.

It has no conversational memory across sessions

Every new session starts with a clean context window. Claude Code doesn't remember the conversation history from earlier sessions.

Mitigation: Claude Code has two persistent memory systems that make up for this: (1) CLAUDE.md — instructions you write about your project, and (2) Auto memory — notes Claude writes automatically while you work (build commands, debugging patterns, your preferences). Both load at the start of every session. You can also pick up earlier sessions with claude --continue or claude --resume. Covered in depth in Module 03.

It doesn't reach external services without configuration

Claude Code can't access your database, your production API, or external services unless you configure the necessary tooling (MCP servers, Module 07).

It doesn't act without permission (by default)

Claude Code's permission model is designed so that you stay in control. By default, it asks for approval before modifying files or running commands. You can relax this with configuration (Module 05), but the default is safe.

It doesn't reach files outside the project (by default)

Claude Code operates inside the directory you run it from. It won't read files from other projects or from the system unless you explicitly allow it.

It isn't infallible

Claude Code makes mistakes. It can generate buggy code. It can misread your intent. It can propose suboptimal solutions. Your job as a developer is to supervise, evaluate, and correct when needed. This is pair-programming, not autopilot.

It doesn't replace understanding

If you don't understand the code Claude Code produces, you shouldn't accept it. If you can't evaluate whether a solution is correct, you need to learn more about the domain before delegating. Claude Code amplifies your capability — it doesn't substitute for it.


The context window

The context window is the amount of information Claude Code can "see" and process at once. It's the agent's working memory.

┌─────────────────────────────────────────────┐
│               CONTEXT WINDOW                │
│                                             │
│  ┌───────────────────────────────────────┐  │
│  │  Your prompt                          │  │
│  │  + Files it read                      │  │
│  │  + Command results                    │  │
│  │  + Conversation history               │  │
│  │  + CLAUDE.md (if it exists)           │  │
│  │  + Previous responses                 │  │
│  │                                       │  │
│  │  ALL of this has to fit in the window │  │
│  └───────────────────────────────────────┘  │
│                                             │
│  Opus 5:     ████████████████  1M tokens    │
│  Sonnet 5:   ████████████████  1M tokens    │
│  Haiku 4.5:  ████             200K tokens   │
│                                             │
└─────────────────────────────────────────────┘

Context sizes

ModelContext windowIn practical terms
Opus 51M tokens~750K words
Sonnet 51M tokens~750K words
Haiku 4.5200K tokens~150K words

What's a token?

A token is roughly 3/4 of an English word, or ~4 characters. Code tends to be "denser" in tokens than natural text because of the syntax.

"Hello world"       → ~2 tokens
"console.log('hi')" → ~5 tokens
A 100-line file → ~500-1500 tokens (it varies)

What happens when it fills up

When the context window fills up, Claude Code uses compaction — a process that summarizes the conversation history to free up space. You don't lose the context entirely, but the detail gets reduced. This is covered in depth in Module 04.

The practical implication

With Opus 5 and Sonnet 5, both with a 1M token window, you can analyze entire mid-sized codebases without worrying about the limit. With Haiku 4.5 at 200K tokens, you need to be more selective about which files land in context. Note: availability of the 1M context depends on your plan — on some plans it requires extra configuration (covered in Module 02).


The tool use model

Claude Code doesn't pick tools at random. The LLM analyzes your prompt and decides which tools it needs to complete the task:

Prompt: "What files are in src/?"
→ Tool: Bash (ls src/)

Prompt: "Find every function that uses fetch"
→ Tool: Grep (pattern: "fetch", directory: src/)

Prompt: "Fix the typo in the README"
→ Tool: Read (README.md) → Edit (README.md)

Prompt: "Install express and create a basic server"
→ Tool: Bash (npm install express)
→ Tool: Write (server.js)

Prompt: "Refactor UserService to use async/await"
→ Tool: Read (UserService.ts)
→ Tool: Read (the files that import UserService)
→ Tool: Edit (UserService.ts)
→ Tool: Edit (the files that import UserService)
→ Tool: Bash (npm test)

The LLM decides the sequence of tools dynamically. It doesn't follow a script — it evaluates the result of each tool and decides the next step.


The permission model

Claude Code asks permission before acting. This is a fundamental safety feature.

Actions that require permission

Write/edit files             → "Can I modify auth.ts?"
Run shell commands           → "Can I run npm test?"
Create new files             → "Can I create UserCard.tsx?"
Delete files                 → "Can I delete temp.js?"

Permission modes

Claude Code has several modes that control how much approval it needs. You can cycle through them with Shift+Tab:

ModeBehavior
DefaultAsks permission for file edits and shell commands
Auto-accept editsAccepts edits automatically, still asks for commands
Plan modeRead-only — Claude analyzes but modifies nothing
Auto modeAuto-approves with safety checks running in the background (research preview)

Your options when a permission request comes in

y (yes)           → Approve this action
n (no)            → Reject this action
a (always allow)  → Approve this action and every similar one in this session

Checkpoints: undoing changes

Every file edit is reversible. Before editing any file, Claude Code takes a snapshot of the current state. If something goes wrong, you can press Esc twice to roll back to an earlier state, or ask Claude to undo the changes. Checkpoints are local to your session and separate from git.

An example in practice

> Format every TypeScript file with Prettier

Claude Code:
"I'm going to run: npx prettier --write 'src/**/*.ts'"
Allow? [y/n/a]

> y

Running: npx prettier --write 'src/**/*.ts'
✓ 23 files formatted

Customizing the permission model

In Module 05 you'll learn to configure the permission system to automate approvals in trusted contexts (e.g. always allow running tests, but always ask before a delete). You can also configure per-tool rules in .claude/settings.json.


Comparison: Claude Code vs a human developer

AspectClaude CodeHuman developer
Reading speedReads 1000 files in secondsReads one file at a time
Writing speedGenerates code in secondsWrites line by line
Simultaneous contextUp to 1M tokens~7 items in working memory
ConsistencyApplies conventions uniformlyCan forget or drift
CreativityLearned patternsInsight and experience
JudgmentProbabilisticGrounded in real experience
Domain knowledgeBroad but shallowDeep in their area
DebuggingLooks for patterns and common errorsIntuition and experience
FatigueDoesn't get tiredGets tired and makes more errors
AccountabilityNoneTotal

The takeaway isn't "Claude Code is better" or "a human is better". It's: the combination of both is more powerful than either one alone. Claude Code brings speed, breadth, and consistency. You bring judgment, experience, and accountability.


The "agentic" paradigm

Autocomplete (Copilot)

You type:         function calculateTax(
Copilot suggests: amount) { return amount * 0.21; }

→ Reactive: it suggests AFTER you start
→ Scope: the current line or the current function
→ No context of the full project
→ No execution

Chat (ChatGPT)

You ask: "How do I do JWT authentication in Express?"
ChatGPT answers: "Here's an example..."

→ Generates text about code
→ Doesn't see your project
→ Doesn't run anything
→ You copy and adapt by hand

Agent (Claude Code)

You say: "Implement JWT authentication in my Express API"
Claude Code:
  1. Reads your codebase (routes, models, middleware)
  2. Analyzes the existing structure
  3. Designs the implementation
  4. Installs dependencies (jsonwebtoken, bcrypt)
  5. Creates the auth middleware
  6. Modifies the protected routes
  7. Generates tests
  8. Runs the tests
  9. Everything passes → done

→ Proactive: it explores, plans, executes
→ Scope: the entire codebase
→ Full project context
→ Runs and verifies in your real environment

The difference is fundamental: an agent doesn't generate code — it builds software. It reads your real project, operates in your real environment, and produces changes that work on your real system.


Common patterns

Pattern 1: Exploring a new codebase

> Analyze this project. What technologies does it use, what's the 
> structure, and what are the main components?

Claude Code reads the key files (package.json, the directory
structure, the main files) and gives you a structured summary.

Pattern 2: Bug fix with context

> The POST /api/orders endpoint returns 500 when items is an 
> empty array. Find the bug and fix it.

Claude Code finds the handler, reads the code, spots that it 
doesn't validate empty arrays, adds the validation, and runs tests.

Pattern 3: Multi-file refactoring

> Rename the getUser function to fetchUserById across the whole project.

Claude Code finds every usage, updates each file, checks the
imports, and runs tests to confirm nothing broke.

Pattern 4: Test generation

> Generate unit tests for src/services/PaymentService.ts

Claude Code reads the service, understands the methods and their 
signatures, generates tests with the right mocks, and runs them.

Pitfalls and edge cases

Pitfall 1: Treating Claude Code like a chatbot

Bad:
> How do you write a for loop in Python?

Better:
> Refactor processItems() to use a list comprehension 
> instead of the current for loop

Claude Code shines when it operates on your real code, not when it explains generic concepts.

Pitfall 2: Ambiguous prompts

Bad:
> Improve this code

Better:
> Optimize the searchUsers function in users.ts: 
> it's making N+1 queries to the database

The more specific your prompt, the better the result.

Pitfall 3: Not verifying the changes

Claude Code makes mistakes. Don't accept changes blindly:

  • Read the diffs it proposes
  • Run the tests
  • Verify that the behavior is what you expected

Pitfall 4: Ignoring the context window

If you've racked up a lot of interactions in one session, the context fills up and gets compacted. Response quality can degrade. Sometimes starting a fresh session is the better move.

Pitfall 5: Expecting perfection

Claude Code is a probabilistic tool. It produces results that are correct most of the time, but not always. Your job is to supervise, not to trust blindly.


Complete worked example

Scenario: Adding a new endpoint to an existing Express API

> Add a GET /api/products/:id endpoint that returns a 
> product by ID. If it doesn't exist, return 404. Include 
> ID validation and a test.

What Claude Code does (step by step):

1. READING
   → Reads package.json (confirms Express + TypeScript)
   → Reads src/routes/ (understands the routing pattern)
   → Reads src/models/Product.ts (understands the model)
   → Reads src/controllers/ (understands the controller pattern)
   → Reads tests/ (understands the test pattern)

2. REASONING
   → "The project uses Express + TypeScript"
   → "Routes live in src/routes/ and use separate controllers"
   → "I need: a route, a controller, ID validation, a test"
   → "The ID has to be a valid number (validation)"

3. ACTION — Create the controller
   → Writes src/controllers/productController.ts
   → Implements getProductById with validation and 404 handling

4. ACTION — Add the route
   → Edits src/routes/products.ts
   → Adds router.get('/:id', getProductById)

5. ACTION — Create the test
   → Writes tests/products.test.ts
   → Tests: product found (200), not found (404), 
     invalid ID (400)

6. EXECUTION
   → Runs npm test
   → All 3 tests pass ✓

7. RESULT
   → "Done. I added GET /api/products/:id with validation and 
   → tests. All 3 tests pass."

This is the agentic loop in action: reading → reasoning → action → verification → result.


Practice exercises

Exercise 1: Identify the components

Given the following scenario, identify which architecture component (LLM, Tools, Terminal) is acting at each step:

1. You tell Claude Code: "List every .py file in src/"
2. Claude Code runs a command to list files
3. Claude Code analyzes the result and presents it to you, organized
Solution
  1. Terminal — you enter the prompt through the terminal interface
  2. Tools — Claude Code uses the Bash tool (or Glob) to list files. The LLM decided that was the right tool.
  3. LLM — it analyzes the command's raw output and organizes it into a readable answer. The answer is displayed through the Terminal.

Every interaction involves all three layers: the terminal as the interface, the LLM as the brain that decides and communicates, and the tools as the hands that execute.

Exercise 2: Predict the behavior

For each prompt, predict which tools Claude Code would use, and in what order:

  1. "What does the calculateTotal function in utils.ts do?"
  2. "Install lodash and use it in helpers.ts for a deep clone"
  3. "Find every console.log in the project and remove them"
Solution

Prompt 1: "What does the calculateTotal function in utils.ts do?"

  • Tool 1: Read (utils.ts) — reads the file
  • The LLM analyzes the function and explains it to you
  • No more tools needed — it's a reading question

Prompt 2: "Install lodash and use it in helpers.ts for a deep clone"

  • Tool 1: Bash (npm install lodash) — installs the dependency
  • Tool 2: Read (helpers.ts) — reads the current file
  • Tool 3: Edit (helpers.ts) — adds the import and the use of _.cloneDeep

Prompt 3: "Find every console.log in the project and remove them"

  • Tool 1: Grep (pattern: console.log, directory: the project) — finds the occurrences
  • Tool 2-N: Edit (each file with a console.log) — removes each occurrence
  • Final tool: Bash (npm test or lint) — verifies nothing broke

Exercise 3: Capabilities vs limitations

Classify each task as "Claude Code CAN do this" or "Claude Code CANNOT do this (without extra configuration)":

  1. Read a CSV file in your project and analyze it
  2. Connect to your PostgreSQL database in production
  3. Create a git branch and push
  4. Remember what you did in yesterday's session
  5. Run a Python script that uses requests
  6. Reach your company's Slack API
Solution
  1. CAN — the Read tool reads the file, the LLM analyzes it
  2. CANNOT (without configuration) — it needs an MCP server or configured direct access
  3. CAN — it uses the Bash tool to run git commands
  4. PARTIALLY — it doesn't remember the exact conversation, but it can carry learnings across sessions via auto memory and CLAUDE.md. You can also pick up sessions with claude --resume. Covered in Module 03.
  5. CAN — it uses the Bash tool to run python script.py
  6. CANNOT (without configuration) — it needs an MCP server for Slack or configured credentials

The general rule: if you can do it from your terminal with a command, Claude Code can do it. If it requires access to external services, it needs extra configuration.

Exercise 4: The context window in practice

Your project has 500 TypeScript files, each around 200 lines. Calculate:

  1. Roughly how many tokens does your codebase have?
  2. Does it fit whole in Opus 5 or Sonnet 5 (1M tokens)?
  3. Does it fit whole in Haiku 4.5 (200K tokens)?
Solution

The math:

  • 500 files × 200 lines = 100,000 lines of code
  • ~10 tokens per line (average for TypeScript)
  • 100,000 × 10 = ~1,000,000 tokens

Answers:

  1. ~1M tokens (estimated)
  2. Right at the limit of Opus 5 and Sonnet 5 (both 1M). Most of it will fit, but keep in mind the context window also needs room for the prompt, the conversation history, and the responses.
  3. It doesn't fit in Haiku 4.5 (200K). You'd have to be selective about which files to include.

Practical implication: For large codebases, model selection matters. Opus 5 and Sonnet 5 (both 1M) can handle most real projects. Haiku 4.5 (200K) requires Claude Code to be selective about what it reads — and it is, because it doesn't read everything blindly, only what's relevant to the prompt.

Exercise 5: The agentic loop in action

Describe the steps of the agentic loop Claude Code would follow for this prompt:

"The build is failing. Diagnose and fix it."
Solution
  1. PROMPT: "The build is failing. Diagnose and fix it."
  2. READING: Reads package.json to understand the build command. Reads the configuration files (tsconfig, webpack, vite, etc.)
  3. ACTION: Runs the build command (npm run build) to see the exact error
  4. REASONING: Analyzes the error output. Identifies the file and the line where the problem lives.
  5. READING: Reads the file where the error occurs
  6. REASONING: Determines the root cause (type error, missing import, syntax error, etc.)
  7. ACTION: Edits the file to fix the error
  8. VERIFICATION: Runs npm run build again
  9. ITERATION: If there are more errors, it repeats from step 4. If the build passes, it reports success.

The key point: Claude Code doesn't guess at the solution — it runs the build, reads the real error, and works with concrete information.


Summary

  • Architecture: Claude Code = LLM (brain) + Tools (hands) + Terminal (interface)
  • LLM: Opus 5 (1M tokens, deep reasoning), Sonnet 5 (1M tokens, speed/intelligence balance), or Haiku 4.5 (200K tokens, the fastest and cheapest)
  • Tools: Read, Write, Edit, Bash, Glob, Grep, WebFetch, WebSearch, Agent, LSP, and 20+ more — concrete actions on your system
  • Agentic loop: Prompt → Reading → Reasoning → Action → Permission → Execution → Verification → Iteration
  • It can: Read/write files, run commands, search for patterns, git, tests, anything you do in a terminal
  • It can't: Remember conversations across sessions (but it has auto memory for what it learns), reach external services without configuration, act without permission, be infallible
  • Context window: Opus 1M tokens, Sonnet 1M tokens, Haiku 200K tokens — it determines how much it can "see" at once
  • Permissions: Claude Code asks for approval before modifying your system
  • The agentic paradigm: It doesn't generate text about code — it operates on your real code, in your real system
  • Your role: Supervise, evaluate, correct. Claude Code amplifies your capability, it doesn't substitute for it.

Next capsule: 03 - The AI coding tools landscape — how Claude Code compares with Cursor, Copilot, Cline, and other tools. And when to use each one.


Additional resources

  1. How Claude Code Works — The agentic loop, tools, and how it interacts with your project
  2. Tools Reference — The complete list of available tools and the permissions they require
  3. Configure Permissions — The permission system, modes, and configuration rules
  4. Model Configuration — Available models, aliases, effort levels, and extended context
  5. Explore the Context Window — An interactive simulation of how the context window fills up
  6. Claude Code Best Practices — Recommended patterns for effective use
  7. Building Effective Agents — Anthropic Blog — Paper on design patterns for AI agents