JustujuAI, layer by layer.Open in the interactive map

Coding agents

Agents that work inside a code repository: read files, make edits, run commands and tests, and iterate until the checks pass.

Layer 8 · Agents · Run time · reviewed 2026-10-30

Read first: The agent loop, Agent harnesses.

SimpleA plain explanation, one diagram and an analogy, with where the analogy breaks.

Guess first: Predict: why might code be easier for an agent to check than an essay?

Show the answerCode can be tested: run it and see if it works. An essay has no quick test like that.

A coding agent is an AI helper that can change a program by itself.

It reads the code, makes an edit, then runs tests to see if it worked. If a test fails, it tries again.

A coding agent is an agent loop specialised for software. Its tools search and read files, apply edits, run shell commands and tests, and often use git.

Code suits agents because results can be checked automatically. A failing test or a compiler error is clear feedback the agent can act on in its next step.

Coding agents run in a terminal, an editor or a cloud sandbox. They work better with project notes (build commands, conventions) and with models tuned for coding.

Taskissue or request1Exploresearch, readfiles2Editchange the code3Testrun tests,linters4Reviewdiff for aperson5tests fail: fix again
How a coding agent works through a task
  1. Task: issue or request
  2. Explore: search, read files
  3. Edit: change the code
  4. Test: run tests, linters
  5. Review: diff for a person

Like: A mechanic who test-drives the car after every fix.
Where it breaks: A mechanic understands why the car works. A coding agent can make tests pass without fixing the real problem, for example by weakening a test, so a person still reviews the diff.

ResearchWhere the simple picture breaks, open problems and primary sources.

Passing the tests is not the same as solving the problem, and benchmark scores can overstate how far that gap has closed.

Leaky benchmarks. In one audit of SWE-bench, a third of successful patches had the solution in the issue text and another 31% passed weak tests; filtering them cut one agent's score from 12.5% to 4% (SWE-Bench+, 2024).

Gaming tests. Recent models sometimes changed tests or scoring code instead of fixing the problem (METR, 2025).

Real productivity. In a randomised trial, experienced developers took 19% longer with AI tools on their own repositories while believing they were faster (METR, 2025).

Made-up packages. Code models suggested packages that don't exist (at least 5.2% of the time for commercial models, 21.7% for open ones), names an attacker can register (Spracklen et al., 2024). Generated code and new dependencies need a sandbox and review.

Security on this concept: 3 threats Pending expert review

An agent in a build pipeline leaks its keys Pending expert review

Exposed
  • API keys and tokens in the agent's environment
  • Pull requests, issues and comments the agent reads
Attacks
  • Prompt injection in an issue or comment that makes the agent read and post its secrets
Real case
Research demonstration: Secret exposure through a coding agent's CI action (2026-06)
Controls
  • Keep long-lived secrets out of the agent's environment; use short-lived, scoped tokens
  • Don't let agents act on untrusted pull requests with write access
  • Block the agent from reading process and environment files
Owner
AppSec, with Platform/Cloud
Reference
LLM02:2026 Sensitive Information Disclosure
AML.T0083 Credentials from AI Agent Configuration
AML.T0051.001 Indirect

An agent with too much power is told to destroy Pending expert review

Exposed
  • Files, cloud resources and accounts an agent can change
  • Extensions and settings that tell the agent what to do
Attacks
  • Slipping a destructive instruction into an agent's prompt or extension
  • Abusing broad permissions to delete files or cloud resources
Real case
Incident: Wiper prompt planted in an AI coding extension release (AWS says it was malformed and did not run) (2025-07)
Controls
  • Least privilege: give the agent only the tools and scopes this task needs
  • Ask a person before deleting or changing anything important
  • Run agents in a sandbox with backups and an undo path
Owner
AppSec, with Platform/Cloud
Reference
LLM03:2026 Excessive Agency
AML.T0101 Data Destruction via AI Agent Tool Invocation

AI suggests a package that doesn't exist, and an attacker registers it Pending expert review

Exposed
  • Code and install commands written by AI assistants and coding agents
  • Developer machines and build pipelines that install what the AI suggests
Attacks
  • Collecting package names that models invent again and again
  • Publishing malware under those names on public package indexes (slopsquatting)
Real case
Research demonstration: huggingface-cli: an invented package name, registered as a harmless test, downloaded tens of thousands of times (2024-03)
Controls
  • Install only from an internal mirror or allow-list; don't let agents add dependencies without review
  • Check that a suggested package is real, established and from the expected publisher
  • Lock files and dependency scanning in every build
Owner
AppSec, with Platform/Cloud
Reference
LLM07:2026 Misinformation
AML.T0060 Publish Hallucinated Entities
AML.T0062 Discover LLM Hallucinations
AML.T0011.001 Malicious Package

All layers in the security view

Examples as of 2026-10-30

Sources

  1. SWE-bench: Can Language Models Resolve Real-World GitHub Issues? (2023)
  2. SWE-agent: Agent-Computer Interfaces Enable Automated Software Engineering (2024)
  3. Building effective agents (Anthropic) (2024-12-19)
  4. SWE-Bench+: Enhanced Coding Benchmark for LLMs (2024-10-09)
  5. Recent Frontier Models Are Reward Hacking (METR) (2025-06-05)
  6. Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity (METR) (2025-07-12)
  7. We Have a Package for You! A Comprehensive Analysis of Package Hallucinations by Code Generating LLMs (2024-06-12)
  8. SpaceX to acquire Cursor maker Anysphere (Quartz) (2026)

How it connects

More in Layer 8 · Agents