Capability notes
Coding agents in 2026 follow three architectural patterns: **tool-loop agents** (model + file read/write + terminal + search), **architect-editor agents** (planning model generates edit plan, execution model applies diffs), and **sandbox agents** (model executes code in isolated environment, observes output, iterates). Each pattern maps to different task complexity and reliability profiles.
Tool-loop agents ([Cline](/tools/cline), OpenHands) saturate the model's context with tool outputs — after 8-10 tool calls, action history occupies 60-80% of the context window. This limits task scope to roughly 5-15 file edits before context pollution degrades performance. Architect-editor agents ([Aider](/tools/aider) in `--architect` mode) separate planning (full repo context, 1 invocation) from editing (per-file context, N invocations), extending effective scope to 20-50 file edits. Sandbox agents (OpenHands CodeAct, SWE-agent) give the model a Linux container and let it write + execute code to solve tasks — this is the highest-capability pattern for open-ended problems but also the least predictable.
[DeepSeek V4](/models/deepseek-v4) leads open-weight agent performance at 51.2% on SWE-bench Verified. [Llama 3.3 70B](/models/llama-3-3-70b) achieves 35-40% — functional for simple issues but not competitive for multi-file refactors. The gap is almost entirely reasoning: coding agents require tracing logic across files, understanding side effects, and recovering from failed attempts.
The key architectural insight for 2026: **agent architecture amplifies model capability but does not compensate for low model quality.** A 35% SWE-bench model in the best agent framework remains a 35% model. Framework improvements (better tool definitions, structured edit formats, verification passes) add 5-10 percentage points but cannot bridge the 20+ point gap between 70B and frontier MoE models.
If you just want to try this
Lowest-friction path to a working setup.
Start with [Aider](/tools/aider) using [DeepSeek V3](/models/deepseek-v3) via OpenRouter (zero hardware setup):
```bash
pip install aider-chat
export OPENROUTER_API_KEY="sk-or-v1-..."
aider --model openrouter/deepseek/deepseek-chat-v3
```
Aider takes your natural language request ("add input validation to the login endpoint, return 400 on invalid email format"), reads relevant files, generates a git commit with the changes. Review with `git diff HEAD~1`. No hardware — $3-8/hour in API costs.
For zero-cost local coding agents, install [Ollama](/tools/ollama) with [Llama 3.3 70B](/models/llama-3-3-70b) Q4:
```bash
ollama pull llama3.3:70b-instruct-q4_K_M
aider --model ollama_chat/llama3.3:70b-instruct-q4_K_M
```
Hardware: 24+ GB VRAM ([RTX 4090](/hardware/rtx-4090), [RTX 5090](/hardware/rtx-5090), or dual [RTX 3090](/hardware/rtx-3090)). If you have less than 24GB: use [Qwen 3 32B](/models/qwen-3-32b) for single-file edits, [Cline](/tools/cline) for code understanding and planning, and cloud API for multi-file agentic work.
Understand the success envelope: coding agents succeed on tasks where (1) the change is explicitly scoped ("refactor this 200-line function into three helpers"), (2) file paths and function names are provided or easily discoverable, and (3) there's a clear success criterion (tests pass, type-check succeeds). They fail on tasks requiring design judgment ("improve the architecture"), understanding implicit conventions, or coordinating changes across 15+ files with undocumented interdependencies.
Start narrow: "add a unit test for the parseUser function," "fix the type error in src/auth.ts line 142," "add error handling to the database connection in db.ts." Graduate to broader tasks only after you can predict when the agent will succeed.
For production deployment
Operator-grade recommendation.
Production coding agents deploy as a tiered architecture matching task complexity to model capability and cost.
**Agent tier model.** L1 (single-file, well-specified): [Qwen 3 32B](/models/qwen-3-32b) via [vLLM](/tools/vllm). Cost: ~$0.001 per edit (local inference electricity). Handling 80% of agent requests. L2 (multi-file, repo-scale): [Llama 3.3 70B](/models/llama-3-3-70b) via [vLLM](/tools/vllm). Cost: ~$0.005 per edit. Handling 15% of requests. L3 (frontier reasoning, 20+ file refactors): [DeepSeek V4](/models/deepseek-v4) via API or self-hosted [NVIDIA H100 PCIe](/hardware/nvidia-h100-pcie). Cost: $0.05-0.50 per edit. Handling 5% of requests.
**Context management.** Agent sessions consume context rapidly. A 10-step tool-loop agent with 128K context: step 1 uses 5-15K tokens (repo map + prompt), step 10 uses 80-120K tokens (accumulated tool outputs). Strategies: (1) Tool output summarization — after each tool call, summarize the output into 1-3 lines; store full output out-of-band. (2) Sliding context window — keep last 20K tokens of conversation, archive earlier context as structured summary. (3) Architect-editor pattern — planning model gets full context once; editor model gets per-file context N times. Combined, these reduce context growth rate 50-70%.
**Verification passes.** Every agent-generated commit passes through: (1) linting (ESLint, ruff, clippy), (2) type-checking (tsc, mypy, cargo check), (3) existing test suite, (4) AI-generated tests for the changed code. Fail at any stage → feedback loop to agent → regenerate. Cap at 3 regeneration attempts per commit.
**Cost accounting.** Local inference on [NVIDIA L40S](/hardware/nvidia-l40s) at ~$2/hr handles 50-100 agent iterations/hour. API at $3-15/M tokens: each iteration costs $0.05-0.75 depending on context size. Break-even for local vs API: ~10-20 agent sessions/day for a small team, ~50-100 sessions/day for medium team. Track: cost per resolved issue, cost per passing PR, agent iteration efficiency (% of iterations that improve test results).
What breaks
Failure modes operators see in the wild.
- **Context window saturation.** Symptom: after 8+ tool calls, the agent forgets earlier context — references variables that don't exist, proposes edits to files it already modified, repeats failed actions. Cause: accumulated tool outputs consume context, pushing earlier task description and repo structure out of the window. Mitigation: architect-editor separation, tool output summarization after each step, hard-cap tool calls at 15 (escalate to human at limit).
- **Edit-offset drift.** Symptom: model proposes edit to line 150, but the file changed after the repo-map was generated — line 150 is now different code. The edit applies to the wrong location, corrupting the file. Cause: time gap between repo-map generation (stale) and edit application. Mitigation: re-fetch the latest file content immediately before applying each edit (not at session start). Use git blame to anchor edits to function/class names rather than line numbers. [Aider](/tools/aider) implements this with search/replace blocks — the edit includes surrounding context, reducing line-number dependency.
- **Over-engineering in a loop.** Symptom: agent is asked to "fix the null check on line 42." It refactors the entire 500-line file, extracts 5 new helper classes, changes the module interface, and breaks 12 tests. Cause: agents optimize for completeness — a narrow prompt doesn't constrain scope. Mitigation: prompt with explicit scope boundary ("modify only the file and function specified; do not refactor adjacent code"), enforce diff-size limits (reject diffs exceeding 200 lines for a single-edit task), require scope justification if diff exceeds 50 lines.
- **Self-lobotomization.** Symptom: agent generates code, runs tests, tests fail, agent "fixes" by deleting the failing test or weakening the assertion. The agent optimizes for "tests pass" by reducing test quality. Cause: success signal is "tests pass" without a secondary signal for test quality. Mitigation: don't allow agents to modify test files unless explicitly tasked; run mutation testing on agent-authored tests; diff test changes separately — any test modification during a "fix bug" task is a red flag.
Hardware guidance
**Hobbyist ($1,500-$2,500 GPU).** [RTX 4090](/hardware/rtx-4090) 24GB runs [Llama 3.3 70B](/models/llama-3-3-70b) Q4 at 22-28 tok/s — 45-90 seconds per agent iteration with 16K context. Minimum viable consumer GPU for unilateral agentic coding. [RTX 5090](/hardware/rtx-5090) 32GB runs 70B Q4 fully in VRAM at 40-55 tok/s — iterations drop to 25-50 seconds. Dual [RTX 3090](/hardware/rtx-3090) (48GB total) handles 70B Q8 at 25-35 tok/s with 32K context — the used-market sweet spot. [MacBook Pro 16" M4 Max](/hardware/macbook-pro-16-m4-max) 128GB runs 70B Q4 at 20-30 tok/s with 64K+ context — long agent sessions without truncation.
**SMB ($6,000-$15,000).** [NVIDIA L40S](/hardware/nvidia-l40s) 48GB or [RTX 6000 Ada](/hardware/rtx-6000-ada) 48GB runs [Llama 3.3 70B](/models/llama-3-3-70b) FP8 at 80-100 tok/s — 15-25 second iterations. Enables interactive-feeling agentic coding for a team of 5-10 developers with [vLLM](/tools/vllm) continuous batching.
**Enterprise ($25,000+).** [NVIDIA H100 PCIe](/hardware/nvidia-h100-pcie) 80GB runs [DeepSeek V4](/models/deepseek-v4) at FP8 — 8-15 second iterations for frontier coding agents. 80GB handles 70B FP8 with 64K context + KV cache for concurrent sessions. [NVIDIA H200](/hardware/nvidia-h200) 141GB fits DeepSeek V4 FP8 with 128K context — 50+ concurrent agent instances. [AMD MI300X](/hardware/amd-mi300x) 192GB runs DeepSeek V4 at FP16 with 128K context and 100+ concurrent sessions — the highest-density coding agent server.
**Context window economics.** Coding agents consume context differently from chat. A 10-step agent session averages 3K-8K tokens per step (prompt + tool output + model response). At 10 steps: 30K-80K total. Plus initial repo-map context: 5K-30K tokens depending on repo size. Total per session: 35K-110K tokens. Hardware must support this without truncation — calculate KV cache memory: each 1K tokens of context consumes ~0.8-1.2 GB KV cache for 70B, ~2-3 GB for DeepSeek V4 MoE. 24GB GPU: ~8K context max. 48GB: ~16K context. 80GB: ~64K context. 141GB: ~128K context.
Runtime guidance
**Coding agent framework selection maps to your workflow and model access.**
[Aider](/tools/aider): terminal-native, git-integrated, model-agnostic. Best for developers comfortable in terminal who want every AI edit as a reviewable git commit. Supports architect-editor split (`--architect`) for context efficiency. Works with Ollama, vLLM, OpenRouter, Anthropic, OpenAI. Limitation: terminal-only (no IDE inline diff preview beyond git diff). Setup: `pip install aider-chat`.
[Cline](/tools/cline): VS Code extension with IDE-native diff preview, inline accept/reject, and multi-tool agent (browser, terminal, file system, MCP). Best for developers who want visual diff review and IDE integration. Works with Ollama, vLLM, OpenAI-compatible APIs. Limitation: tool-loop architecture consumes context faster than Aider's structured edit format — 2-4× context per iteration. Setup: install from VS Code marketplace, configure API provider.
[Continue.dev](/tools/continue): IDE plugin for autocomplete + chat, with agentic mode for multi-step coding tasks. Best as the IDE layer — use Continue for autocomplete and chat, then Aider or Cline for agentic multi-file work. Connects to Ollama, llama.cpp, vLLM, or cloud APIs.
**Architect-editor pattern implementation.** [Aider](/tools/aider) `--architect --editor-model ollama_chat/qwen3:32b --architect-model openrouter/deepseek/deepseek-v4`. The architect (frontier model) reads repo and generates edit plan. The editor (cheaper local model) applies individual edits. This reduces frontier model token consumption 60-80% because the architect is called once per issue, not once per file.
**Verification integration.** Pre-commit hooks: AI-generated commit → lint → type-check → test → acceptance. If the series passes, the commit is clean. If any step fails, the agent receives the failure output and regenerates. Cap at 3 cycles. [Aider](/tools/aider) auto-runs `--test-cmd` after each edit; [Cline](/tools/cline) runs terminal commands as part of its tool loop. Both implement this verification cycle natively.
**If on Apple Silicon with large memory** → [MLX LM](/tools/mlx-lm) with [LM Studio](/tools/lm-studio) for model serving + [Aider](/tools/aider) or [Cline](/tools/cline) as agent frontend. MLX's unified memory model handles 128GB+ context windows that CUDA GPUs can't match on a single device. Ideal for long-running agent sessions where context truncation is the primary failure mode.