Lesson 1 of 5 · Coding Agents and CLIs

The landscape

Claude Code, Codex, Cursor, and Grok Build are built from the same six parts. They differ in where you sit, what stops them, and what you already pay for. A map of all four, as of September 2026.

If you have never used a coding agent, start with Agents lesson 3, Claude Code and Codex. It covers what one is for a person who does not write code, what it costs, and the one real risk. This lesson assumes that and zooms out. Four of these tools are worth your time right now. Once you see the shape they share, every new agent in your feed next month will look familiar.

What all four share

Take any of the four apart and you find the same six pieces.

  • A model. The trained network that reads your words and predicts the next ones. Claude Code runs Anthropic's Claude models. Codex runs OpenAI's. Cursor lets you pick the model. Grok Build's primary model, as of September 2026, is grok-4.6.
  • A harness. The program wrapped around the model that runs the loop: read, plan, edit, run, report. Two live lessons teach this idea and this one will not repeat them: model differences and harnesses and harnesses revisited.
  • A tool set. The named actions the agent can take: read a file, edit a file, run a command, search the web. Every one of the four extends the set with MCP servers, the Model Context Protocol, a standard way to hand an agent a tool it did not ship with.
  • A rules file. A plain Markdown file the agent reads at the start of every session so you do not repeat yourself. Three of the four read AGENTS.md with no setup. The table below has the details.
  • A permission system. The layer that decides when the agent stops and asks you. Each tool has its own words for this, and the words are where new users get lost.
  • A sandbox or a classifier, usually both. A sandbox is an operating-system fence around the commands the agent runs, so a bad command cannot reach outside the folder. A classifier is a second model that reviews each action and approves the safe ones so you are not asked about every file write. All four have at least one of these as of September 2026.

Learn the six parts once and each lesson only has to tell you where a given tool puts them and what it calls them.

The same job in four tools

Tap a tool, then step through its session. The Claude Code tab is a real capture from Claude Code lesson 1: one prompt for a one-page site for a made-up side-by-side rental shop in Hurricane, then a follow-up. The other three are typed examples of a different small job, adding a contact form to an existing page, written to show the shape of each tool's session. Watch for three things: when the rules file gets read, when the tool stops to ask, and where the edit shows up.

Claude Code: one small job, four tools

  1. 1. You typed

    Build a one-page website for Zion Ridge UTV Rentals, a fictional side-by-side rental company in Hurricane, Utah. Single index.html with inline CSS, no frameworks. Include a hero with a headline, three rental options with day rates, hours, and a contact section with a phone number. Keep it under 150 lines. When done, list the files you created.

    One prompt with the goal, the constraints, and the finish line. Same four ingredients as everyday prompting.

1 of 17

Real Claude Code session, captured 2026-09-17 and trimmed for length. Prompts and tool calls are verbatim.

What did not change: every session starts with a plain sentence, reads before it edits, checks its own work with a command, and reports back. What did: Codex named the rules it loaded before touching anything. Cursor put the edit in the editor and asked you to read the diff. Grok Build wrote a plan and waited for approval. Claude Code, in the mode it was captured in, wrote the file straight away and told you afterward. None of those are bugs. They are the permission layer wearing four different outfits.

Where they differ

Terminal versus editor. Claude Code, Codex, and Grok Build are terminal programs first. You type claude, codex, or grok in a folder and talk there. Claude Code and Codex also ship editor extensions, and the Codex one installs into VS Code, Cursor, and Windsurf. Cursor is the reverse: a full editor that grew an agent, plus a terminal agent named agent. Grok Build documents the Agent Client Protocol, a standard for hosting an agent inside another program, but as of the verification date no page names an editor that hosts it.

The sandbox model. Codex starts every command inside an operating-system sandbox by default, with network access off, and layers approval prompts on top. Claude Code starts from permission modes and adds an OS sandbox you turn on with /sandbox. Cursor's default run mode, Auto-review, runs commands in a sandbox when it can and sends the rest through a safety review. Grok Build documents its modes, including an auto mode with a classifier, but its settings page shows no permission or sandbox rules in detail.

Cloud tasks. A cloud task is one you hand off to run on the vendor's machines while your laptop does something else. Codex is built around this: several tasks in parallel at chatgpt.com/codex, each ending in a diff and a pull request. Claude Code has the same idea at claude.ai/code and in the desktop app's Cloud environment. Cursor's Cloud Agents need a paid plan and bill at API pricing. The pages checked for lesson 4 describe no cloud surface for Grok Build.

The subscription bundle. None of the four is a separate purchase if you already pay the right vendor. Claude Code comes with Claude Pro, Max, Team, and Enterprise, and the free plan does not include it. Codex is listed on every ChatGPT tier from Free up. Cursor is its own subscription; its docs list Pro, Pro Plus, and Ultra for individuals. Grok Build comes with SuperGrok or X Premium Plus. The dollar figures move too often to print, so each lesson links its vendor's pricing page instead of quoting it.

Maturity. Claude Code and Codex publish numbered releases with changelogs. The sessions in this module were checked against Claude Code 2.1.274 and Codex CLI 0.153.0. Cursor's docs pages show no version or date. Grok Build is four months old, still labeled early beta on its own announcement page, and its repository has no tagged release, so there is no number to quote.

The four, one paragraph each

Claude Code is Anthropic's terminal agent and the tool this site's owner runs all day. It reads CLAUDE.md, has six permission modes from Manual through Bypass, and has the deepest configuration story of the four: skills, plugins, hooks, subagents, and settings files that stack. It gets its own nine-lesson module, starting at the Claude Code module page.

Codex is OpenAI's agent in three places: CLI, editor extension, and cloud. Its distinctive trait is the operating-system sandbox on by default, which makes it safer than Claude Code with the defaults left alone, and the one that interrupts more. If you pay for ChatGPT you already have it. Lesson 2 covers approvals, the sandbox, and its config file.

Cursor is the editor-first option: Tab completion, Inline Edit, and the Agent pane, at three distances from your cursor. Its strength is the diff review that happens in place, on the lines you are looking at, before anything is final. Lesson 3 covers the editor layout, rules, and when an editor beats a terminal.

Grok Build is xAI's terminal agent, in early beta since May 2026 and open source since July. It leads with git worktrees, a second checkout of the same repository so two agents can work at once, and it reads Claude Code's and Cursor's rules files as well as its own. Lesson 4 covers what ships, who already has it, and how to judge a brand new agent.

The rules file each one reads

Every tool layers global rules over the project's, and the file closest to your work wins where two disagree. What differs is the file name and the extras. All of this is as of September 2026 and comes from the four tool lessons.

ToolReads
Claude Code~/.claude/CLAUDE.md, project CLAUDE.md or .claude/CLAUDE.md, CLAUDE.local.md, .claude/rules/*.md. Picks up AGENTS.md through an @AGENTS.md line in CLAUDE.md or a symlink.
Codex~/.codex/AGENTS.md (or AGENTS.override.md), then AGENTS.md from the git root down to the launch folder.
CursorAGENTS.md at the root and nested, .cursor/rules/*.mdc, plus User rules in settings and Team rules from an admin.
Grok BuildAGENTS.md, AGENT.md, CLAUDE.md, CLAUDE.local.md, and any .md in .grok/rules/, .claude/rules/, or .cursor/rules/. Global rules in ~/.grok/ load first.

The practical upshot: one AGENTS.md at the repository root, plus a one-line CLAUDE.md that imports it, is read by all four. Claude Code lesson 4 sets that up.

The permission words each one uses

Same job, four vocabularies. When a tutorial says "turn on full access," this table tells you which knob it means.

ToolVocabulary
Claude CodeSix modes: Manual, Accept edits, Plan, Auto, Don't ask, Bypass. Shift+Tab cycles. Underneath, allow, ask, and deny rules in settings files, and an opt-in /sandbox.
CodexTwo controls. Sandbox mode: read-only, workspace-write (default), danger-full-access. Approval policy: on-request or never. The /permissions presets set both: Ask for approval, Approve for me, Full access, Custom.
CursorRun modes for commands: Auto-review (default), Allowlist, Run Everything. Separately, Agent pane modes for what it does: Agent, Plan, Ask, and others. Checkpoints before big changes.
Grok BuildThree modes: plan, auto, always-approve. Shift+Tab cycles. grok inspect lists what it loaded. Fine-grained rules are thinly documented.

Why the names change monthly

This module is the most perishable thing on this site, on purpose. Four vendors ship often, and each one renames things as it goes. A few examples from the checks done for this module, all in 2026. Codex retired two approval policy names, untrusted and on-failure, so any blog post using them is stale. Codex now documents skills under ~/.agents/skills, and a machine set up earlier this year may still show ~/.codex/skills. In July OpenAI folded the separate Codex desktop app into the ChatGPT app. xAI now uses the name Grok Build for three different things, a terminal agent, a model, and a feature in the chat app, and the company itself prints its name as SpaceXAI on its own site.

So every lesson in this module carries a verification date, and the product facts are stated "as of September 2026." When a date is more than a couple of months old, check before you act. Checking is a two-minute job against the official docs, and those are the only sources you need:

The habit: search the vendor's docs for the exact word in the claim, a mode name, a file path, a plan tier. If the word is not there, the claim has aged out. A third-party article, a video, or a chat model's memory does not count, and that includes this page.

Try this yourself

Pick one small task and run it in two tools you already have. If you pay for ChatGPT you have Codex. Claude Pro, Claude Code. X Premium Plus, Grok Build. Two is enough. Use a copy of a folder, not the original, and give both tools the same prompt word for word.

Add a short FAQ section with three questions to index.html, above the contact section. Match the existing styles. Do not add any JavaScript or external files. Before you edit anything, tell me which rules files you loaded for this folder. When you are done, list every file you changed.

Then compare, on paper, four things:

  1. Rules. Which files did each one say it loaded? If one found AGENTS.md and the other did not, you just learned the first row of the rules table from your own screen.
  2. Questions. How many times did each one stop to ask, and about what? A file edit, a command, a network call? That is the fence.
  3. The prompt it needed. Did either one need a second prompt to get the whole job done? Write down what you had to add.
  4. The review. Where did you read the change: in the terminal summary, in a diff, in the editor? Which one did you actually read all the way through?

Keep the notes. Lesson 5 turns exactly these four questions into a decision table, and your own answers beat anyone else's review.

Next lesson2. Codex

Last updated September 17, 2026