|$ curl https://forge-ai.dev/api/markdown?path=docs/ai/coding-agents
$cat docs/ai-coding-agents.md
updated November 2026·35 min read·published

AI Coding Agents

◆Coding Agents◆Claude Code◆Cursor◆Codex◆Intermediate🎯Free Tools
What are AI Coding Agents?

AI coding agents are autonomous software systems that read, write, execute, and debug code with minimal human intervention. Unlike autocomplete tools that suggest the next token, coding agents operate at the task level — they understand requirements, explore codebases, make architectural decisions, run tests, and iterate until the task is complete.

The shift from autocomplete to agentic coding represents a fundamental change in how software is built. Autocomplete tools like early GitHub Copilot accelerated typing. Coding agents like Claude Code, Cursor, and OpenAI Codex accelerate thinking — they handle the entire development loop from requirement analysis to verified implementation.

ℹ

info

The key differentiator: autocomplete predicts text; agents execute workflows. A coding agent can clone a repo, read the test suite, identify a bug, write a fix, run the tests, and open a pull request — all without you touching the keyboard.
How Coding Agents Work

Modern coding agents use a ReAct (Reasoning + Acting) loop: they observe the environment, think about the next step, act on it, and verify the result. This loop repeats until the task is done or the agent determines it needs human input.

The ReAct Loop

1. Observe — Read files, search code, inspect error logs, gather context about the current state of the system.

2. Think — Analyze observations, form hypotheses, plan the next action, decide which tools to use.

3. Act — Execute the plan: write code, run commands, call APIs, modify files, or query databases.

4. Verify — Check the outcome: did tests pass? Did the build succeed? Did the linter approve? If not, loop back to observe.

PhaseAgent ActionHuman Role
ObserveRead files, grep codebase, parse AST, check git statusProvide context, point to relevant files
ThinkChain-of-thought reasoning, plan decomposition, tool selectionReview plan, approve approach
ActEdit files, run shell commands, call MCP tools, create commitsApprove destructive actions, provide credentials
VerifyRun tests, type-check, lint, build, deploy to stagingAccept or reject changes, provide feedback
📝

note

The ReAct loop is what separates agents from simple code generators. A code generator produces output once. An agent iterates until success criteria are met — or until it determines the task is impossible with current constraints.
Top Coding Agents 2026

The coding agent landscape has matured rapidly. Here are the leading platforms, their strengths, and when to use each.

AgentStrengthsPricingMCP SupportSubagentsBest For
Claude CodeDeep reasoning, large context, terminal-native, MCP-nativePro $20/mo, Team $30/userNativeYesComplex refactors, multi-file changes, MCP workflows
CursorIDE integration, fast autocomplete, multi-model supportPro $20/mo, Business $40/userVia pluginsLimitedRapid prototyping, greenfield projects, pair programming
OpenAI CodexCode execution sandbox, GitHub integration, natural language to codeUsage-based (API)LimitedNoScript generation, data pipelines, quick automation
DevinFully autonomous, long-running tasks, self-healingEnterprise (custom)UnknownYesLarge migrations, overnight tasks, enterprise automation
GitHub Copilot WorkspaceGitHub-native, issue-to-PR workflow, team collaborationIncluded with Copilot EnterpriseNoNoGitHub-centric teams, issue triage, small fixes
🔥

pro tip

Many teams use multiple agents. A common pattern: Claude Code for complex refactoring and MCP-connected workflows, Cursor for rapid UI iteration, and Codex for quick script generation. The agents are complementary, not mutually exclusive.
Setting Up Your First Coding Agent

The fastest way to get started is with Claude Code or Cursor. Both provide interactive terminal or IDE experiences with minimal configuration. The key to effective agent use is a well-written configuration file that tells the agent about your project conventions.

setup.sh
Bash
1# Install Claude Code (requires Node.js 18+)
2npm install -g @anthropic-ai/claude-code
3
4# Navigate to your project
5cd my-project
6
7# Start interactive session
8claude
9
10# Or run a single task
11claude -p "Fix the failing test in src/utils.test.ts"
12
13# Install Cursor (macOS)
14brew install --cask cursor
15
16# Or download from cursor.sh
17# Open project in Cursor
18cursor .

Create a CLAUDE.md or AGENTS.md in your project root. This file is the agent's instruction manual — it defines coding style, testing requirements, architectural constraints, and anything else the agent needs to know.

CLAUDE.md
Markdown
1# CLAUDE.md — Project Agent Configuration
2
3## Project Overview
4Next.js 16 e-commerce platform with TypeScript strict mode,
5Tailwind CSS v4, and PostgreSQL via Prisma.
6
7## Coding Standards
8- TypeScript strict; no any types
9- Functional React components only; no class components
10- Use Tailwind arbitrary values for one-off styles
11- All new components must have Storybook stories
12
13## Testing Requirements
14- Run `npm test` after every change
15- Run `npx tsc --noEmit` before committing
16- E2E tests required for checkout flow changes
17
18## Architecture Constraints
19- App Router only; no Pages Router
20- Server Components by default; Client Components only when needed
21- Database access only through Prisma client
22- No direct SQL in application code
23
24## File Structure
25- src/app/ — Next.js App Router pages
26- src/components/ — Reusable React components
27- src/lib/ — Utilities and helpers
28- prisma/ — Database schema and migrations
✓

best practice

Treat your CLAUDE.md like onboarding documentation for a new senior engineer. The more context you provide, the fewer mistakes the agent makes. Update it as your project evolves — stale instructions cause agent drift.
Agent Configuration Files

Different agents use different configuration files. The ecosystem is converging on AGENTS.md as a standard, but agent-specific files still dominate. Here is what each agent expects.

CLAUDE.md — Claude Code

Read automatically by Claude Code. Supports markdown, code blocks, and nested imports. Can reference other files like ./docs/architecture.md.

CLAUDE.md
Markdown
1# CLAUDE.md
2See @AGENTS.md for general project context.
3
4## Claude-Specific Rules
5- Always run tests before marking a task complete
6- Use the Read tool before editing any file
7- Prefer editing existing files over creating new ones
8- When in doubt, ask for clarification — do not guess

.cursorrules — Cursor

Plain text or markdown file in project root. Cursor reads this for every AI interaction. Supports basic formatting but not nested imports.

.cursorrules
Markdown
1# .cursorrules
2You are an expert TypeScript developer.
3
4Rules:
5- Use strict TypeScript, never any
6- Prefer named exports over default exports
7- Write tests for all new utilities
8- Use Zod for runtime validation
9- Follow the existing file structure in src/
10
11When editing:
12- Read the file first
13- Make minimal changes
14- Add comments only where logic is not self-evident

AGENTS.md — Universal Standard

Emerging standard supported by multiple agents. Designed to be agent-agnostic. Place in project root or .agents/ directory.

AGENTS.md
Markdown
1# AGENTS.md
2## Project
3E-commerce platform, Next.js 16, TypeScript, Tailwind
4
5## Commands
6- Build: npm run build
7- Test: npm test
8- Lint: npm run lint
9- Type check: npx tsc --noEmit
10
11## Conventions
12- TypeScript strict
13- Functional components
14- Tailwind for styling
15- Prisma for database
16
17## Boundaries
18- Never edit prisma/migrations directly
19- Never commit .env files
20- Always ask before deleting files

.windsurfrules — Windsurf

Windsurf's configuration format. Similar to .cursorrules with some Windsurf-specific directives.

.windsurfrules
Markdown
1# .windsurfrules
2- Always use TypeScript strict mode
3- Follow existing patterns in the codebase
4- Write unit tests for new functions
5- Use the existing design system components
6- Run linter before completing tasks
ℹ

info

Maintain a single source of truth. Create AGENTS.md with universal content, then symlink or import it from agent-specific files: CLAUDE.md can contain See @AGENTS.md plus Claude-specific overrides.
Subagents & Parallel Execution

Advanced coding agents can spawn subagents to work on independent tasks in parallel. This is essential for large refactors, multi-service changes, or research tasks that require exploring multiple approaches simultaneously.

parallel-agents.ts
TypeScript
1// Example: Claude Code spawning parallel subagents
2// (Conceptual — actual API varies by agent)
3
4import { spawnSubagent } from "@anthropic-ai/claude-code";
5
6async function migrateToAppRouter() {
7 // Main agent decomposes the task
8 const tasks = [
9 {
10 name: "migrate-pages",
11 prompt: "Migrate src/pages/*.tsx to src/app/ using App Router conventions",
12 files: ["src/pages/**"],
13 },
14 {
15 name: "update-imports",
16 prompt: "Update all import paths to use @/ alias instead of relative paths",
17 files: ["src/**/*.ts", "src/**/*.tsx"],
18 },
19 {
20 name: "add-loading-states",
21 prompt: "Add loading.tsx and error.tsx to all route segments",
22 files: ["src/app/**"],
23 },
24 ];
25
26 // Spawn parallel subagents
27 const results = await Promise.all(
28 tasks.map((task) =>
29 spawnSubagent({
30 name: task.name,
31 prompt: task.prompt,
32 allowedFiles: task.files,
33 maxTurns: 50,
34 })
35 )
36 );
37
38 // Main agent verifies and merges
39 await runTests();
40 await createPullRequest(results);
41}
⚠

warning

Parallel subagents work best on truly independent tasks. If subagents edit the same files, you will get merge conflicts. Use file-scoped permissions (allowedFiles) to prevent overlap.
MCP Integration for Coding Agents

MCP (Model Context Protocol) enables coding agents to connect to databases, APIs, version control, issue trackers, and custom tools. An MCP-connected agent can query your production database schema, fetch error logs from Sentry, create GitHub issues, and deploy to Vercel — all within the same session.

.claude/settings.json
JSON
1// .claude/settings.json — MCP server configuration
2{
3 "mcpServers": {
4 "postgres": {
5 "command": "npx",
6 "args": ["-y", "@modelcontextprotocol/server-postgres"],
7 "env": {
8 "POSTGRES_CONNECTION_STRING": "postgresql://localhost:5432/mydb"
9 }
10 },
11 "github": {
12 "command": "npx",
13 "args": ["-y", "@modelcontextprotocol/server-github"],
14 "env": {
15 "GITHUB_TOKEN": "ghp_..."
16 }
17 },
18 "filesystem": {
19 "command": "npx",
20 "args": ["-y", "@modelcontextprotocol/server-filesystem", "/src"]
21 },
22 "sentry": {
23 "command": "npx",
24 "args": ["-y", "@modelcontextprotocol/server-sentry"],
25 "env": {
26 "SENTRY_AUTH_TOKEN": "sntryu_...",
27 "SENTRY_ORG": "my-org"
28 }
29 }
30 }
31}

With MCP configured, the agent can invoke tools naturally:

agent-workflow.ts
TypeScript
1// Agent workflow using MCP tools
2// 1. Check database schema
3const schema = await mcp.postgres.query({
4 sql: "SELECT table_name, column_name, data_type FROM information_schema.columns WHERE table_schema = 'public'"
5});
6
7// 2. Find relevant GitHub issues
8const issues = await mcp.github.searchIssues({
9 query: "repo:myorg/myrepo label:bug state:open"
10});
11
12// 3. Read error logs
13const errors = await mcp.sentry.getEvents({
14 query: "level:error",
15 limit: 10
16});
17
18// 4. Fix the bug, run tests, create PR
19await editFile("src/lib/auth.ts", fixContent);
20await runCommand("npm test");
21await mcp.github.createPullRequest({
22 title: "Fix authentication token refresh",
23 body: `Fixes #${issues[0].number}. Resolves Sentry error ${errors[0].id}`,
24 head: "fix/auth-refresh",
25 base: "main"
26});
🔥

pro tip

Start with the filesystem MCP server and one API integration (GitHub or your database). Add more servers as needed. Each MCP server runs as an isolated process — a compromised server cannot access other servers' credentials.
Agent Security & Sandboxing

Coding agents execute arbitrary commands and modify files. This creates significant security surface area. Understanding permission models and sandboxing options is essential for safe production use.

◆

Permission Tiers

Most agents offer tiered permissions: read-only (explore but not edit), workspace-write (edit files but not run commands), and full-access (run any command). Start with the most restrictive tier that accomplishes the task.

◆

File Access Control

Configure allowed directories explicitly. Claude Code respects .gitignore and .claudeignore. Cursor uses workspace boundaries. Never give agents access to ~/.ssh, ~/.aws, or credential files.

◆

Network Isolation

Run agents in containers or VMs with restricted network access. For sensitive codebases, use local-only models or air-gapped environments. MCP servers should use least-privilege credentials with short-lived tokens.

◆

Audit Logging

Enable comprehensive logging of all agent actions. Claude Code logs every file read, edit, and command execution. Review logs before merging agent-generated PRs, especially for infrastructure or security-sensitive code.

◆

Secrets Management

Never hardcode secrets in configuration files. Use environment variables, secret managers, or short-lived OAuth tokens. Agents should access secrets through MCP servers that enforce access control, not by reading .env files directly.

⚠

warning

The most common agent security failure is credential leakage. An agent with filesystem access can read .env, ~/.aws/credentials, or SSH private keys. Always use workspace-scoped credentials and review what files the agent accessed in its logs.
Measuring Agent Productivity

Quantifying agent impact requires tracking both output metrics (what the agent produces) and process metrics (how it changes your workflow). Here are the metrics that matter.

MetricHow to MeasureTargetWarning Sign
Task Completion Rate% of assigned tasks completed without human intervention>70% for routine tasks<40% — agent needs better context or task decomposition
Time to First PRMinutes from task assignment to pull request opened<30 min for small features>2 hours — agent stuck in loops or needs better tooling
Human Review TimeMinutes spent reviewing agent output per PR<15 min for routine changes>1 hour — agent producing low-quality or over-complex code
Defect RateBugs introduced per 1000 lines of agent-generated codeEqual or lower than human baselineSignificantly higher — agent needs better testing instructions
Developer SatisfactionSurvey score (1-10) on "agents make my job easier">7 average<5 — agents creating more work than they save
✓

best practice

Run a 2-week baseline period where you track your normal development velocity. Then introduce agents for specific task types (bug fixes, test writing, documentation). Compare velocity and quality metrics. The goal is not to replace developers — it is to eliminate toil so developers focus on high-judgment work.
Best Practices
◆

Start Small, Expand Gradually

Begin with well-defined, low-risk tasks: writing tests, updating dependencies, fixing linter errors. Expand to feature development only after you trust the agent's output quality and understand its failure modes.

◆

Invest in Configuration

A detailed CLAUDE.md or AGENTS.md is the highest-ROI investment. Include coding standards, architecture diagrams, common pitfalls, and links to key documentation. Update it when the agent makes a mistake.

◆

Use Version Control Aggressively

Commit before starting any agent session. Review diffs carefully — agents can make subtle, wide-ranging changes. Use feature branches for agent work, never commit directly to main.

◆

Decompose Complex Tasks

Break large features into small, verifiable steps. "Add user authentication" is too vague. "Create a login form component with email/password validation" is actionable. Agents excel at focused tasks with clear success criteria.

◆

Maintain Human Oversight

Agents amplify productivity but do not replace judgment. Review all security-sensitive code, database migrations, and architectural decisions. Use agents for implementation, not for requirements or design.

◆

Iterate on Failure

When an agent fails, diagnose why: insufficient context? ambiguous instructions? missing tools? Update your configuration and try again. Each failure is a configuration improvement opportunity.

$Blueprint — Engineering Documentation·Section ID: AI-CODING-AGENTS·Revision: 1.0

Community

Get help on Slack, Discord or VIP

Stuck on a guide? Join the community and ask.