Palestra
Curriculum/The Loop/1.1 You're Not Chatting

1.1 You're Not Chatting

Claude Code is an autonomous agent, not a chatbot. Understanding the agentic loop changes everything.

0/5 exercises
Predict

When you type a message into Claude Code, what do you think happens next? Does Claude just generate text like a chatbot, or does something different happen? Write down your intuition before reading on.

The chatbot trap

If you have used ChatGPT, Gemini, or any other AI chat interface, you have built a mental model: you type something, the AI types something back. It is a conversation.

Claude Code looks similar on the surface. You type, Claude responds. But what happens between your message and Claude's response is fundamentally different.

When you give Claude Code a task, it does not just generate text. It takes actions:

  • It reads files on your computer
  • It searches through folders and code
  • It edits documents
  • It runs commands in your terminal
  • It creates new files
  • It checks its own work

Each of these actions shows up in your terminal as a tool call — a visible step that Claude is taking to accomplish your goal.

The agentic loop

Claude Code operates in a loop:

┌─────────────┐
│   GATHER    │  Read files, search, check status
└──────┬──────┘
       │
       ▼
┌─────────────┐
│     ACT     │  Edit files, run commands, write
└──────┬──────┘
       │
       ▼
┌─────────────┐
│   VERIFY    │  Check results, run tests, read output
└──────┬──────┘
       │
       ▼
   Done? ───No──→ Back to GATHER
       │
      Yes
       │
       ▼
   Response to you

This loop can run for dozens of steps before Claude responds to you. A single prompt might trigger Claude to:

  1. Search your project for relevant files (gather)
  2. Read three files to understand the context (gather)
  3. Edit one file to make a change (act)
  4. Run a command to test the change (verify)
  5. Notice an error in the output (verify → gather)
  6. Read the error details (gather)
  7. Make a second edit to fix the issue (act)
  8. Run the test again (verify)
  9. Confirm it passes (verify)
  10. Report back to you

That is ten steps from a single prompt. A chatbot would have given you text. Claude Code gave you working results.

Why this matters

The agentic loop changes three things about how you should work with Claude Code:

Chatbot mindsetAgentic mindset
I ask questions, Claude answersI set goals, Claude works toward them
I evaluate text qualityI evaluate whether the result is correct
If the answer is wrong, I ask againIf the result is wrong, I steer Claude's loop

When you understand the loop, you stop writing messages like "Can you help me fix this bug?" and start writing messages like "Fix the login timeout bug in auth.js. The expected behavior is X. Run the test suite after fixing it."

The first message starts a conversation. The second message starts a loop with a clear success condition.

Check Your Understanding

You ask Claude Code to 'organize my downloads folder.' Claude reads the folder contents, creates subfolders, moves files, and reports back. How many 'tool calls' do you think this involved — roughly 3, 10, or 30+?

Try It Yourself

Open Claude Code and give it a simple task: 'List the 5 largest files in my current directory and tell me what they are.' Watch the tool calls that appear. How many steps does Claude take? Can you label each step as gather, act, or verify?

Explain Back

In your own words, explain the difference between a chatbot and an agentic system like Claude Code. What does the gather→act→verify loop mean for how you should write your prompts?

Reflect
  1. 1. Think about a task you recently did manually that involved multiple steps (organizing files, researching a topic, editing a document). Could you describe the goal to Claude Code and let the agentic loop handle the steps?

  2. 2. When you watched Claude Code's tool calls, did any surprise you? Did Claude take steps you would not have thought of?

  3. 3. How does knowing about the loop change what you think is 'too complex' to ask Claude Code to do?

Key Takeaway

Claude Code is an autonomous agent that runs a gather→act→verify loop, not a chatbot that generates text. A single prompt can trigger dozens of tool calls. Your job is to set clear goals and success criteria, then let the loop run.

Connect

Now that you understand what Claude Code is, the next module covers how to install it and start your first session. If you already have Claude Code installed, feel free to skim 1.2 and jump to 1.3, where you will learn to read Claude's 'body language' — the visual cues that tell you what the loop is doing.

Ready to move on? Mark this module as complete.