More prompts won’t save you.
I’ve been building bots long enough to recognize the pattern. Something breaks in a multi-step agent workflow, and the instinct is to reach for the prompt. Add more instructions. Be more specific. Spell out every edge case in natural language and hope the model figures it out. I’ve done it. You’ve probably done it. And it almost never holds up past a certain level of complexity.
The real fix isn’t a better prompt. It’s control flow.
What Actually Goes Wrong
When an agent starts failing on complex tasks, the failure usually isn’t a misunderstanding of intent. The model knows what you want. The problem is that it’s being asked to manage too many decisions at once — sequencing, branching, error recovery, state tracking — all inside its own context window, guided only by text instructions.
That’s a fragile setup. A Hacker News discussion around the original “Agents need control flow, not more prompts” post captured this well: one developer described letting a model manage high-level control flow across a codebase refactor. It worked fine up to around 30 files. After that, it started missing files, losing track of what had been done, and making decisions that contradicted earlier steps. The prompt hadn’t changed. The task had just grown past the point where prompt-based coordination could hold it together.
This is the ceiling you hit when you treat the language model as the orchestrator instead of as a worker.
Deterministic Code Is Not the Enemy of AI
There’s a tendency in the agent-building space to treat any hard-coded logic as a failure of imagination — like if you were smarter about prompting, you wouldn’t need it. That framing gets things backwards.
Deterministic control flow encoded in software is what makes agents reliable. It’s not a crutch. It’s the architecture. You define the states, the transitions, the conditions under which the agent moves from one step to the next. The model handles the parts that actually need intelligence: interpreting ambiguous input, generating content, making judgment calls within a bounded scope. The software handles the rest.
Think of it like a well-run kitchen. The chef doesn’t decide whether to open the restaurant, manage the reservation system, or track inventory in real time. Those systems run on their own. The chef focuses on cooking. Your agent should work the same way.
What Solid Agent Architecture Looks Like
In practice, this means separating concerns clearly:
- Goals, not instructions. Give the agent a clear objective and let it operate within defined boundaries. Agents function best when they know what success looks like, not when they’re handed a script.
- Explicit state management. Track where the agent is in a workflow with code, not with context. If your agent needs to remember it already processed step three, that should live in a variable, not in the prompt history.
- Branching in software. If X happens, do Y. If the API call fails, retry with backoff. These are not decisions the model should be making on the fly from a prompt. Write the branch. Wire it up.
- Model calls as leaf nodes. The model should be invoked at specific, well-defined points in the workflow — not asked to navigate the workflow itself.
The February 2026 Release Gets This Right
The February 2026 release (version 1.110) made a point of addressing exactly this gap. The focus was on making agent workflows more practical for real-world development tasks — specifically the kind of longer-running, multi-step work where prompt-only approaches tend to fall apart. That’s a meaningful signal. The tooling is catching up to what builders have been learning the hard way: agents taking on serious tasks need structured workflows underneath them, not just smarter prompts on top.
A Different Way to Think About It
Most people assume AI agents need constant prompting to stay on track. That assumption leads to increasingly elaborate prompt chains that are hard to debug, hard to maintain, and brittle under real conditions.
A better mental model: write the workflow in code, then drop the model into the places where human-like reasoning actually adds value. You get the flexibility of AI where you need it and the predictability of software everywhere else.
That combination is what makes an agent actually useful in production — not the cleverness of the prompt, but the solidity of the structure around it.
Stop prompting harder. Start wiring smarter.
🕒 Published: