L

Learn AI

Track progress · learn offline

Open

Lesson 2 of 6

How Claude Code works

7 min read

Cursor lives in an editor. Claude Code lives in your terminal. Strip away the interface — what's actually running underneath?

An agent in your terminal

Claude Code is a coding agent that runs where your code already lives — the command line. There's no special editor UI; it reads your files, runs your shell commands, and edits in place. Underneath, it's the same shape as any agent: give it a goal, and it runs think → act → observe in a loop until the job is done.

Claude Code is the read-plan-edit-run loop with a terminal as its home. Its 'act' is a shell command; its 'observe' is that command's output.

Same loop, different tools

The scene shows a generic agent booking a table, but the mechanism is identical to what Claude Code does with your repo. Swap the tools and you have it: instead of a booking API, its actions are read this file, run this command, apply this edit. It's an agent, not a fixed workflow — nobody scripted the exact steps; it decides them turn by turn.

The loop is universal; only the tools change. Claude Code's tools are your file system, your shell, and your test runner.

Because its 'act' is a real shell command, Claude Code can do anything your terminal can — run tests, grep, git, install packages. That power is also why it asks before running commands that change things.

What makes it Claude Code

Underneath its terminal interface, what is Claude Code actually doing?

Continue in the app

Take the whole How AI Coding Agents Work course — tracked

Get your personalized path, progress and streaks in the app — this lesson and every next one, in order.