Skip to lesson
Exit
How Coding Agents Work (and Their Limits)1 / 2

1 min lesson

Anatomy of a coding agent

Match each case in "Anatomy of a coding agent" to the signal and response that fit it.

Step 1 of 2

A coding agent is a language model wrapped in a loop that lets it act, look at what happened and try again - the model supplies the reasoning, the harness supplies the hands.

A DX Engineer at Cursor teaches this for a living, so the bar is being able to draw the loop on a whiteboard cold and narrate every arrow. Most developers picture an agent as a model that magically edits files. The honest picture is plainer and more useful.

Three pieces compose every coding agent: the model that decides, the harness that gives it tools and context and the tools it calls to change the world.

Model

The reasoning engine. Reads the assembled context, decides the next move, emits text or a tool call.

Swappable. The same harness can drive different high-capability models.

Harness

The scaffolding that turns a chat model into an agent: indexing, retrieval, tool definitions, the loop itself and guardrails.

This is where most of Cursor's engineering lives.

Tools

The verbs: read file, edit file, run terminal, search codebase, call an MCPModel Context Protocol. A standard that lets an AI agent pull in context from outside the repo, like Jira tickets or internal docs. Press Enter for the full definition. server.

Each returns an observation the model reads on the next turn.