7 ms·
Components of a Coding Agent
- nareyko 6mo ago[dead]
- armcat 6mo agoI still find it incredible at the power that was unleashed by surrounding an LLM with a simple state machine, and giving it access to bash
- esafak 6mo agoTools gave humans the edge over other animals.
- stanleykm 6mo agounfortunately all the agent cli makers have decided that simply giving it access to bash is not enough. instead we need to jam every possible functionality we can imagine into a javascript “TUI”.
- HarHarVeryFunny 6mo agoIf all you want is a program that calls the model in a loop and offers a bash tool, then ask Claude Code to build that. You won't like it though! For a preview of what it'd be like, just tell your AI chat app that you'll run bash commands for it, and please change the app in your "current directory" to "sort the output before printing it", or some such request.
- Yokohiii 6mo agoI think you get him wrong? He is already concerned about "bash on steroids" and current tools add concerning amounts of steroids to everything.
- stanleykm 6mo agoi did.. and thats what i use. obviously its a little more than just a tool that calls bash but it is considerably less than whatever they are doing in coding agents now.
- senko 6mo agoClaude Code with Opus 4.6 regularly uses sed for multi-line edits, in my experience. On top of it, Pi is famously only exposing 4 tools, which is not just Bash, but far more constrained than CCs 57 or so tools. So, yes, it can work.
- HarHarVeryFunny 6mo agoI think the problem/limitation would be as much due to context management as tools. Obviously bash plus a few utilities is sufficient to explore/edit the code base, but I can't imagine this working reliably without the models being specifically trained to use specific tools, and recognize/adapt to different versions of them etc. Context management, both within and across sessions, seems the bigger issue. Without the agent supporting this, you are at the mercy of the model compacting/purging the context as needed, in some generic fashion, as well as being smart enough to decide to create notes for itself tracking what it is doing, etc. Apparently CC is 512K LOC, which seems massively bloated, but I do think that things like tools, skills, context management and subagents are all needed to effectively manage context and avoid the issues that might be anticipated by just telling the model it's got a bash tool, and go figure.
- stanleykm 6mo agoYou don’t really need most of that stuff. Have sensible steering files. Have the agent keep state itself. Dont bother compacting. Its fine.
- HarHarVeryFunny 6mo agoAt it's heart it's prompt/context engineering. The model has a lot of knowledge baked into it, but how do you get it out (and make it actionable for a semi-autonomous agent)? ... you craft the context to guide generation and maintain state (still interacting with a stateless LLM), and provide (as part of context) skills/tools to "narrow" model output into tool calls to inspect and modify the code base. I suspect that more could be done in terms of translating semi-naive user requests into the steps that a senior developer would take to enact them, maybe including the tools needed to do so. It's interesting that the author believes that the best open source models may already be good enough to complete with the best closed source ones with an optimized agent and maybe a bit of fine tuning. I guess the bar isn't really being able to match the SOTA model, but being close to competent human level - it's a fixed bar, not a moving one. Adding more developer expertise by having the agent translate/augment the users request/intent into execution steps would certainly seem to have potential to lower the bar of what the model needs to be capable of one-shotting from the raw prompt.
- Serberus 6mo ago[dead]
- Yokohiii 6mo agoThat is why I am currently looking into building my own simple, heavily isolated coding agent. The bloat is already scary, but the bad decisions should make everyone shiver. Ten years ago people would rant endlessly about things with more then one edge, that requires a glimpse of responsibility to use. Now everyone seems to be either in panic or hype mode, ignoring all good advice just to stay somehow relevant in a chaotic timeline.
- emp17344 6mo agoIf you saw the Claude Code leak, you’d know the harness is anything but simple. It’s a sprawling, labyrinthine mess, but it’s required to make LLMs somewhat deterministic and useful as tools.
- xstas1 6mo agoHypothesis: it's a sprawling, labyrinthine mess because it was grown at high speed using Claude Code.
- emp17344 6mo agoThere’s a lot of redundancy, because there has to be to make the system useful. It’s a hacked together mess.
- efromvt 6mo agoIt's pretty easy to get determinism with a simple harness for a well-defined set of tasks with the recent models that are post-trained for tool use. CC probably gets some bloat because it tries to do a LOT more; and some bloat because it's grown organically.
- emp17344 6mo ago>It's pretty easy to get determinism with a simple harness for a well-defined set of tasks with the recent models that are post-trained for tool use. Do you have a source? Claude Code is the only genetic system that seems to really work well enough to be useful, and it’s equipped with an absolutely absurd amount of testing and redundancy to make it useful.
- efromvt 6mo agoShould I read that as 'generic system'? Most hard data is with company internal evals, but for the well defined tasks externally it's been pretty easy to spin up a basic tool loop and validate. Did you have something in mind? [I don't necessarily count 'coding' as well-defined in the generic sense, so I suspect we're coming at this from different scopes re: the definition of 'LLMs somewhat deterministic and useful as tools']
- alfiedotwtf 6mo agoI found replacing bash with python to be more useful… that way, it can craft whatever it desires without having to pipe a billion pieces of gum together
- agdexai 6mo ago[dead]
- MrScruff 6mo ago> This is speculative, but I suspect that if we dropped one of the latest, most capable open-weight LLMs, such as GLM-5, into a similar harness, it could likely perform on par with GPT-5.4 in Codex or Claude Opus 4.6 in Claude Code. Unless I'm misunderstanding what's being described here, running Claude Code with different backend models is pretty common. https://docs.z.ai/scenario-example/develop-tools/claude https://docs.z.ai/scenario-example/develop-tools/claude It doesn't perform on par with Anthropic's models in my experience.
- kamikazeturtles 6mo ago> It doesn't perform on par with Anthropic's models in my experience. Why do you think that is the case? Is Anthropic's models just better or do they train the models to somehow work better with the harness?
- MrScruff 6mo agoIt's a good question, I've wondered that myself. I haven't used GLM-5 with CC but I've used GLM-4.7 a fair amount, often swapping back and forth with Sonnet/Opus. The difference is fairly obvious - on occasions I've mistakenly left GLM enabled running when I thought I was using Sonnet, and could tell pretty quickly just based on the gap in problem solving ability.
- mmargenot 6mo agoIt is more common now to improve models in agentic systems "in the loop" with reinforcement learning. Anthropic is [very likely] doing this in the backend to systematically improve the performance of their models specifically with their tools. I've done this with Goose at Block with more classic post-training approaches because it was before RL really hit the mainstream as an approach for this. If you want to look at some of the tooling and process for this, check out verifiers (https://github.com/PrimeIntellect-ai/verifiers https://github.com/PrimeIntellect-ai/verifiers), hermes (https://github.com/nousresearch/hermes-agent https://github.com/nousresearch/hermes-agent) and accompanying trace datasets (https://huggingface.co/datasets/kai-os/carnice-glm5-hermes-traces https://huggingface.co/datasets/kai-os/carnice-glm5-hermes-t...), and other open source tools and harnesses.
- crustycoder 6mo agoA timely link - I've just spent the last week failing to get a ChatGPT Skill to produce a reproducible management reporting workflow. I've figured out why and this article pretty much confirms my conclusions about the strengths & weaknesses of "pure" LLMS, and how to work around them. This article is for a slightly different problem domain, but the general problems and architecture needed to address them seem very similar.
- beshrkayali 6mo ago> long contexts are still expensive and can also introduce additional noise (if there is a lot of irrelevant info) I think spec-driven generation is the antithesis of chat-style coding for this reason. With tools like Claude Code, you are the one tracking what was already built, what interfaces exist, and why something was generated a certain way. I built Ossature[1] around the opposite model. You write specs describing behavior, it audits them for gaps and contradictions before any code is written, then produces a build plan toml where each task declares exactly which spec sections and upstream files it needs. The LLM never sees more than that, and there is no accumulated conversation history to drift from. Every prompt and response is saved to disk, so traceability is built in rather than something you reconstruct by scrolling back through a chat. I used it over the last couple of days to build a CHIP-8 emulator entirely from specs[2]. I have some more example projects on GitHub[3] 1: https://github.com/ossature/ossature https://github.com/ossature/ossature 2: https://github.com/beshrkayali/chomp8 https://github.com/beshrkayali/chomp8 3: https://github.com/ossature/ossature-examples https://github.com/ossature/ossature-examples
- Yokohiii 6mo agoI like it a lot, I find the chat driven workflow very tiring and a lot of information gets lost in translation until LLMs just refuse to be useful. How does the human intervention work out? Do you use a mix of spec and audit editing to get into the ready to generate state? How high is the success/error rate if you generate from tasks to code, do LLMs forget/mess up things or does it feel better? The spec driven approach is potentially better for writing things from scratch, do you have any plans for existing code?
- beshrkayali 6mo agoThanks! > How does the human intervention work out? Do you use a mix of spec and audit editing to get into the ready to generate state? Yes, the flow is: you write specs then you validate them with `ossature validate` which parses them and checks they are structurally sound (no LLM involved), then you run `ossature audit` which flags gaps or contradictions in the content as INFO, WARNING, or ERROR level findings. The audit has its own fixer loop that auto-resolves ERROR level findings, but you can also run it interactively, manually fix things yourself, address the INFO and WARNING findings as you see fit, and rerun until you are happy. From that it produces a toml build plan that you can read and edit directly before anything is generated. You can reorder tasks, add notes for the LLM, adjust verification commands, or skip steps entirely. So when you run `ossature build` to generate, the structure is already something you have signed off on. There's a bit more details under the hood, I wrote more in an intro post[1] about Ossature, might be useful. > The spec driven approach is potentially better for writing things from scratch, do you have any plans for existing code? Right now it is best for greenfield, as you said. I have been thinking about a workflow where you generate specs from existing code and then let Ossature work from those, but I am honestly not sure that is the right model either. The harder case is when engineers want to touch both the code and the specs, and keeping those in sync through that back and forth is something I want to support but have not figured out a clean answer for yet. It's on the list, if you have any thoughts please feel free to open an issue! I want to get through some of the issues I am seeing with just spec editing workflow (and re-audit/re-planning) first, specifically around how changes cascade through dependent tasks. Regarding success rate, each task requires a verification command to run and pass after generation and if it fails, a separate fixer agent tries to repair it using the error output. The number of retry attempts is configurable. I did notice that the more concise and clear the spec is the more likely it is for capable models to generate code that works (obviously) but that's what auditing is supposed to help with. One interesting case about the chip-8 emulator I mentioned above is that even mentioning the correct name of the solution to a specific problem was not enough, I had to spell out the concrete algorithm in the spec (wrote more details here[2]). But the full prompt and response for every task is saved to disk, so when something does go wrong one can read the exact prompt/response and fix-attempts prompt/response for each task. 1: https://ossature.dev/blog/introducing-ossature/ https://ossature.dev/blog/introducing-ossature/ 2: https://log.beshr.com/chip8-emulator-from-spec/ https://log.beshr.com/chip8-emulator-from-spec/
- Yokohiii 6mo agoThe example is really lean and straightforward. I don't use coding agents, but this is some good overview and should help everyone to understand that coding agents may have sophisticated outcomes, but the raw interaction isn't magical at all. It's also a good example that you can turn any useful code component that requires 1k LOC into a mess of 500k LOC.
- Adam_cipher 6mo ago[flagged]
- aplomb1026 6mo ago[dead]
- zbyforgotpass 6mo agoIsn't there a better word than harness? I understand the metaphor of leading and constraining a raw power - but I don't like it.
- sweetjuly 6mo agoWhat's the concern? Harness tends to be fairly common in the context of "shim program which manages some other program" (see: "test harness", "fuzzing harness", etc.)
- paradite 6mo agoIt’s just a fancy way of saying scaffolding.
- arcanemachiner 6mo agoPerhaps you would care to propose an alternative?
- zbyforgotpass 6mo agoMy favorite would be llm runtime.
- addandsubtract 6mo agoIt's kinda ironic that everything has become an "app" over the past 10 years. Facebook is an "app", Reddit is an "app", your bank is an "app". However, the one time we actually introduce an app to execute our LLM calls, we don't call it an "app"? Wat.
- jeremie_strand 6mo ago[dead]
- ryguz 6mo ago[dead]
- IceWreck 6mo ago> This is speculative, but I suspect that if we dropped one of the latest, most capable open-weight LLMs, such as GLM-5, into a similar harness, it could likely perform on par with GPT-5.4 in Codex or Claude Opus 4.6 in Claude Code. People have been doing that for over a year already? GLM officially recommends plugging into Claude Code https://docs.z.ai/devpack/tool/claude https://docs.z.ai/devpack/tool/claude and any model can be plugged into Codex CLI (it's open source and can be set via config file).
- girvo 6mo agoAnd while it’s not Opus level, it is incredibly good. I use it basically exclusively (and qwen3.5-plus) on my personal projects.
- redoh 6mo ago[flagged]
- rbren 6mo agoStrong article! I’ve been using the engine/car analogy for a while now. If you want to play with the basic building blocks of coding agents, check out https://github.com/OpenHands/software-agent-sdk https://github.com/OpenHands/software-agent-sdk
- hsaliak 6mo agoTool output truncation helps a lot and is one of the best ways to reduce context bloat. In my coding agent the context is assembled from SQLite. I suffix the message ID to rehydrate the truncated tool call if it’s needed and it works great. My exploration on context management is mostly documented here https://github.com/hsaliak/std_slop/blob/main/docs/CONTEXT_MANAGEMENT.md https://github.com/hsaliak/std_slop/blob/main/docs/CONTEXT_M...
- clawfund 6mo ago[flagged]
- techpulselab 6mo ago[dead]
- volume_tech 6mo ago[dead]
- gburgett 6mo agoLoved this writeup. I have built an agent for a specific niche use case for my clients (not a coding agent) but the principles are similar. ive only implemented 1-4 so far. Going to work on long term memory next, but I worry about prompt injection issues when allowing the LLM to write its own notes. Since my agent works over email, the core agent loop only processes one message then hits the send_reply tool to craft a response. Then the next incoming email starts the loop again from scratch, only injecting the actual replies sent between user and agent. This naturally prunes the context preventing the long context window problem. I also had a challenge deciding what context needs injecting into the initial prompt vs what to put into tools. Its a tradeoff between context bloat and cost of tool lookups which can get expensive paying per token. Theres also caching to consider here. Full writeup is here if anyone is interested: https://www.healthsharetech.com/blog/building-alice-an-empowering-ai-agent/ https://www.healthsharetech.com/blog/building-alice-an-empow...
- Sim-In-Silico 6mo ago[dead]
- apotheora 6mo agoCompounding is probably the break point, one agent's output is another agent's input, does the garbage in garbage out rule apply?
- maxbeech 6mo ago[dead]
- panavm 6mo ago[flagged]
- meidad_g 6mo ago[flagged]
- oortcrate_1 6mo agoTotally agree. Chat history feels like a side effect, not a source of truth. Having an explicit markdown file for goals and constraints has been a game changer for my workflow. It turns out you don't need a complex setup; you just need the agent to be explicit about what it’s doing and why.
- Imanari 6mo agoI will also leave this here https://github.com/shareAI-lab/learn-claude-code/tree/main/agents https://github.com/shareAI-lab/learn-claude-code/tree/main/a... I found it excellent in explaining a CC-like coding agent in layers.
- techpulselab 6mo ago[dead]
- LeonTing1010 6mo ago[flagged]
- alexclapp 6mo ago[dead]
- edinetdb 6mo ago[flagged]
- Asuka-wx 6mo agoThe useful framing here is that coding agents get better less from raw model gains and more from better scaffolding around the model. Once you give them tools, repo context, and a simple state machine, the bottleneck shifts to context qual
- FurstFly 6mo agoAwesome Read!!
- VoqalAI 6mo ago[dead]
- wei03288 6mo ago[dead]
- maxbeech 6mo ago[dead]
- Serberus 6mo ago[dead]
- bendusm 5mo ago[flagged]
- Bmello11 5mo ago[dead]