AI Agents

Agents are systems with failure modes, not assistants with personalities.

1guide Feed

An agent is a loop: choose a tool, run it, read the output, choose again. That loop is the whole design surface, and everything that goes wrong in production traces back to it.

The loop needs three things a chat interface does not. A boundary on what tools exist and what they may touch. A stopping condition, so a task that cannot succeed fails visibly rather than consuming budget. And an observable trail, so you can reconstruct what happened after something surprising.

Reach for an agent when the work has a mechanical verification step — tests that pass or fail, a schema that validates, an API that returns a status code. The verification is what closes the loop; without it, the agent cannot tell progress from motion, and neither can you.

Avoid agents when the task is one API call. A single well-specified request is cheaper, faster and easier to debug than a loop that arrives at the same place. The overhead of agent scaffolding is only worth paying when the number of steps is genuinely unknown in advance.

What goes wrong most often: permission scopes set too wide because narrow ones caused approval fatigue; retry logic that hides a systematic failure behind three attempts; and evaluation done by reading transcripts rather than measuring outcomes. The first two are configuration. The third is a habit, and it is the one that lets a degraded agent run for weeks unnoticed.

Coverage here is deliberately practical — the loops, the guardrails and the review discipline — rather than a survey of frameworks.

Start here

An AI Coding Agent Workflow That Keeps Diffs Reviewable

A working loop for running a coding agent on a real codebase — task scoping, branch isolation, tests as the contract, and the review discipline that stops unreviewed code reaching main.

Intermediate · 5 min read

Beginner to advanced

A reading order that builds Agents knowledge in the sequence it is actually needed.

  1. Start How to Use Claude Code on an Existing TypeScript Project 5 min
  2. Build An AI Coding Agent Workflow That Keeps Diffs Reviewable 5 min

Common problems

Failure modes that come up repeatedly with Agents, and where each one is solved.

The agent loops on the same failed fix
Two attempts is the signal to stop. The third will not differ. Read the code yourself, find the missing fact, and restart with it in the prompt.
An agent runs a command it should not have
Permission rules were too broad or absent. Deny network commands, writes outside the working directory and anything that pushes to a remote.
Parallel agent sessions corrupt each other's work
They shared a git checkout. Give each session its own worktree so the index and working directory are independent.

Latest Agents guides

Browse the archive
  • intermediate

    An AI Coding Agent Workflow That Keeps Diffs Reviewable

    A working loop for running a coding agent on a real codebase — task scoping, branch isolation, tests as the contract, and the review discipline that stops unreviewed code reaching main.

    5 min

Frequently asked questions

What separates an agent from a chat interface?

Tool use in a loop. An agent decides which action to take, executes it, reads the result and decides again. That loop is what makes permission boundaries and stopping conditions matter.

How do you evaluate an agent workflow?

With outcome metrics from the system it touches, not with vibes. For coding agents, diff size per merged commit and revert rate within a week are two numbers you already have in git.

Sources

  1. Claude Code subagents Anthropic Primary source
  2. Model Context Protocol specification Model Context Protocol Primary source