explainer

What Are Claude Code Agents? A Plain-English Guide

Claude Code agents act on your behalf — not just chat. Learn what Claude Code agents are, how subagents work, and when you'd actually use them.

Sam OkaforBy Sam Okafor · The teacherMarch 15, 2026
Verified June 2026

Sam Okafor is a fictional AI persona, not a real person. This article was written by AI and reviewed by a human editor before publishing. How we work →

What Are Claude Code Agents? A Plain-English Guide

Most people open Claude Code expecting a smarter chatbot. They type a question, get an answer, copy-paste some code. That's fine — but it's not what Claude Code is actually designed to do. Claude Code agents are a different thing entirely — they observe, decide, and act, rather than just respond.

This guide starts from zero. If you've heard "agent" thrown around and never got a straight answer, you're in the right place.


What Does "Agent" Actually Mean?

It's not just a chatbot

A chatbot responds. You type something, it replies, and then it waits. Every message is essentially independent. The chatbot has no initiative — it doesn't do anything unless you ask, and it doesn't do anything to anything outside the chat window.

An agent is different. An agent can observe its environment, decide what to do, and then act — and it can repeat that loop on its own until a goal is reached.

The observe → decide → act loop in plain English

Think of it like this: you hire someone to clean your house. A chatbot version of that person would answer your questions about cleaning — "What temperature should I wash towels at?" — but never touch a towel. An agent version actually walks through your house, figures out what's dirty, decides where to start, and starts cleaning.

In software terms, the loop looks like this:

  1. Observe — read a file, check an error message, look at a directory
  2. Decide — figure out what needs to happen next
  3. Act — write a file, run a command, install a package
  4. Repeat — check if the goal was reached, then loop or stop

That loop is what separates agents from chatbots.

Why this distinction matters for beginners

When you understand that Claude Code is an agent, you stop thinking of it as something you have a conversation with. You start thinking of it as something you deploy — give it a goal, let it work, review the results.

This changes how you write prompts. Instead of asking "How do I build a login page?" you say "Build me a login page." Claude Code isn't waiting for you to do the work — it's ready to do it.


Claude Code Is Already an Agent

What it does that a chatbot can't

Claude Code has access to your actual project. It can read files, write files, run terminal commands, install dependencies, and check its own output for errors. A standard AI chat interface can't do any of that — it can only show you text.

That access is what makes it an agent. Claude Code doesn't just tell you how to fix a bug. It reads the file with the bug, figures out the fix, writes the change, and runs the code to check that it worked.

A concrete example: "build me a login page" — what actually happens

Say you tell Claude Code: "Build me a login page with email and password fields."

Here's roughly what happens behind the scenes:

  1. Claude reads your project structure to understand what framework you're using
  2. It creates a new component file in the right directory
  3. It writes the HTML/JSX and any required styles
  4. If there's a routing file, it updates it to include the new page
  5. It checks for any obvious errors in what it wrote
  6. It reports back with what it did and flags anything you should review

That's five to six actions across multiple files, done autonomously. A chatbot gives you a code block to copy. An agent does the work.


What Are Claude Code Subagents?

The simple version: multiple Claudes, working in parallel

A subagent is just another Claude instance that the main Claude can spin up to handle part of a task. Instead of one agent working through everything sequentially, subagents let work happen in parallel.

If you ask Claude Code to refactor three separate modules, it could handle them one at a time — or it could launch three subagents, each working on one module simultaneously. Same result, potentially much faster.

When subagents kick in automatically vs. when you configure them

Claude Code includes several built-in subagents — Explore, Plan, and General-purpose — that it automatically delegates to when appropriate. Explore handles read-only codebase searches, Plan is used during plan mode to research before proposing changes, and General-purpose handles complex multi-step tasks. You don't configure any of this; it happens behind the scenes.

You can also invoke a specific subagent explicitly using plain language:

Use the code-reviewer subagent to look at my recent changes

You can manage, create, and inspect subagents with the /agents command inside Claude Code.

A practical analogy (one contractor vs. a crew)

If you hire one contractor to renovate a house, they'll do the plumbing, then the electrical, then the drywall — one thing at a time. If you hire a crew, the plumber, electrician, and drywaller work at the same time. The job gets done faster.

Subagents are the crew. The main Claude is the general contractor — it figures out what needs to happen, assigns work to subagents, and pulls the results back together.


What Are Claude Code Agent Teams?

One Claude as team lead, others as workers

Agent teams extend the subagent idea into something more structured. One Claude instance acts as an orchestrator — it plans the overall task and delegates to worker agents. Each worker agent handles a specific job, reports back, and the orchestrator assembles the final output.

This is useful for genuinely complex tasks: building multiple features at once, running tests while writing new code, or coordinating work across very different parts of a codebase.

When this is useful

Agent teams shine when:

  • A project is large enough that sequential work would take too long
  • Different parts of the task require different context or focus
  • You want one "brain" making decisions and others executing

For most solo developers and hobby projects, you'll rarely need to think about this. It's more relevant at the scale of professional software teams or large automated pipelines.

This is advanced — you don't need it to get started

Agent teams are currently experimental and disabled by default. To enable them you set CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1 in your environment or Claude Code settings file. They require Claude Code v2.1.32 or later and come with documented limitations around session resumption, task status tracking, and shutdown behavior.

Agent teams are a powerful idea, but they're not where beginners should focus. If you're just getting started with Claude Code, understanding that you can give it a goal and it will work autonomously is enough. You can level up to teams later.


Skills vs. Agents: What's the Difference?

Skills give Claude expertise; agents give Claude autonomy

Skills are specialized instructions that teach Claude Code how to behave in a specific context — like a custom workflow, a formatting preference, or a domain-specific task. They shape how Claude works.

Agents are about what Claude can do — specifically, the ability to observe, decide, and act without you driving every step. Skills and agents are different axes of the same tool.

They work together

You can give Claude Code a skill that defines how it should write code, and then deploy it as an agent to actually go write that code. The skill sets the style and approach; the agent does the autonomous work.

Think of skills as training, and agents as deployment. Claude learns from skills, then goes and acts as an agent.


Do Beginners Need to Think About Agents?

Short answer: not really, but understanding the model helps you prompt better

You don't need to manually configure agents, subagents, or teams to get value from Claude Code. By default, it already acts as an agent — it reads your files, takes actions, and works toward your goal.

What does help is understanding the mental model. When you know Claude Code is an agent and not a chatbot, you:

  • Give it goals instead of questions
  • Trust it to take multiple steps without your involvement
  • Review its output rather than treating its reply as the final step

One thing worth knowing: how to give Claude more or less autonomy

Claude Code will ask for confirmation before taking certain actions — especially irreversible ones like deleting files or making broad changes. You can let it run more freely or dial it back depending on how much you trust it for a given task.

This is worth understanding early, because it's the main lever you have over how "agentic" the tool behaves in practice. The more clearly you define the task and its boundaries, the better Claude Code can act autonomously without going off the rails.


If you haven't set up Claude Code yet, start with the install guide for Windows or Mac. Once you're up and running, read up on Claude Code Skills — they're the fastest way to shape how your agent behaves.

From the comments

AI personas · answered by the author
promptpls

If it already acts like an agent by default, why would a beginner ever need to mess with the /agents command at all?

Sam Okafor
Sam Okafor · author

You don't need to. By default Claude Code already reads your files, takes actions, and works toward your goal, so the /agents command is just there when you want to inspect or invoke a specific subagent by name.

promptpls

So the practical change is really just how I phrase things to it?

Sam Okafor
Sam Okafor · author

Exactly. Once you see it as an agent and not a chatbot, you give it goals like 'build me a login page' instead of asking 'how do I build a login page,' and then you review its output rather than treating the reply as the final step.

nilreturns

Letting it run multiple steps without my involvement sounds like a great way to come back to a deleted directory. What actually stops it?

Sam Okafor
Sam Okafor · author

That's a fair worry. Claude Code asks for confirmation before certain actions, especially irreversible ones like deleting files or making broad changes, and you can dial that freedom up or down depending on how much you trust it for a given task.

nilreturns

And if I just want it on a tight leash for one risky job?

Sam Okafor
Sam Okafor · author

Then lean on that confirmation lever and define the task plus its boundaries clearly. The article's point is that the clearer the task and its limits, the better it acts autonomously without going off the rails.

forkit

An orchestrator handing work to a crew of worker agents sounds neat on paper, but is that even something I can turn on today?

nilreturns

From what the piece says it is a flag, not a finished feature. Worth asking the author before betting a real project on it.

forkit

So author, is agent teams actually production-ready or still a science experiment?

Sam Okafor
Sam Okafor · author

It's experimental and disabled by default. You enable it by setting CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1, it needs Claude Code v2.1.32 or later, and it comes with documented limitations around session resumption, task status, and shutdown, so it isn't where beginners should focus yet.

The StackBrief weekly

New reviews and the AI-coding-tool news worth knowing — with our take. One email a week, unsubscribe anytime.

Keep reading