What is a coding agent?
A coding agent is an AI agent that carries out a software task given in natural language step by step in a repository, reading files, writing code, running tests and fixing errors.
It differs from a code model in structure: a code model generates code, while a coding agent combines such a model with tool calling and multi-step planning to act in the repository. Vibe coding is a way of working; the coding agent is the system doing the work.
- Topic
- Agents and protocols
- Also known as
- Software engineering agent, code agent
How a coding agent works
- The agent receives the task and the repository context it may access; it searches and reads relevant files.
- It plans, edits code and runs build or test commands through a code execution tool.
- It fixes issues based on test results and error messages; the loop runs until the task is done or a limit is reached (agent loop).
- It presents changes and test results for review; where permitted it edits files directly.
In more detail
Tool interfaces: MCP, LSP and AST-based repository maps
Modern coding agents rely on structured tool interfaces such as the Model Context Protocol (MCP) and Language Server Protocol (LSP) alongside AST-based repository maps. Instead of loading entire repositories into context, they navigate symbol definitions, references and compiler diagnostics precisely.
Patch generation, loop limits and cost control
Rather than rewriting whole files, which risks silent deletions and high token costs, effective coding agents generate targeted unified diffs or search-and-replace patches. Paired with explicit step limits, token budgets and cycle detection, this helps limit runaway loops when a test failure cannot be resolved.
Indirect prompt injection and isolating secrets
Because coding agents ingest external GitHub issues, PR comments, dependency READMEs and build logs, they are exposed to indirect prompt injection. Sandboxing must therefore pair filesystem and network egress restrictions with strict secret isolation so credentials and tokens are never reachable from the agent environment.
SWE-bench Verified and enterprise agent evaluation
Agent capability is commonly measured on repository-level benchmarks such as SWE-bench Verified, which filters out underspecified tasks to test genuine end-to-end issue resolution. Enterprises complement public benchmarks with internal replay suites that track pass rate, iteration count and human rework time.
Commonly confused terms
| Term | How it differs |
|---|---|
| Computer-use agent | A coding agent operates in developer environments through code, terminal commands, LSPs and APIs; a computer-use agent interacts with arbitrary desktop or web applications visually through screenshots, mouse clicks and keystrokes. |
Why a coding agent matters for on-premises AI
It can lighten software teams' load on tests, documentation and repetitive maintenance. Because it runs commands, its rights stay narrow: it works in a sandbox with only permitted repositories, commands and limited network access. Its code is not written straight to production branches; it passes human review and automated security tests (insecure AI code generation). Run in-house, source code stays inside.
A telecoms company's software team uses a coding agent to update API documentation and write unit tests; every change is merged only after code review.
Common questions
Does a coding agent replace human code review?
No. Code it writes or changes still needs review and testing; the agent reduces preparation work but not responsibility.
Why run a coding agent in a sandbox?
Because it can run commands and change files, a faulty or prompt-injected step can cause damage. A sandbox, narrow rights and limited network access reduce that risk.
Related terms
Sources
- Jimenez et al., SWE-bench: Can Language Models Resolve Real-World GitHub Issues?, 2023
- Yang et al., SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering, 2024
In the glossary: Glossary, A to C