Start here: how AI coding agents work, for technical specialists

in AI fundamentals

You have years of technical work behind you, yet posts about AI agents read like a new language, and nobody explains what an agent does with the work you ask for.

  1. Who is this page for?
  2. What you need
  3. What is an LLM?
  4. What is a token?
  5. What are vectors?
  6. What makes an LLM an agent?
  7. What are Claude Code, Codex, Copilot and the rest?
  8. How does an agent do the work you ask for?
  9. Which words will you meet on this site?
  10. How do you make one work for you?
  11. Strong and weak points
  12. Summary

Who is this page for?

It is for engineers, admins and technical managers who have shipped real systems and now feel behind on AI. You already know how to read a log, test a change and doubt a result. What you lack is the vocabulary, and a picture of what the agent does between your request and its "done". Every other post on this site assumes both.

The main question this page answers is how an agent does the work you ask for. Earlier sections give the words; the answer follows one real task step by step.

The task: this site has a /runs page, a table of my multi-agent runs and their status. On 7 November 2026 it still showed the "ai-wow.dev Phase 1: Ship" run as Running, a week after I had paused it. I asked a coding agent why. It found the cause, fixed 2 files and filed a task so the bug can't come back.

What you need

You need a terminal, a git project and a paid plan with one coding agent.

Tool Used for
Claude Code 2.1.284 the coding agent: reads files, runs commands, edits code
Claude Opus 5.5 the model inside it
git a record of every change, so any change can be undone
Python 3.13, pytest 9.1 the project and its tests

Git matters most: it lets you see and undo every change the agent makes.

What is an LLM?

An LLM (large language model) is a program that reads text and predicts what text comes next. It learned this by reading a huge amount of text once, during training. After training, its knowledge is fixed.

  • It does not remember you. Each request starts from zero; a chat seems to remember because the app resends the whole conversation.
  • It answers from patterns. Without the facts in front of it, it still writes something that sounds right, a hallucination. The fix is to give it the file, the error, the log.

What is a token?

A token is the unit an LLM reads and writes: a word, part of a word, or a sign. Prices and limits are counted in tokens.

I ran the first sentence of one of this site's commit messages through OpenAI's tokenizer (o200k_base):

25 words, 142 characters, 33 tokens
'Routes' ' declare' ' GET' ' only' ',' ' so' ' HEAD' ' returned' ' ' '405' ...
' C' 'addy' ' forwards' ... ' Link' ' check' 'ers' ' and' ' curl' ' -' 'I' ...

Common words are one token each; "Caddy" and "checkers" split in two. Claude uses its own tokenizer, so its count differs a little.

The limit that matters is the context window: the most tokens the model can see in one request. Anthropic lists "up to 1M tokens, depending on the model". Everything counts against it: the instructions, the whole conversation, every file the agent read, and the answer.

What are vectors?

A vector, here, is a list of numbers standing for a text's meaning, made by an embedding model. Similar meanings sit close together.

This is search by meaning. In RAG over your own agent notes, each chunk of my notes became 384 numbers; a question becomes 384 numbers too, and the closest chunks go to the model as facts. That pattern is RAG (retrieval-augmented generation).

What makes an LLM an agent?

An agent is an LLM in a loop, with tools. Its text can be a tool call, such as "read app/main.py" or "run pytest", which the program around it carries out.

youtype the task1 harnesse.g. Claude Code2 hooksallow or block4 LLMpicks a tool call3 toolsread, edit, run5 your repofiles, tests, git result
Figure 1. The parts of a coding agent and the loop between them.

The numbers match this list. The dashed arrow is the result going back to the LLM.

  1. You type the task to the harness.
  2. The harness sends the LLM your task, its standing instructions and the tool list.
  3. The LLM answers with a tool call.
  4. Hooks check the call and allow or block it.
  5. An allowed call runs as a tool on your repo. The result goes back to the LLM, and the loop repeats from step 3.

The program around the model is the harness: it decides which tools exist, what the model sees and what it may not do.

What are Claude Code, Codex, Copilot and the rest?

They are coding agents: a harness built for software work, around an LLM. Anthropic calls Claude Code "an agentic coding tool". "Coding agent" is the plain name for the whole group.

Tool Made by Where you use it Models
Claude Code Anthropic terminal, desktop app, editor plug-ins Claude
Codex OpenAI terminal, cloud, editor plug-ins GPT
Gemini CLI Google terminal Gemini
Cursor Anysphere its own code editor, with an agent mode several makers' models
GitHub Copilot GitHub (Microsoft) plug-in for VS Code, Visual Studio, JetBrains IDEs, Eclipse and Xcode, with an agent mode several makers' models
Antigravity Google its own app, built around agents, and a terminal tool Gemini, plus some Claude and GPT models
Muse Code Meta terminal (macOS, Linux) Muse Spark

All run the loop in the figure above; they differ in tools, safety rules and how often they ask before acting. Learning one well matters more than picking the best. This site uses Claude Code; I have used Copilot only in VS Code.

How does an agent do the work you ask for?

It does not do the work in one go. It takes one small step, looks at the result, and picks the next step, many times over, until it judges the task done. Three facts make that work.

  • The model never touches your files. It only writes text. When that text is a tool call, the harness runs it and pastes the output back into the context.
  • Each step is chosen from everything seen so far: your request, CLAUDE.md, every file read, every test output. Picking the next action is the same "predict what comes next" an LLM always does; here the next thing it writes is a tool call.
  • It stops when it writes a plain answer instead of a tool call. That answer is the report you read.

One round, simplified:

Model:    grep run_status import_runs.py
Hooks:    allowed
Harness:  runs it, adds the output
Model:    picks the next step, or "done"

Here is the /runs fix, round by round.

You Harness Model asks: why does /runs say Running?the run was paused report2 files fixed, 1 task filed build contextCLAUDE.md, tool list run toolread, edit, test, git hooks checkallow or block pick next stepfrom all it sees ✕ tool call? yes result no, plain text: done 1 2 3 4 5 6
Figure 2. The agent loop that fixed the stale Running status.

The numbers match this list.

  1. I asked why /runs showed a paused run as Running.
  2. The harness built the context: my request, the project's instruction file CLAUDE.md, and the tool list.
  3. The model picked the next step, as a tool call.
  4. Hooks checked each call before it ran. A hook is a script the harness runs at a fixed moment; I run 43 of them.
  5. The tool ran, and its result went back to the model, which picked again. Over many rounds of steps 3 to 5 the agent:
    • read the script that builds the table, and found it takes each run's status from that run's tracker file (tracker.json);
    • found that my pause on 31 October had only updated the list of plans (INDEX.md), so the tracker still said running;
    • set the tracker to paused and rebuilt the table's data file;
    • filed a task against the pause step itself, so the next pause updates both files;
    • committed the change.
  6. With nothing left to do, the model answered in plain text: a short report.

My part was the request. Every step after it is in git and the session log; never skip reading the diff. A second session then found two more runs stuck on Running and fixed them the same way.

Which words will you meet on this site?

Other posts use these words unexplained. Each links to its short definition in the glossary, which also covers the words this site made up.

System prompt · Context · Context window · Context engineering · Tool · MCP · Harness · Guardrail · Hook · CLAUDE.md · Skill · Subagent · Worktree · Hallucination · Eval

How do you make one work for you?

Give it a small, checkable task in a repo you can undo.

  1. Start in git, on a clean tree. Then git diff shows exactly what the agent did, and git restore . undoes it.
  2. Write a CLAUDE.md (Codex reads AGENTS.md, Gemini CLI reads GEMINI.md). Ten lines are enough: how to run the tests, what not to touch, how you like commits.
  3. Ask for something with a yes-or-no check. "/runs shows a paused run as Running" can be checked. "Make the site better" cannot.
  4. Ask for the test first. A test that fails before the fix and passes after is proof.
  5. Read the diff before you keep it, like a pull request from a fast new colleague who sometimes makes things up.
  6. Keep the approval prompts on at first: the agent asks before each command until you trust the pattern.

Your experience is the advantage: you already know what a good test, a clean diff and a risky command look like.

Strong and weak points

  • Strong: the running example is a real fix on this site, with its commits and follow-up task on record.
  • Weak: that fix changed data, not code, so it had no test.
  • Weak: one example from one tool. I have not run this task in Codex, Gemini CLI, Cursor, Copilot, Antigravity or Muse Code.
  • Weak: the token count used OpenAI's tokenizer; Claude's was not measured.

Summary

  • An LLM predicts text; it sees only its context, measured in tokens.
  • An agent is an LLM in a loop with tools; the harness around it decides what it can see and do.
  • Claude Code, Codex, Gemini CLI, Cursor, Copilot, Antigravity and Muse Code are all coding agents; learn one well before comparing.
  • Hooks and other guardrails keep the agent inside the lines you set.
  • Start safely: small tasks with a test, in git, and read the diff.
  1. Ask one coding agent to explain a repo you know well; compare its answer with yours.
  2. Give it one small bug, ask for the cause first, and read every line of the diff.
  3. Then read How one feature goes from idea to shipped with a team of agents to see the same loop at a larger scale.