AI Agents 101 | 13. Coding Agents as a Case Study
Coding Agents as a Case Study
Coding agents are the clearest case study for agentic AI because the work is concrete.
They read files, inspect repositories, edit code, run tests, handle errors, create patches, reason over logs, and sometimes open pull requests. The environment gives feedback. The result can often be checked. The failure modes are visible.
That makes coding agents an excellent lens for understanding agents in general.
Level 1: Fundamentals
OpenAI's Codex docs describe AGENTS.md files as a way to provide repository-specific instructions that Codex reads before working, with nested files able to override broader guidance [1]. Anthropic's Claude Code docs describe an agentic coding tool that reads codebases, edits files, runs commands, integrates with developer tools, and works across terminal, IDE, desktop, and web surfaces [2].
Those two examples show the core pattern:
developer goal
-> repository context
-> agent plan
-> file/tool actions
-> tests and inspection
-> patch or explanation
Coding agents combine several agent capabilities at once:
- context retrieval from files
- memory through project instructions
- shell and test tools
- structured edits
- browser or docs lookup
- subagents or parallel exploration
- human approval for risky commands
- evaluation through tests
Anthropic's memory docs make a useful point for coding agents: instruction files and auto memory are loaded as context, but they are not hard enforcement; hard constraints need hooks, tools, permissions, or runtime checks [3].
The Hitchhiker guide treats coding agents as a practical expression of the full stack: context management, tools, harnesses, evals, and UI all appear in one workflow [7].
Level 2: Concepts
A coding agent has unusual advantages.
| Advantage | Why It Matters |
|---|---|
| inspectable environment | files, tests, diffs, and logs can be checked |
| executable feedback | tests and commands create ground truth |
| structured artifacts | patches and commits are reviewable |
| local conventions | repo instructions can guide behavior |
| reversible workflow | branches and diffs make many changes recoverable |
It also has unusual risks.
| Risk | Example |
|---|---|
| destructive tools | deleting files, changing dependencies, running scripts |
| hidden context | missing project conventions or generated files |
| test overfitting | making tests pass while breaking intent |
| environment mismatch | local pass, CI fail |
| dependency risk | installing or updating packages carelessly |
| parallel conflicts | subagents editing same files |
Instructions
Coding agents need layered instructions:
- global user preferences
- organization policy
- repository
AGENTS.mdor equivalent - nested directory guidance
- task-specific request
- tool and sandbox rules
The project file is crucial because codebases have local norms: package manager, test command, architecture boundaries, style, generated files, deployment rules, and review expectations.
Tools
Coding-agent tools often include:
- filesystem read/write
- search
- shell
- git
- test runner
- browser/docs
- package manager
- formatter/linter
- image or UI inspection
The model should not have unconstrained execution just because it is writing code. Commands can be destructive, slow, networked, or secret-exposing.
Subagents
OpenAI Codex subagents can explore in parallel, run focused investigations, inspect logs, or analyze tests while keeping the main context cleaner [4]. The best first use is read-heavy work: "inspect the auth module," "summarize failing tests," or "compare migration patterns." Parallel write-heavy edits need stricter coordination.
Level 3: Engineering Detail
A coding-agent loop should optimize for inspectable changes.
Runbook
1. Read task and applicable project instructions.
2. Inspect relevant files before editing.
3. Form a short plan when the change is non-trivial.
4. Edit narrowly.
5. Run targeted tests or checks.
6. Inspect failures and iterate.
7. Summarize changed files and verification.
8. Avoid unrelated cleanup.
This may look mundane. It is also exactly what makes coding-agent work reviewable.
Patch Contract
{
"task": "fix login redirect loop",
"files_touched": [
"src/auth/redirect.ts",
"src/auth/redirect.test.ts"
],
"tests_run": [
"pnpm test src/auth/redirect.test.ts"
],
"behavior_changed": "Unauthenticated users now return to the originally requested path after login.",
"risk": "low",
"followups": []
}
Every coding-agent result should be able to answer: what changed, why, how was it checked, and what risk remains?
Tool Permissions
| Tool | Default Policy |
|---|---|
| read file | allow within workspace |
| write file | allow within task scope |
| run tests | allow |
| install packages | ask or require policy |
| network command | ask or require policy |
| delete files | require explicit reason |
| git reset/checkout | require explicit user request |
| deploy | require approval |
This is where runtime safety meets developer trust.
Evaluation
Coding agents have unusually strong eval options. Anthropic's evals guidance points to coding tasks where tests, static analysis, state checks, tool-call checks, and rubrics can be combined [6].
Useful coding-agent evals include:
- fail-to-pass tests
- pass-to-pass regression tests
- lint/type/security checks
- diff-quality rubric
- tool trajectory checks
- no-unrelated-changes check
- dependency-change review
- benchmark task suites
Ecosystem Studies
Recent research is starting to treat coding agents as an ecosystem rather than isolated products. An arXiv study of agentic coding-tool harness engineering found that context files dominate configuration practice and that AGENTS.md is emerging as an interoperable pattern across tools [5]. Another 2026 arXiv analysis of Claude Code's design space discusses common agent-system elements such as loops, permissions, compaction, MCP, plugins, skills, hooks, subagents, and session storage [8].
Use such studies as secondary sources. Product behavior should still be checked against official docs when making current claims.
Current Landscape
Coding agents now span terminal, IDE, web, background, and automation surfaces.
OpenAI Codex exposes project instruction files and subagents as part of a broader coding workflow [1][4]. Anthropic Claude Code emphasizes reading codebases, editing files, running commands, integrating with tools, and operating across developer surfaces [2].
The important trend is not one product feature. It is the convergence around an agentic coding loop:
repo context + tools + shell feedback + tests + patch artifact + human review
That loop is a compact version of agent engineering overall.
Practical Takeaways
Use coding agents to learn agent architecture. The environment is observable, the artifacts are concrete, and tests provide feedback.
Put repository guidance in durable instruction files. Do not rely on hidden memory for mandatory project rules.
Keep edits narrow. The best coding-agent output is easy to review.
Run relevant checks. If tests cannot be run, say so and explain residual risk.
Use subagents for focused exploration before parallel edits. Context isolation is helpful; write conflicts are real.
Treat shell and package commands as high-leverage tools. Permission and sandbox rules are part of product design.
References
[1] "AGENTS.md." OpenAI Codex documentation. https://developers.openai.com/codex/guides/agents-md. Published/updated: not listed. Accessed: 2026-07-06. Used for: repository instruction files, nested guidance, and project-level coding-agent context.
[2] "Claude Code overview." Anthropic Claude Code documentation. https://code.claude.com/docs/en/overview. Published/updated: not listed. Accessed: 2026-07-06. Used for: coding-agent surfaces, file edits, command execution, developer-tool integration, MCP, skills, hooks, and background work.
[3] "Memory." Anthropic Claude Code documentation. https://code.claude.com/docs/en/memory. Published/updated: not listed. Accessed: 2026-07-06. Used for: CLAUDE.md, auto memory, persistent instructions, and the distinction between context and enforcement.
[4] "Subagents." OpenAI Codex documentation. https://developers.openai.com/codex/concepts/subagents. Published/updated: not listed. Accessed: 2026-07-06. Used for: parallel specialized coding agents, context isolation, read-heavy exploration, and caution about write-heavy parallelism.
[5] "Harness Engineering for Agentic AI Coding Tools: An Exploratory Study." Matthias Galster, Seyedmoein Mohsenimofidi, Jai Lal Lulla, Muhammad Auwal Abubakar, Christoph Treude, Sebastian Baltes. https://arxiv.org/abs/2602.14690. Published/updated: 2026-06-30. Accessed: 2026-07-06. Used for: research context on configuration files, AGENTS.md, skills, subagents, and multi-tool coding-agent configuration.
[6] "Demystifying evals for AI agents." Anthropic. https://www.anthropic.com/engineering/demystifying-evals-for-ai-agents. Published/updated: 2026-01-09. Accessed: 2026-07-06. Used for: coding-agent evals, deterministic tests, static analysis, tool-call checks, and model-based rubrics.
[7] "The Hitchhiker's Guide to Agentic AI: From Foundations to Systems." Haggai Roitman. Local source: agent-101/The Hitchhiker’s Guide to Agentic AI/book.tex. Published/updated: 2026. Accessed: 2026-07-06. Used for: coding agents as integrated examples of context, memory, tools, harnesses, evaluation, and UI.
[8] "Dive into Claude Code: The Design Space of Today's and Future AI Agent Systems." Jiacheng Liu, Xiaohan Zhao, Xinyi Shang, Zhiqiang Shen. https://arxiv.org/abs/2604.14228. Published/updated: 2026-07-02. Accessed: 2026-07-06. Used for: secondary research context on agent loops, permissions, compaction, MCP, plugins, skills, hooks, subagents, and session storage.
Enjoy Reading This Article?
Here are some more articles you might like to read next: