LLM Hub — Coding Agents Internals

Coding Agents Internals

How Cursor, Aider, Claude Code and Codex CLI understand a repository, manage context, use tools and delegate work — the heuristics, the diff formats, the cache mechanics and the architectural differences.

CursorAiderClaude CodeCodex CLITree-SitterDiffsTool UseSubagents

Foundations — how the agent reads and edits

  1. Repo Understanding →
    ripgrep heuristics that beat embeddings; tree-sitter ASTs; ctags & LSPs; code embeddings (when they help, when they don't); dependency graphs; Aider repo map, Cursor @-references, Claude Code heuristics.
    live
  2. Edit Strategies →
    Search-replace, unified diff, patch files; multi-file atomicity; context window management; Read/Edit/Write tool design; Aider vs Cursor vs Claude Code architectures; failure recovery.
    live

Companion to Sebastian Raschka — Components of a Coding Agent

A five-deck companion to Sebastian Raschka's essay, unpacking each of the six components — live repo context, prompt-cache reuse, tool access, context bloat, structured session memory, bounded subagents — with diagrams, code, and interactive visualisations. Read alongside the article.

  1. Components of a Coding Agent — Overview →
    Harness mental model; LLM vs reasoning model vs agent; the four-step observe → inspect → choose → act loop; the six-component architecture; why the harness can outweigh the model.
    live
  2. Live Repo Context & Prompt Cache →
    Components 1 + 2. Workspace summaries; stable-vs-changing prefix; Anthropic 5-min TTL cache mechanics; interactive cache-cost calculator; CLAUDE.md / AGENTS.md patterns.
    live
  3. Tool Access & Bounded Actions →
    Component 3. Prose vs bounded actions; tool-call anatomy; the four validation gates; approval modes; tool taxonomy; schema design; interactive approval-gate simulator with adversarial inputs.
    live
  4. Context Bloat & Structured Session Memory →
    Components 4 + 5. Clipping, dedup, recency-weighted summarisation; working memory vs full transcript; storage-time vs prompt-time discipline; live context-budget visualiser.
    live
  5. Bounded Subagents & Synthesis →
    Component 6 + closing synthesis. Spawn vs bind; sandboxing & recursion depth; Claude Code vs Codex models; pattern catalogue (research / parallel-edit / review / autonomous slice / planner-executor); interactive subagent-tree explorer; reading list.
    live