Two Answers
Give a coding agent the same task twice and it hands you two different, plausible answers. The reason is not the model, and neither is the fix.
Give a coding agent a task and it does a competent job. Give it the same task again, in a fresh session or to a second agent running in parallel, and you get a different result. Not a small difference. The two answers put the logic in different places, follow different conventions, make different assumptions about what you meant, and each one compiles and passes and reads like something a reasonable engineer would write. You have two competent answers to one question, and they do not agree.
The easy explanation is that the model is random, and it is, a little. These systems sample, and sampling varies. But turn that dial down as far as it goes and the divergence does not disappear, because the randomness in the sampler was never the main thing moving. The main thing moving is the context. Each run assembled its own: the files that happened to be open, the snippets a retriever judged relevant, the earlier turns of the conversation, the order all of it arrived in. Two runs of the same model over two different contexts are two different questions. It is not surprising they produce two different answers.
One agent is a curiosity, many is a problem
With a single agent and a single task this is a curiosity. It stops being one the moment there is more than one. A team running agents runs them constantly and in parallel: many sessions, many engineers, many tasks touching the same system in the same week, each with its own assembled context and each producing something locally reasonable. Nothing sits above them reconciling the results. So the system does not fail, it diverges. It fills with competent, individually defensible choices that were never made against the same reference, and no single one of them is the bug. The drift is the bug, and the drift has no author.
What it takes to converge
Two runs converge when they share whatever determines the answer. If a question is fully settled by the code in front of the agent, both runs read that code and land in the same place; you rarely get two answers about what a function returns. You get two answers when the question is not settled by the code. When the right choice depends on something the code does not contain, such as which service is supposed to own this write, why the boundary was drawn here and not one layer up, or which approach the team already tried and abandoned. That information determines the answer, and it is not in front of the agent, so each run reconstructs it, and reconstructing an underdetermined choice from scratch is precisely the act that produces different choices.
So consistency is not really a property of the model. It is a property of the context. You do not get agents to agree by buying a better one or by pinning its temperature; you get them to agree by giving each of them the same decided truth to work from. And the disagreement, read the right way, is useful. Where two runs split on something that matters, the answer is underdetermined by the code: a decision exists but is not written anywhere the agent can reach. That divergence is a map of your unrecorded decisions.
The fix is not more model
Which points at the fix, and it is not a better model and not a bigger context window. It is a shared record of the decisions themselves, the choices the team has made and the reasons behind them, sitting where the work happens so that every run reads the same one at the same point. That is what Brief is: not more context, but the specific part of the context that settles the question, held once and read by every agent and every engineer. Give two runs the decision that governs a change and they stop guessing at it. Two answers become one, not because the model got better but because the question finally had an answer written down.
None of this makes the model's job smaller. An agent still has to write the code, and writing it well is real work. The point is narrower. When two runs disagree, the interesting question is not which model is right. It is what both of them were left to guess, and whether that thing was ever written down anywhere but in the head of the person who decided it. So the next time your agents hand you two answers, treat it as the question it actually is: which decision were they missing, and where does it live?
Frequently asked questions
Why do two AI coding agents give different answers to the same task? Mostly because each run works from a different context, not because the model is random. An agent assembles its context per task from the open files, retrieved snippets, and the conversation so far, and two runs rarely assemble the same one. When the right choice depends on something not in that context, such as a decision the team has made about the system, each run reconstructs it independently and lands somewhere different. Lowering the model's temperature narrows this but does not remove it.
Is AI agent inconsistency a model problem or a context problem? Largely a context problem. If a question is fully settled by the code in front of the agent, runs converge on it. Divergence shows up where the answer depends on information the code does not contain, such as which component owns a piece of logic or why a constraint exists. That is a gap in what the agent was given to read rather than a limit of the model, so a better model does not close it.
How do you get AI coding agents to be consistent? Give every run the same decided truth to work from. Where the right answer depends on a decision the team has made, that decision has to be recorded somewhere every agent reads it, attached to the part of the system it governs. Then runs converge, because they are all resolving the same underdetermined choice against a shared reference instead of each reconstructing it from scratch.
What does Brief do about agent consistency? Brief is a shared record of a team's decisions and the reasons behind them, surfaced to an agent at the point of the change a decision governs. It supplies the specific part of the context that settles an otherwise underdetermined question, the same for every run, so agents converge on the choice the team actually made instead of each inventing a plausible one. It addresses consistency by removing the guesswork, not by changing the model.
← Back to Blog