What is an AI coding agent?

A program that takes a coding task and executes it autonomously — reading files, writing code, running tests — without you directing every step.

An AI coding agent is a software program that writes, edits, and runs code autonomously on your behalf. You give it a task — fix this bug, implement this feature, write tests for this module — and it works through that task independently, making decisions and taking actions without you directing every step.

TL;DR

  • An AI coding agent takes a task and executes it autonomously — reading files, writing code, running tests
  • It works for minutes or hours without needing continuous input from you
  • It can pause and ask for approval before taking sensitive actions like overwriting files
  • Claude Code, Cursor, and Devin are the primary AI coding agents in use today
  • Grass lets you monitor and control AI coding agents from your phone

What makes something an AI coding agent?

An AI coding agent is distinct from a coding assistant. A coding assistant — like GitHub Copilot in its basic form — responds to your prompts and suggests code for you to accept or reject. You remain in control of every action.

An AI coding agent operates differently. You give it a goal, and it pursues that goal autonomously. It reads your codebase, decides what changes to make, writes the code, runs the tests, interprets the results, and iterates — all without you directing each step. A single task might involve dozens of file reads, multiple code edits, several test runs, and a few decision points, all executed by the agent over 20–40 minutes of continuous work.

The three most widely used AI coding agents today are:

  • Claude Code — Anthropic's terminal-based agentic coding tool, designed for long autonomous tasks in existing codebases
  • Cursor — an AI code editor with an agent mode that can plan and execute multi-step coding tasks
  • Devin — an autonomous AI software engineer that handles full development tasks end-to-end

How does an AI coding agent work?

A typical AI coding agent session works like this:

  1. You give the agent a task in plain language: "refactor the authentication module to use JWT tokens"
  2. The agent reads the relevant files in your codebase to understand the current implementation
  3. It plans the changes needed and begins executing them — editing files, creating new ones, deleting obsolete code
  4. It runs your test suite to check its work and iterates if tests fail
  5. At certain points — before overwriting a critical file, for example — it may pause and request your approval before continuing
  6. When the task is complete, it presents a summary of what it changed and why

The key characteristic is autonomy. The agent makes real decisions — which files to touch, how to structure the code, when to run tests — based on its understanding of your codebase and the goal you gave it. You're not reviewing every line before it's written; you're reviewing the outcome.

According to Anthropic's research on agent autonomy, the 99.9th percentile Claude Code turn duration exceeded 45 minutes as of early 2026 — and that's a single turn, not a full multi-turn session.

Why do AI coding agents require a different workflow?

Because AI coding agents work autonomously over extended periods, they create a supervision problem that coding assistants don't. With an assistant, you're always present — you see every suggestion before it's applied. With an agent, the work happens in the background. The agent might be halfway through a complex refactor before you check in.

This creates two practical needs:

Monitoring. You need visibility into what the agent is doing, even when you're not at your desk. Is it making progress? Has it gone in the wrong direction? Is it stuck waiting for input?

Intervention. When the agent hits a decision point — a file it needs permission to overwrite, a direction it's unsure about — you need to be reachable to unblock it quickly. An agent waiting at an agent approval gate is an agent not working.

This is the workflow problem that mobile coding agent access directly solves.

How does Grass work with AI coding agents?

Grass connects to AI coding agents running on your laptop or a transient dev server and makes them accessible from your phone. You can monitor agent output in real time, handle approval gates as they come in, and redirect or stop agents without opening a laptop.

Grass works with Claude Code and OpenCode. Install the CLI with npm install -g @grass-ai/ide, run grass start in your project directory, and scan the QR code with the Grass mobile app.

Related concepts

Mobile coding agent accessMobile coding agent access is the ability to monitor and control an AI coding agent from a phone. Because agents run autonomously for extended periods, mobile access is what keeps you in the loop without being at a desk.

Agent approval gate — An agent approval gate is a point in an agent's task where it pauses and waits for human confirmation before continuing. Understanding how approval gates work is key to understanding the AI coding agent workflow.

Frequently asked questions

What is the difference between an AI coding agent and an AI coding assistant?

A coding assistant (like GitHub Copilot or Claude in a chat interface) responds to your prompts and waits for you to accept or modify each suggestion. You direct every action. A coding agent takes a goal and executes it autonomously — reading files, making decisions, writing and running code — without step-by-step direction. The assistant is a tool you use; the agent is a collaborator you assign work to.

How long does a typical AI coding agent session run?

It depends on the complexity of the task. Simple tasks — fixing a specific bug, writing a single function — might complete in 5–10 minutes. Complex tasks — full feature implementations, large refactors, test suite builds — can run for 30–60+ minutes. According to Anthropic's research, the 99.9th percentile Claude Code turn duration exceeded 45 minutes as of early 2026. Multi-turn sessions spanning multiple agent runs can take several hours in total.

What happens when an AI coding agent makes a mistake?

Agents can and do make mistakes — wrong approach, incorrect assumptions, test failures they can't resolve. Most agents handle this by iterating: run tests, see failures, revise, try again. If they get genuinely stuck, they typically surface the problem as a message to the user. In Claude Code, you can redirect the agent mid-task by sending a new prompt. Grass makes this possible from your phone — you don't need to be at a terminal to correct a wrong turn.

Do AI coding agents need my API key, or do they manage their own credentials?

This varies by agent. Claude Code uses your Anthropic API key (or your claude.ai authentication via claude login) and runs locally on your machine — your key never leaves your environment. Cursor uses its own cloud infrastructure with your Cursor account credentials. Devin is a fully cloud-hosted service. For local agents like Claude Code, the agent's API calls go from your machine to Anthropic's API — Grass doesn't proxy or intercept them.

Can AI coding agents work on any codebase, or do they need special setup?

Most AI coding agents — including Claude Code — can work on any codebase without special configuration. They read your files, infer the structure, and proceed. That said, they perform better with a CLAUDE.md file (for Claude Code) or similar project context file that explains conventions, key files, and constraints. Claude Code also respects .gitignore and can be configured via settings.json to limit which tools it's allowed to use.

How do I keep an AI coding agent from doing something irreversible by mistake?

Claude Code runs in default permission mode, which means it triggers an agent approval gate before any potentially destructive action — overwriting files, running shell commands, making external API calls. You approve or deny each gate before the agent proceeds. Grass surfaces these gates on your phone, so you can respond immediately even when you're not at your desk. For additional safety, run agents in a git repository so all changes are tracked and reversible.