Day 09 April 7, 2026

Code Agents

SWE-agent, Devin, Codex CLI, Claude Code — how AI writes, understands, and fixes software at repository scale

SWE-agent
Devin 2.0
Codex CLI
Claude Code
Repo-level reasoning
Curriculum
53% complete
Core Concept

From Autocomplete to Autonomous Software Engineer

Think of the evolution in three stages. Stage 1 was autocomplete — Copilot-style systems that predict the next few lines inside a single file. Stage 2 was chat-and-edit — you describe a change in English, the model edits one file at a time. Stage 3, where we are now, is the code agent: a system that reads an entire repository, plans a multi-file strategy, writes code, runs tests, reads the error output, fixes failures, and iterates — all autonomously. The human provides a goal (a GitHub issue, a feature spec, a bug report); the agent delivers a pull request.

1The Code Agent Loop

Every code agent follows a variant of the same loop, regardless of vendor:

Issue / Task
natural language
Localize
find relevant files
Edit
write patches
Validate
PR / merge
Test
run suite, lint
Debug
read errors
↩ loop continues until tests pass or iteration limit is reached

The critical insight from the SWE-agent paper is that the interface between the LLM and the codebase matters as much as the model itself. SWE-agent's custom Agent-Computer Interface (ACI) provides simplified commands for viewing, searching, and editing files, with guardrails that prevent common mistakes (like forgetting to save). This custom interface boosted performance far more than simply using a better model with a raw shell.

Key lesson: don't just give an LLM a bash shell. Design purpose-built commands that constrain the action space and give clear, concise feedback. This is why every serious code agent (Codex CLI, Claude Code, Aider) builds a custom tool layer on top of the filesystem.

2Codebase Understanding: The Hard Problem

A typical production repository might have 500,000 lines of code across 3,000 files. No LLM context window fits all of that. Code agents solve this with a localization pipeline that narrows from the entire repo to the exact lines that need editing:

Step 1 — Repository Map. Build a lightweight structural index: file tree, class/function signatures, import graphs. SWE-agent generates a "repo map" at startup. Claude Code reads CLAUDE.md and indexes project structure. Devin auto-generates architecture wikis from your codebase.

Step 2 — Semantic Search. Given the issue description, use embedding-based retrieval (or BM25 keyword search) to find the top candidate files. This is essentially RAG applied to source code.

Step 3 — Hierarchical Localization. The Agentless paper showed a clean three-pass approach: first identify relevant files, then narrow to relevant classes/functions within those files, then pinpoint exact edit locations. This hierarchical strategy is cheaper and often more accurate than letting an agent freely explore.

Step 4 — Context Assembly. Combine the localized code snippets with the issue description, relevant test files, and any documentation into a single prompt. This is the "context engineering" that Harrison Chase calls the make-or-break skill of the agent era.

The #1 failure mode of code agents is wrong localization — editing the wrong file or function. On SWE-bench, agents that correctly localize the bug fix it ~80% of the time; agents that mis-localize almost never recover.

3Agent vs. Agentless: A Fundamental Design Choice

The field has split into two philosophies:

Agentic
Free-form tool use (SWE-agent, Devin, Claude Code)
The LLM has a loop with shell access, can explore freely, run tests, backtrack. Flexible but expensive (many LLM calls) and sometimes goes down rabbit holes. Best for complex, open-ended tasks where the fix isn't obvious.
Agentless
Pipeline approach (Agentless, Alibaba Lingma)
A fixed three-phase pipeline: localize → repair → validate. No open-ended tool use. Cheaper ($0.70/issue vs $4+), more predictable, easier to debug. Surprisingly competitive — Agentless matched or beat many agent systems on SWE-bench.
Hybrid
Structured agent (Codex CLI, Aider)
Uses agent loops but within guardrails: constrained edit formats (diff blocks, search-and-replace), mandatory test verification, structured output. Balances flexibility with reliability.
IDE-integrated
Cursor, Gemini Code Assist, GitHub Copilot
Agent runs inside the IDE with access to the editor state, language server (types, references, errors), and terminal. Tight integration enables features like "Finish Changes" (Gemini) and multi-file refactors with type checking.
For botlearn.ai: the agent vs. agentless distinction maps directly to product positioning. Agentless is great for well-defined bug fixes (support tickets). Agentic is needed for open-ended feature development. Your customers likely need both.

4How Code Agents Handle Edits

One of the trickiest implementation details is how the agent specifies code changes. Raw "rewrite the whole file" doesn't scale — it wastes tokens and introduces regressions. Modern approaches:

Search-and-replace blocks (Aider, Claude Code): the model outputs an old_string/new_string pair. The tool finds the exact match and replaces it. This is precise and diff-friendly, but the model must reproduce the old code exactly (whitespace and all).

Unified diff format (Codex CLI): the model outputs standard unified diffs. Familiar to developers, easy to review, and git-compatible. But LLMs sometimes produce malformed diffs.

Full-file rewrite with validation (Devin): Devin writes entire files in its cloud IDE, then runs linting and tests immediately. The trade-off is higher token cost but fewer edit-application failures.

AST-aware edits (research frontier): Instead of text diffs, operate on the Abstract Syntax Tree. Guarantees syntactically valid code but requires language-specific tooling.

Papers to Know

Landmark & Recent Research

NeurIPS 2024
SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering
John Yang, Carlos E. Jimenez, Alexander Wettig, Kilian Lieret, Shunyu Yao, Karthik Narasimhan, Ofir Press — Princeton University
SWE-agent demonstrated that how an LLM interacts with a codebase matters as much as which model you use. The team designed a custom Agent-Computer Interface (ACI) with purpose-built commands for file navigation, search, and editing — replacing the raw Linux shell. With GPT-4, SWE-agent achieved 12.5% on SWE-bench (the leading score at the time) and 87.7% on HumanEvalFix. The key insight: guardrailed, feedback-rich interfaces dramatically reduce agent errors compared to open-ended shell access.
Why it matters: Established the principle that tool design is a first-class concern in agent engineering. Every subsequent code agent (Codex CLI, Claude Code, Aider) adopted purpose-built command interfaces inspired by this work. The paper also popularized SWE-bench as the standard benchmark.
arXiv 2405.15793
arXiv preprint 2024
Agentless: Demystifying LLM-based Software Engineering Agents
Chunqiu Steven Xia, Yinlin Deng, Soren Dunn, Lingming Zhang — UIUC
Agentless challenges the assumption that you need complex agent loops for software engineering. Instead, it uses a simple three-phase pipeline: (1) hierarchical localization (file → class → line), (2) patch generation using the localized context, and (3) patch validation via test execution. Despite its simplicity, Agentless achieved 32% on SWE-bench Lite at a cost of just $0.70 per issue — matching or beating most agent-based systems at a fraction of the cost. OpenAI adopted Agentless as their go-to approach for showcasing GPT-4o and o1 coding performance.
Why it matters: Proved that agentic complexity isn't always necessary. For well-defined bugs, a structured pipeline can match agents at 5-10x lower cost. This has major implications for production deployment, where cost-per-task drives adoption.
arXiv 2407.01489
arXiv preprint 2025
CodeAgent: Enhancing Code Generation with Tool-Integrated Agent Systems for Real-World Repo-level Coding Challenges
Kechi Zhang, Jia Li, Ge Li, Xianjie Shi, Zhi Jin — Peking University
CodeAgent integrates five specialized tools (code search, code navigation, test execution, web search, and documentation lookup) into a single agent framework for repo-level code generation. The paper focuses on the challenge that real-world coding requires more than just an LLM — it requires understanding project structure, dependencies, APIs, and conventions. CodeAgent outperformed base models and retrieval-augmented baselines on repo-level benchmarks, demonstrating that tool diversity (not just a better model) is key to real-world code generation.
Why it matters: Showed that the "tool portfolio" of a code agent — what tools it can call and how it orchestrates them — is a primary differentiator. This mirrors the MCP ecosystem (Day 03): the agents that win will be the ones with the richest, most reliable tool integrations.
arXiv 2401.07339
GitHub Pulse

Key Open-Source Repositories

anthropics/claude-code
~82K
HOT
Anthropic's agentic coding tool — terminal-native, reads full codebase, plans multi-file edits, runs tests.
The fastest-growing code agent repo on GitHub. Implements search-and-replace edits, CLAUDE.md context files, and a plugin system. Open-source since May 2025.
openai/codex
~74K
HOT
OpenAI's lightweight coding agent CLI, built in Rust. Supports o3, o4-mini, GPT-5.2-Codex models.
Open-sourced under Apache 2.0. Uses sandboxed execution and unified diff format. Notably minimal — the "Unix philosophy" approach to code agents.
Aider-AI/aider
~43K
PIONEER
AI pair programming in your terminal. Works with 100+ LLMs. Pioneered the search-and-replace edit format.
The original terminal-based code agent. Aider's "architect mode" (one model plans, another codes) inspired dual-agent patterns now used everywhere. Coined "vibe coding" workflows before the term existed.
SWE-agent/SWE-agent
~19K
Research agent that takes a GitHub issue and tries to fix it autonomously. NeurIPS 2024.
The paper that launched the code agent field. Now includes mini-swe-agent (100 lines, 74%+ on SWE-bench Verified) — showing how far the field has come.
OpenAutoCoder/Agentless
actively maintained
The no-agent approach to software engineering — localize, repair, validate in three clean phases.
Proof that you don't always need agent loops. The $0.70/issue benchmark remains a North Star for cost-efficient deployment.
langchain-ai/open-swe
actively maintained
NEW
LangChain's open-source asynchronous coding agent built on LangGraph.
Represents the framework approach: build code agents using the same graph-based orchestration as other agentic apps, enabling custom pipelines and composable tools.
Community Pulse

What the Experts Are Saying

AK
Andrej Karpathy
@karpathy
Karpathy has argued that coding agents crossed from "unreliable" to "functional" in December 2025, flipping his personal ratio from 80% writing code himself to 80% delegating to agents. He's coined the term "agentic engineering" as the successor to "vibe coding" — emphasizing that the new core skills are intent specification, task decomposition, and fast code review, not line-by-line coding.
Source: Multiple X posts and interviews, early 2026. Karpathy describes the shift as "programming becoming unrecognizable since December."
SW
Simon Willison
@simonw
Willison has started an "Agentic Engineering Patterns" documentation project, collecting and cataloging best practices for working with coding agents. At NICAR 2026, he presented a three-hour workshop demonstrating Claude Code and Codex CLI for data analysis, web scraping, and data cleaning tasks — emphasizing that coding agents are now practical tools for non-software-engineers.
Source: simonwillison.net/tags/ai-assisted-programming and NICAR 2026 workshop materials.
HC
Harrison Chase
@hwchase17
Chase has emphasized that "when agents mess up, they mess up because they don't have the right context." He argues that context engineering — bringing the right information in the right format to the LLM at the right time — is the new moat for coding agents. LangChain released "Deep Agents" in March 2026, built on LangGraph, with virtual filesystem access and code execution capabilities.
Source: Sequoia Capital "Training Data" podcast, and LangChain March 2026 newsletter.
Platform Deep-Dive

How the Big Four Implement Code Agents

Dimension Claude Code OpenAI Codex CLI Gemini Code Assist Devin 2.0
Architecture Terminal-native agent with tool layer (Read, Edit, Bash, Grep, Glob). Plugin system for extensions. Rust CLI with sandboxed execution. Minimal, Unix-philosophy design. Open-source (Apache 2.0). IDE-integrated agent mode in VS Code/IntelliJ. Uses Gemini 3.1 with "Finish Changes" auto-completion. Cloud IDE with browser, terminal, editor. Multi-agent dispatch. Auto-generates repo wikis.
Model Claude Opus 4.6 / Sonnet 4.6. Extended thinking for complex reasoning. GPT-5.2-Codex (default), o3, o4-mini. codex-mini for low-latency Q&A. Gemini 3.1 with agent mode. Free tier available for individual developers. Custom-trained models. Devin 2.0 (April 2025) added multi-agent and auto-indexing.
Edit format Search-and-replace (old_string/new_string). CLAUDE.md for project context. Unified diff format. Sandboxed — changes are proposed before applied. "Outlines" show high-level summaries; Agent Mode proposes a plan before editing. Full file writes in cloud IDE. Immediate linting and test execution.
Codebase understanding Reads project structure, CLAUDE.md context files. Grep/Glob for search. ~200K token context. Repository-aware with file tree indexing. Optimized for low-latency repo Q&A. Language server integration (types, references). "Finish Changes" reads your in-progress edits. Auto-indexes repos every few hours. Generates architecture diagrams and wikis.
Differentiator Deepest context window. Composable (pipe logs in, run in CI). Skills/plugins ecosystem. Speed (Rust-native), open-source, minimalist. GitHub Action for CI integration. Free tier, deep IDE integration, language server awareness. Enterprise via Google Cloud. Fully autonomous — runs parallel Devins. Most "hire and forget" experience for delegated tasks.
Vocabulary

Terms That Signal Expertise

ACI
Agent-Computer Interface. A purpose-built command set that mediates between the LLM and the development environment. Coined by the SWE-agent paper. The design of the ACI (what commands exist, what feedback they return) is often more impactful than model choice.
Avoid: confusing ACI with API. ACI is specifically about the agent's tool interface, not the model's HTTP API.
"Their ACI includes a scroll_up command that shows 100 lines with line numbers — that's why the model can reference exact line ranges."
Fault localization
The process of identifying which files, classes, and lines in a codebase are responsible for a bug or need modification. This is the #1 predictor of code agent success. Both agent-based (explore-and-narrow) and agentless (hierarchical LLM queries) approaches exist.
Avoid: saying "the agent finds the bug." Localization is specifically about where, not about understanding what is wrong.
"Agentless uses three-pass hierarchical localization: file-level, then class-level, then line-level."
SWE-bench
The standard benchmark for evaluating code agents. Contains 2,294 real GitHub issues from 12 popular Python repos (Django, scikit-learn, Flask, etc.). "SWE-bench Lite" is a curated 300-issue subset. "SWE-bench Verified" has human-verified solvability. Scores are expressed as resolve rate (% of issues correctly fixed).
Avoid: treating SWE-bench scores as general coding ability. It only measures Python bug-fixing in specific OSS projects.
"Their agent hits 72% on SWE-bench Verified, but that's Python-only — repo-level TypeScript is a very different challenge."
Repo map
A compressed structural summary of a repository: file tree, class/function signatures, import relationships. Used to give the LLM a "table of contents" of the codebase without consuming the entire context window. SWE-agent and Aider both generate repo maps automatically.
"The repo map fits in 4K tokens and gives the model enough structure to know which file likely contains the auth middleware."
Agentic engineering
Term coined by Andrej Karpathy (2026) for the discipline of working with coding agents effectively. Core skills: intent specification (writing clear task descriptions), task decomposition (breaking work into agent-sized chunks), and fast review (quickly verifying agent output). Positioned as the successor to "vibe coding."
Avoid: using "vibe coding" and "agentic engineering" interchangeably. Vibe coding is the casual, exploratory use; agentic engineering is the disciplined, production-grade practice.
"We're training the team on agentic engineering — how to write specs that agents can execute, and how to review PRs at 10x speed."
Context engineering
The practice of assembling the right information, in the right format, at the right time for an LLM. For code agents, this means selecting which files, documentation, test outputs, and error messages to include in the prompt. Harrison Chase argues this is the primary differentiator between agents that work and agents that fail.
"Our context engineering pipeline retrieves the failing test, the function under test, and the most recent commit that touched it — that's usually enough for the agent to fix it."
Search-and-replace edit
An edit format where the model specifies an exact old_string to find and a new_string to replace it with. Used by Claude Code and Aider. More precise than full-file rewrites (saves tokens, preserves untouched code) but requires the model to reproduce the old code exactly, including whitespace.
"Claude Code uses search-and-replace so it only sends the diff, not the whole file — that's why edits are fast even in large files."
Resolve rate
The primary metric for code agents on SWE-bench: the percentage of GitHub issues the agent successfully resolves (i.e., produces a patch that passes the issue's test suite). Current SOTA is above 70% on SWE-bench Verified.
Avoid: confusing resolve rate with "lines of code written" or "patches generated." An agent might generate many patches but only resolve a few issues.
"Their resolve rate jumped from 45% to 62% just by improving the localization step — the model was already good at writing fixes once pointed to the right code."
Sandboxed execution
Running agent-generated code in an isolated environment (Docker container, VM, or restricted shell) so it cannot damage the host system, exfiltrate data, or consume unlimited resources. Codex CLI and Claude Code both enforce sandboxing by default. Critical for production safety.
"Codex CLI runs every command in a sandbox — if the agent tries to rm -rf /, it only affects the container."
CLAUDE.md
A project-level context file read by Claude Code at startup. Contains project conventions, architecture notes, build commands, and coding standards. Functions as a "briefing document" that gives the agent institutional knowledge about the codebase. Analogous to Cursor's .cursorrules or Codex's codex.md.
"We put our API conventions, test patterns, and deployment notes in CLAUDE.md — now the agent follows our patterns instead of inventing its own."
Expert Questions

Questions That Signal Deep Understanding

Q1
"Agentless achieves competitive SWE-bench scores at $0.70/issue versus $4+ for agentic systems. At what task complexity threshold does the agentic approach start to justify its 5-10x cost premium — and how would you measure that threshold?"
Q2
"SWE-agent showed that ACI design matters more than model choice. If you were designing an ACI for a polyglot monorepo (Python + TypeScript + Go), what commands would you add beyond the standard file/search/edit set?"
Q3
"Code agents that rely on search-and-replace edits need the model to reproduce existing code exactly. How does this constraint interact with model temperature settings, and what happens when the target code contains unusual formatting or non-ASCII characters?"
Q4
"Karpathy says agentic engineering skills are 'intent specification, task decomposition, and fast review.' But current SWE-bench doesn't test any of these human-agent interaction skills. What would a benchmark for agentic engineering look like?"
Q5
"Devin auto-generates architecture wikis from codebases. Claude Code uses CLAUDE.md context files. Codex CLI uses codex.md. Are we converging on a standard for 'agent-readable project documentation,' and should it be a new file format or an extension of existing formats like README?"
CGO Lens

Business Implications for botlearn.ai

Product Strategy

Sales Positioning

Competitive Intelligence

Curriculum

17-Day Learning Path

Day 01 Full Agent Stack
Day 02 Memory Architecture
Day 03 Planning & Tool Use
Day 04 RAG Deep Dive
Day 05 Agent Frameworks
Day 06 Benchmarks & Eval
Day 07 Multi-Agent Systems
Day 08 Computer Use Agents
Day 09 Code Agents
Day 10 Long-Horizon Tasks
Day 11 Agent Safety
Day 12 Agent Economics
Day 13 Research Frontiers
Day 14 OpenClaw Deep-Dive
Day 15 A2A Protocols
Day 16 Agentic Commerce
Day 17 Synthesis