Claude Code 101 - How Claude Code Works

The Agentic Loop

  • Enter a prompt
  • Gathers the context -> Returns text or a tool call
  • Takes action -> editing a file or running a command.
  • Verifies the results
  • Waits for the next prompt, or loops back and tries again

can add context, interrupt, or steer

Context

Context window:store and reference

Compacts your conversation:remove or summarize

Tools

  • Claude Code uses semantic understanding to determine when to call a tool and how to use the output.
    • file-reading tool
    • a web search tool
    • ...

Permissions

Permission modes:

  • **Default behavior:**explicit permission(editing , running )
  • **Auto-accept:**edited without asking, but commands still require approval.
  • Plan mode: compile a plan