The Six Core Components of a Coding Agent
Summary
Sebastian Raschka presents a reference design for coding agents and the agent harnesses that surround language models. He distinguishes an LLM, a reasoning model, an agent loop, and a coding harness: the model generates responses, while the harness repeatedly observes the environment, selects actions, invokes tools, manages state, and feeds results back into the loop. The article argues that repository context, tool design, prompt-cache reuse, memory, and long-session continuity can make the same underlying model substantially more useful than it is in a plain chat interface. Using a from-scratch Python Mini Coding Agent as a concrete example, it identifies six components: live repository context; a stable prompt prefix with cache reuse; structured tools with validation and permissions; context reduction and output management; durable transcripts plus working memory; and bounded delegation to subagents. Repository summaries provide branch, layout, instructions, and project-state information before work begins. Stable instructions, tool descriptions, and workspace facts can be reused across turns, while requests and recent session state change more often. Tool calls should be named and structured, checked for valid arguments and workspace boundaries, and optionally gated by user approval before execution. Because repeated reads and logs cause context bloat, harnesses clip large outputs, deduplicate repeated file contents, preserve recent events in greater detail, and compress older history. The article separates a full resumable transcript from a smaller working-memory layer used for task continuity. Subagents can parallelize bounded investigations, but they need enough inherited context and limits on scope, permissions, and recursion. Raschka also contrasts specialized coding harnesses such as Claude Code and Codex with OpenClaw, which he describes as a broader local agent platform. He presents the claim that harness quality may strongly influence practical performance as partly speculative and notes that harness-specific post-training can still help.