How AI Coding Agents Work and What You Should Know About Them

Ars Technica has published a detailed breakdown of how AI coding agents work, from Cursor and GitHub Copilot to Devin and Claude Code. The key mechanisms are context-window compression, chains of reasoning, and multi-agent architectures in which several models divide tasks among themselves. The outlet warns that agents can generate working code but are prone to hallucinations, can introduce vulnerabilities, and require mandatory human review. Understanding their inner workings is a necessity, not a luxury, for any developer.

AI-processed from Ars Technica; edited by Hamidun News
How AI Coding Agents Work and What You Should Know About Them
Source: Ars Technica. Collage: Hamidun News.
Listen to article

The programmer of 2025 increasingly writes code from scratch less often. They describe a task, launch an AI agent, and watch it generate dozens of files, refactor the architecture, and even run tests. Tools such as Cursor, GitHub Copilot Workspace, Devin, and Claude Code have gone in the past year from exotic experiments to everyday reality for hundreds of thousands of developers. But few users truly understand what happens under the hood. Ars Technica has published a detailed analysis of the internal mechanics of AI coding agents, and its conclusions deserve attention from anyone who trusts a machine with even part of their work.

The foundation of any coding agent is a large language model, whether GPT-4o, Claude 3.5 Sonnet, or Gemini. But the model alone is just an engine.

An agent is a whole layer of engineering built around it. The first and perhaps most critical problem agent developers must solve is the limited context window. Even for the most advanced models it is finite: 128 or 200 thousand tokens sounds impressive, but a real software project can contain millions of lines of code.

Agents cope through a set of tricks: they index the codebase, build semantic maps of the repository, retrieve only relevant fragments, and compress context by discarding what the model has already "processed." In essence, the agent acts as a smart librarian who brings the model exactly the books it needs to answer a specific question instead of dumping the whole library on the table.

The second key mechanism is chain-of-thought reasoning. Instead of generating an answer in one go, the agent breaks a complex task into sequential steps. First it analyzes the project structure, then drafts a plan of changes, then implements each step, checks the result and, if necessary, corrects course.

This is not merely a stylistic device: research shows that step-by-step reasoning dramatically reduces errors on complex tasks. Some agents go further and use a so-called multi-agent architecture: one model acts as the "architect" and decomposes the task, another writes code, a third handles review, and a fourth does testing. They communicate through structured prompts, imitating a real developer team.

This is how Devin from Cognition and a number of other advanced systems are built.

But behind the impressive demos lie serious limitations worth keeping in mind. The main one is hallucination. An agent can confidently use a nonexistent API, call functions with wrong arguments, or produce code that looks flawless but contains subtle logic errors. The problem is compounded by the fact that agents act autonomously: an early autocompleter like the first Copilot suggested a single line that the developer evaluated right away, whereas a modern agent can generate hundreds of lines across a dozen files. Reviewing that volume by hand is far from trivial, and the temptation to simply click "accept all" is strong.

Security is a separate headache. Studies have already documented cases in which AI agents introduced vulnerabilities into code, from SQL injections to unsafe handling of user input. The model optimizes code for "works," not "secure," and without explicit security requirements it may choose the simplest but insecure path. For teams working with sensitive data or financial systems, this is not an abstract risk but a concrete threat.

There is also a subtler effect that the industry is only beginning to recognize. When a developer relies on an agent to write a significant share of the code, they gradually lose a deep understanding of their own codebase. Machine-written code is often stylistically alien to the team, uses unfamiliar patterns, and is harder to debug. A paradox emerges: a tool meant to speed up development may slow down maintenance of the product in the long run.

None of this means AI agents should be abandoned. They do speed up routine tasks, help with learning unfamiliar frameworks, and lower the barrier to entry into programming. But they are best treated as a very capable but inexperienced intern: it can do a lot, yet every result needs review by a senior colleague. Understanding how exactly an agent makes decisions, how it compresses context, how it splits a task, and where its blind spots are is turning from academic curiosity into a practical skill. In a world where AI agents write more and more code, literacy in their mechanics is becoming as basic a developer competency as knowing Git or being able to read logs.

Story
ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Hands-On AI Engineering · Hamidun Academy

Build & Ship Production AI Agents Without Boilerplate Code

Start your free 72-hour trial at Hamidun Academy (academy.hamidun.com) — interactive lessons on Claude Code & Cursor, live Tech Radar, and production agent templates.

Start 72h Free Trial →Vibe-Coding Intensive
What do you think?
Loading comments…