What Makes a Tool "Agentic"?
An agentic tool does not just respond to a single prompt — it plans, executes multi-step tasks, uses tools autonomously, and iterates based on results. The difference between a chatbot and an agent is the difference between a calculator and a robot. One answers questions; the other gets things done.
Claude Code is agentic because it does not just generate code snippets. It reads your codebase, formulates a plan, creates and edits files, runs tests, reads the output, fixes failures, and continues until the task is complete — all within a single interaction.
Chatbot vs Agent Comparison
| Capability | Chat AI (e.g., ChatGPT) | Agentic AI (e.g., Claude Code) |
|---|---|---|
| File Access | None — you paste code in | Reads and writes files directly |
| Multi-Step Tasks | One response at a time | Plans and executes 10+ steps autonomously |
| Error Handling | You report errors back manually | Detects errors, reads output, fixes automatically |
| Tool Use | Limited to built-in tools | Shell commands, file operations, MCP tools |
| Context | Only what you paste in the chat | Entire codebase, git history, environment |
| Iteration | Manual back-and-forth | Autonomous loops until the task is done |
The Plan-Execute-Iterate Loop
Every agentic interaction follows a fundamental loop:
- Plan: The agent analyzes the task, reads relevant files, and creates a step-by-step plan
- Execute: The agent performs actions — editing files, running commands, installing packages
- Observe: The agent reads the results of its actions — build output, test results, error messages
- Iterate: If something failed or needs adjustment, the agent goes back to step 1 with new information
// Conceptual model of the agentic loop
interface AgentState {
task: string;
plan: Step[];
currentStep: number;
observations: string[];
filesModified: string[];
testsPass: boolean;
}
// What happens inside Claude Code on each task:
async function agenticLoop(task: string): Promise<Result> {
// 1. PLAN: Understand the task and create a plan
const context = await readRelevantFiles(task);
const plan = await createPlan(task, context);
for (const step of plan.steps) {
// 2. EXECUTE: Perform the action
const result = await executeStep(step);
// 3. OBSERVE: Check the result
const observation = await observe(result);
// 4. ITERATE: Adjust if needed
if (observation.hasError) {
const fix = await diagnoseAndFix(observation.error);
await executeStep(fix);
}
}
// Final verification
const tests = await runTests();
if (!tests.pass) {
await fixFailingTests(tests.failures);
}
return { success: true, filesModified: plan.filesModified };
}
When to Let the Agent Run vs When to Intervene
The hardest skill in agentic development is calibrating your level of involvement. Too much intervention and you lose the speed benefit. Too little and the agent might go down the wrong path.
| Let the Agent Run When... | Intervene When... |
|---|---|
| The task is well-defined and mechanical | The task requires business context the AI does not have |
| There are tests to verify correctness | Architectural decisions with long-term consequences |
| The scope is limited (one feature, one file area) | The agent seems confused or is going in circles |
| You have described the pattern to follow | Security-critical code (auth, payments, data access) |
| The changes are easily reversible (git) | The plan involves deleting or restructuring many files |
The Breakpoint Pattern
For high-stakes tasks, use the breakpoint pattern: let the agent plan, pause to review the plan, then let it execute. This gives you the speed of agentic execution with the safety of human oversight.
# Breakpoint pattern in practice
> /plan
> I need to migrate our authentication from custom JWT implementation
to NextAuth.js. This is security-critical code. Plan every step
but do NOT execute anything yet.
# Claude produces a detailed plan:
# 1. Install next-auth and @auth/prisma-adapter
# 2. Create app/api/auth/[...nextauth]/route.ts
# 3. Update prisma schema with Account, Session, User tables
# 4. Migrate existing user data
# 5. Update all protected routes to use getServerSession
# 6. Remove old JWT middleware
# 7. Update login/signup pages
# 8. Add tests
# You review the plan carefully, then:
> Good plan. Two changes:
- For step 4, create a migration script but do NOT run it automatically.
I want to review the SQL first.
- Skip step 6 for now. Let the old middleware co-exist until we verify
everything works.
Now execute the modified plan.
Parallel Agent Execution
One of the most powerful agentic patterns is running multiple agents on different tasks simultaneously. While one agent is implementing a feature, another can be writing tests for a different module.
# Terminal 1: Feature implementation
cd ~/project
claude "Add the notification preferences page. Follow the pattern
in app/settings/profile/page.tsx for layout and form handling."
# Terminal 2: Test writing (in parallel)
cd ~/project
claude "Write comprehensive tests for app/lib/billing.ts. Cover
all exported functions, edge cases, and error scenarios."
# Terminal 3: Documentation (in parallel)
cd ~/project
claude "Update the API documentation in docs/api.md to reflect
the new endpoints added this week. Check the git log for recent
changes to app/api/"
# All three agents work simultaneously, dramatically increasing throughput
Parallel Agent Gotcha: File Conflicts
When running parallel agents, be careful about file conflicts. If two agents modify the same file simultaneously, you will get merge conflicts. The solution: give each agent a different scope. Agent A works on app/features/, Agent B works on app/lib/. They should not touch the same files. If they need to, run them sequentially instead.
Background Agents
Background agents run asynchronously — you start them and continue with other work. They notify you when done. This pattern is ideal for long-running tasks like large migrations or comprehensive test suite generation.
# Start a background agent for a long-running task
claude --background "Migrate all 47 JavaScript files in app/legacy/
to TypeScript. For each file:
1. Rename .js to .ts/.tsx
2. Add proper type annotations
3. Fix any type errors
4. Run the type checker after each file
Create a summary of all changes when done."
# Claude runs in the background. You get notified when done.
# Meanwhile, you work on other things.
# Check on background agent status
claude --status
The Trust-But-Verify Principle
The core philosophy of agentic development: trust the agent to execute, but always verify the output. This is not about distrusting AI — it is about good engineering practice. You would review a human colleague's code too.
# The verification workflow
# After Claude completes a task:
# 1. Review the diff
> Show me a summary of everything you changed, organized by file.
# 2. Check for common issues
> Are there any files where you used patterns that differ from the
rest of the codebase? Any potential security concerns?
# 3. Run tests
> Run the full test suite and show me the results.
# 4. Manual spot-check
# Open the most critical changed files in your editor
# Read the logic carefully for the business-critical parts
# AI is great at syntax but can miss domain-specific logic errors
Structuring Work for Agentic Tools
Some codebases are easier for agents to work with than others. Here is how to structure your project to maximize agentic effectiveness:
// Principles for agent-friendly codebases:
// 1. CLEAR BOUNDARIES - Each file has one responsibility
// Bad: utils.ts with 50 unrelated functions
// Good: dateUtils.ts, formatUtils.ts, validationUtils.ts
// 2. CONSISTENT PATTERNS - Same structure everywhere
// If all API routes follow the same pattern, Claude learns it once
// and applies it correctly everywhere
// 3. TYPE SAFETY - Types are documentation for the AI
// Claude uses TypeScript types to understand data shapes
// The more precise your types, the better the output
interface User {
id: string;
email: string;
role: "admin" | "editor" | "viewer"; // Discriminated unions help
createdAt: Date;
preferences: UserPreferences; // Named types over inline objects
}
// 4. TESTS AS SPECIFICATION - Tests tell the agent what correct means
// When Claude can run tests, it can verify its own changes
// Projects with good test coverage get dramatically better agentic results
// 5. DOCUMENTED CONSTRAINTS - In CLAUDE.md or inline comments
// If a function has a non-obvious constraint, document it
// "This must be called before initializeDatabase()" etc.
The Agentic Mindset
Agentic development is not just about using more powerful tools. It is a mindset shift in how you approach work. Instead of thinking "I need to write this code," you think "I need to describe what this code should do, set up the constraints, and verify the output." You become a director, not a doer. The agents do the mechanical work. You provide the vision, judgment, and quality assurance.
Summary
Agentic development patterns — the plan-execute-iterate loop, breakpoints for safety, parallel execution for throughput, background agents for long tasks, and trust-but-verify for quality — form the foundation of 10x productivity. Master these patterns and you transform from a coder into an engineering force multiplier. The remaining lessons in this course build on these patterns with specific tools and workflows.