3 min read

Interaction Patterns for AI Coding

Interaction Patterns for AI Coding

Every AI coding tool ships some set of "modes" — Claude Code has an ask → plan → agent loop plus background tasks; Cursor labels its modes Ask / Agent / Plan / Background; every other tool has its own names. The names, counts, and behaviors change every release, and no two tools agree. Memorize one tool's modes and you've learned something that expires.

So instead, learn the four durable interaction patterns underneath. Every tool is just a different UI over these:

Durable pattern What it's for Claude Code (today) Cursor Copilot Codex
Read-only Q&A Explain / plan without edits (ask normally) Ask Chat ask
Autonomous agent Multi-file changes in a loop default agent loop Agent Agent mode agent
Plan-then-execute Approve a plan before edits plan mode Plan plan
Background / async Long jobs off the critical path background tasks Background Coding agent cloud tasks
⏱️ Mapping current as of 2026-07. UI labels drift — the four patterns don't.

🟢 Pattern 1 — Read-only Q&A

Your infinitely patient senior colleague you can consult without touching a file. Nothing gets modified — the AI answers in the chat; you decide what (if anything) to apply.

Use it for: understanding a gnarly function or regex, generating a standalone snippet, brainstorming alternatives, quick fixes you'll paste yourself.

How it works: give context (highlight code or point at a file) → ask → read the response in the chat. Source files are untouched; you copy/integrate anything you want.

Perfect whenever the request is self-contained and you want full manual control.

🟡 Pattern 2 — Autonomous agent

The powerhouse: the AI reads your codebase, understands file relationships, and makes coordinated edits across multiple files to fulfill one high-level request.

Use it for: large refactors ("rename LegacyButtonUIButton everywhere"), implementing features across files, debugging issues that span components, project-wide migrations.

How it works: you give a goal → the agent analyzes and scans the project → it edits (creating/deleting/modifying files) → it presents the changes as a diff for your review.

🛑 The diff-review step is the whole point — see the discipline below. Changes are not silently applied; you review, accept, or reject.

🔵 Pattern 3 — Plan-then-execute

Before touching code on a complex or ambiguous task, the AI produces a step-by-step plan for you to approve. Catches misunderstandings before they become wrong edits.

Use it for: validating the AI understood the requirement, mapping out a task you're unsure how to start, breaking a big feature into steps.

How it works: you give a complex task → the AI returns a numbered plan (not code) → you review, tweak, approve → it executes (usually via the autonomous-agent pattern).

This pattern is important enough that it graduates into its own discipline — Spec-Driven Development.

⚫ Pattern 4 — Background / async

"Set it and forget it" — a long job runs asynchronously while you keep working; results arrive staged for review (e.g. in your Git panel).

Use it for: genuinely large, well-specified, verifiable, low-blast-radius tasks.

⚠️ The honest version (fixing a common trap): a demo like "convert the entire /src to TypeScript in the background" wildly understates the review burden. Large autonomous refactors are exactly where AI introduces subtle, hard-to-spot bugs — and running it in the background means no one's watching as it happens.

Reach for background/async only when the task is:Well-specified — unambiguous, with clear acceptance criteria.Verifiable — you have tests or checks that will prove it worked (not just "looks done").Low blast radius — a mistake is cheap to catch and revert.

And then verify the result properly before committing — run the test suite, review the diff, don't rubber-stamp a green checkmark. (See Verifying AI Output.) If you can't verify it, don't background it.

🛡️ The discipline that outranks every mode: review & approve

Across all four patterns, one habit matters more than any button:

Review every change before it lands. Approve plans before they execute.

This isn't any one tool's feature — it's the core safety discipline of AI-assisted development, and every tool surfaces some version of it (a diff view, a plan prompt, a staged commit). In 2026, with verification now the bottleneck, it matters more than ever. The tool that makes this easy is doing you a favor; the engineer who skips it is shipping unreviewed AI guesses to production.

🗺️ The agent landscape (2026)

The four patterns show up across three delivery forms — and modern teams mix them:

  • IDE agents (Cursor, Copilot, Windsurf, Cline) — in-editor, tight loop.
  • CLI agents (Claude Code, Codex CLI, Gemini CLI, Aider) — terminal-native, scriptable, composable.
  • Cloud / async agents (Cursor background, Copilot coding agent, Codex cloud) — off your machine, off your critical path.

Two more realities worth knowing:

  • Parallel agents. Running several agents at once — often each in its own git worktree so they don't collide — is a mainstream 2026 workflow. Great for independent tasks; you review each result separately.
  • Subagents / orchestration. A lead agent can dispatch focused subagents for pieces of a job. Powerful for large work, but multiplies what you must verify.
Pick the form by the task: interactive work → IDE; scripted/batch/parallel → CLI; long, well-specified jobs → cloud. Same four patterns underneath, every time.

Next: the plan-then-execute pattern, taken seriously → Spec-Driven Development.