What is agentic coding? Claude Code, Codex, Cursor, Grok
By Flavio
Agentic coding means directing an agent that reads your repo, edits files and runs commands. How that loop works in Claude Code, Codex, Cursor and Grok Build.
Agentic coding means you describe a change, and a coding agent carries it out: it reads the repo, edits files, runs commands, looks at the result, and continues until the task is done or you stop it. A chat reply you paste in yourself is the other end of that range.
How agentic coding works
The model proposes the next step. The tool around it, often called the harness, is what can actually touch the repo. It applies the edit or runs the command, sends the output back, and the model decides again. That cycle is the agentic loop.
You can interrupt it. Plan mode pauses the loop before the edits. A permission mode decides which tool calls run without asking. A subagent is the same loop in a side context, reporting back to the session you’re in.
The same model inside two tools can see different files, ask permission differently, and stop at different points. When a result is wrong, look at that loop before you swap the model name.
Agentic coding in each tool
| Claude Code | Codex | Cursor | Grok Build | |
|---|---|---|---|---|
| What the docs call it | Agentic coding, and an agentic loop | A coding agent that reads the repo, edits and runs commands | Agentic coding | A coding agent |
| Where you drive it | Terminal, IDE, desktop app, browser | CLI, IDE extension, ChatGPT app, cloud | Agent chat in the editor, the CLI, cloud agents | The TUI, headless, or ACP |
| Look before it edits | Plan mode | /plan | Plan mode, including when a prompt sounds large | /plan |
| Hand off a long run | A cloud session | Codex Cloud | Cloud Agents | Not a cloud VM. Grok Bot is the separate product |
Claude Code
Claude Code’s glossary defines agentic coding as a workflow where the AI reads files, runs commands and makes changes while you watch, redirect or step away. It contrasts that with a chat assistant that only returns text you apply yourself. Claude Code is agentic because it has tools.
The agentic loop is gather context, take action, verify, and repeat. You can interrupt it. Hooks, skills and MCP attach to phases of that loop. The harness is the name the docs use for the tools, context management and execution environment around the model. Claude Code is the harness. Claude is the model inside it.
See How Claude Code works and the glossary entry.
OpenAI Codex
Codex’s docs describe a coding agent you drive from the CLI, the IDE extension, the ChatGPT app and Codex Cloud. It reads AGENTS.md before doing work, edits the repo, and runs commands under a sandbox and an approval policy. /plan asks for a plan before implementation. codex exec runs the same agent from a script.
The pages checked for this entry don’t define a separate “agentic coding” mode. The product is the agent. You change how far it goes with permissions, plan mode and whether you are in an interactive session or codex exec.
See custom instructions and non-interactive mode.
Cursor
Cursor’s help page defines agentic coding as building software by directing AI agents instead of writing every line yourself. You give a goal. The agent plans, edits, runs commands and verifies, while you guide and review.
You start in Agent mode with a plain-language task. For a larger change, Plan mode is the review point before it writes. Cloud Agents are the handoff when the task should keep going without your laptop. The same page describes an older step, Tab autocomplete, as one suggestion at a time, and agent mode as the step after that.
Grok Build
Grok Build’s overview calls it a coding agent. You run it as an interactive TUI, headlessly with grok -p, or over ACP in another app. It reads project rules, calls tools, and uses plan mode when you want a written plan before edits.
A cloud computer that keeps working with the laptop closed is Grok Bot, documented as a separate product. Grok Build’s own pages describe the agent on the machine where you launched it.
See the Grok Build overview.
Details checked against each vendor’s documentation in October 2026.
A real example
This prompt is a whole loop, not a request for a snippet. It names the file, the check, and the stop condition:
The reading time under each post title is wrong when a post contains a fenced code block. Code should not count as words.
Find the function that computes it, add a failing test that uses a post with one 40-word paragraph and one 20-line code fence, then change the function until that test passes. Don't change the RSS feed.
You send that in Claude Code, Codex, Cursor Agent or Grok Build. The agent should read the function, run the test, edit, and run the test again. If it starts editing before it has found the function, stop it and tell it to read first, or switch to plan mode and approve the file list before the edit.
The test is the part that makes the loop finish. Without a check, “done” is whatever the last message says.
When to use agentic coding
Use it when the change has a check you can run: a test, a build, a page you can open. The agent can see a failure and take another step.
Write the code yourself when you are still deciding what the program should do, or when the change is one line you can already see. A chat answer is enough when you want an explanation and you will apply it. Plan mode sits in between, for a change with more than one reasonable shape.
Pitfalls
Two tools can call the same model and still differ on permissions, instruction files and how much of the repo they read. If the edit is wrong, look at what the agent was allowed to run and what it read before you swap models.
The loop will keep going past the task if the prompt has no boundary. “Don’t change the RSS feed” and “stop when this test passes” are the lines that keep a small fix small.
A long run is still your review. Cloud agents let the loop continue with the laptop closed, and they do it on a machine that does not have your local config. Stepping away is fine when the check is real. Stepping away with no test means the diff is the first time you see the result.
Cursor’s help page describes a further step, agents running for hours with less direction. That is their picture of where the tools are going. It is not a reason to leave a vague task running overnight.
Related on flaviocopes.com
- The big players in AI coding separates the model, the agent software around it, and the interface you type into.
- What I learned in the past 6 months about using agentic AI is a first-person recap of using this loop on real projects.
- Coding without the editor is the same work from the terminal, when the editor is no longer where the agent runs.
- Work Tracebook turns the one-line reports coding agents leave into a daily timeline, so a day of this work is reviewable after the sessions are closed.
Related glossary entries
- Plan mode: Plan mode makes a coding agent research and propose a plan before it edits code. How it works in Claude Code, Codex, Cursor and Grok Build, and when to use it.
- Subagents: A subagent is a helper your coding agent starts with its own context window. How subagents work in Claude Code, Codex, Cursor and Grok Build.
- Permission modes: Permission modes decide what a coding agent can do without asking. The modes in Claude Code, Codex, Cursor and Grok Build, and what YOLO mode really skips.
- Cloud agents: Cloud agents run a coding task on a remote machine instead of your laptop. How Claude Code, Codex, Cursor and Grok Bot start one, and what they cannot see.
Want me to talk about your product? You can sponsor this site.