When a coding agent reaches a decision, it usually lists two or three ways forward and recommends one, and over this year I've noticed that the recommendation tends to be the option that is easiest to get done rather than the one that fits the problem. The agent reuses whatever already exists in the codebase, keeps a limitation it ran into because removing it looks like work, quotes costs and platform behaviour it never checked, and presents the result as a reasoned choice. So I started answering those messages with one question, "If time and labor were not a consideration, what would the optimal version of this look like?", and over a few months it grew into a small skill that makes the agent analyse the problem and its own options, check the facts its answer rests on, and come back with a verdict whose assumptions are written down. Most of the examples here come from a local-first meeting-notes app for macOS that I've been building with agents, where I used it at many of the bigger decisions.
Why agents settle for the shortcut
There are two habits behind it. The first is how agents weigh effort. They size an option as if a person had to carry it out over a few weeks, so "this needs a file-format change" or "this touches a lot of files" counts against it, even though the agent will write that code in an afternoon, and that cost ends up folded into the recommendation without ever being named. The second is that estimates and claims about how a platform behaves come from memory and are stated with the same confidence as things the agent has read. The first draft of one spec for the meeting-notes app put a code-signature check at under a millisecond, and once someone ran it, it took 446 to 576 ms outside the app's sandbox and failed inside it. In a reading app I'm building that syncs books through iCloud, an agent comparing two designs wrote that two devices racing on a rename would "produce iCloud conflict versions of identical bytes", harmless but in need of cleaning up, which was a guess about iCloud in a codebase that had no conflict handling at all.
Neither habit shows in the list of options we get back, because the list looks balanced and the recommendation comes with reasons. Taking time and labor off the table removes the excuse behind the first habit, and the second needed a rule of its own, which came later.
What the question makes the agent do
If we ask the question bare, we sometimes get a wish list back, with every feature the agent can think of and a few layers of abstraction on top. The skill pins down what optimal means here, which is the version that is right for the problem, and that is often smaller than any of the options, because the ideal can delete code or merge two things into one. Real constraints are part of the ideal rather than compromises against it, so the project's privacy rules, what the operating system allows and what we asked for are taken from the request and the project, and the agent doesn't bring in assumptions from elsewhere about compatibility or legacy support.
The agent then quotes each of its options in one line, scores them on axes derived from the problem (correctness, architecture, data integrity, privacy, failure and recovery, operability) with cost last unless we made it a hard constraint, and gives one of three verdicts. Either one option is closest to the ideal and the others are listed with what they give up, or none of them match and the agent describes the real ideal and what the options had compromised away in advance, or two options are best on different axes and it asks us which axis matters more. It finishes with the tradeoffs we would be taking on, so that we take them knowingly. A few rules keep it honest. It doesn't plan, so there are no steps, file lists or effort estimates, only end states. Time pressure and migration cost are named as tradeoffs instead of being folded into the verdict. And it may add an option of its own only when none of the ones on the table come close, since that is the one place where the question is allowed to grow the scope.
Checking every premise
The first version only asked the agent to label missing facts that could change the verdict, which left it to the agent to notice what it didn't know, and a fact it believed never looked missing. In October I replaced that with a step that comes before any scoring. The agent lists the facts each option's score rests on, such as what a doc section says, what a code path does, or whether a function exists, checks every one of them that can be checked in the session, and cites what it read. A fact that can't be checked there, like a run on a real device, production data or a decision only we can make, goes on a separate list as open, with the reason it can't be checked. A truncated search doesn't count as proof that something is absent, and if a checked fact contradicts how an option was presented, the option is rescored from the fact.
In November, after the iCloud answer, the rule got wider. Every sentence of the answer counts as a claim, including the scoring and the verdict, so a guess dressed up as a consequence is no longer allowed anywhere. What a platform or framework does at runtime is never asserted from memory, only from a source read in the session or a result measured in the repository, and an option that rests on an open fact can't win on its own unless the verdict names that fact and what would change it. Rechecked under those rules, the iCloud answer changed. The agent found that the codebase names every file after its database row, so two devices could never create the same path, that the move it had proposed would break that, and that what iCloud then does is a device fact it couldn't check, and it proposed doing the same thing without moving any bytes.
Three decisions from the meeting-notes app
The first was how the app should notice that a meeting had ended while it was still recording. The agent offered three ways to detect silence, all based on loudness or on the live transcriber, and recommended reusing the loudness detector the app already had. Asked for the ideal, it wrote that it had picked that detector "because it already exists, not because it fits", since loudness counts typing and music as someone talking, which is exactly the situation where you forget to stop a recording, and it proposed an on-device speech classifier instead, which is what shipped after a short spike comparing two classifiers.
The second was a microphone toggle during a recording. The options were an honest toggle that reports whether the mic really turned on, a UI-only toggle that was the smallest change, or waiting until a separate bug in stereo recordings was fixed. The premise check found that turning the mic on returned without any error when permission was missing, so the UI-only version could say the mic was on while nothing was captured, and that a recording started with the mic off was written as mono and could never gain a mic channel. None of the options matched. The ideal was a mic that can be turned on or off at any point of any recording, with the toggle showing what the capture is doing rather than what was asked, and the verdict pointed out that two of the options had treated "a mono recording can't gain a mic channel" as a requirement when it was a consequence of the file format choosing its channel count at the start. The tradeoff it named was that every recording would be written as stereo, which doubles the disk space of mic-off recordings and is a file-format change the project's rules say to ask about first. I took it, and the app records in stereo now.
The third was about measurement. A new feature came in over its performance budget, and the agent offered to measure again with live transcription turned off, to accept the numbers and rewrite the budgets, or to change the design. The premise check found that the budgets were defined for a base M1 with 8 GB over a two-hour recording, while the runs had been 31 minutes on an M4 Max with 64 GB, that live transcription can't be turned off in the app, so measuring without it would describe a condition no user runs, and that the design change contradicted a decision we had already accepted. The verdict was that none of the options matched, and that the feature's cost should be measured directly on the reference machine, from the CPU time of the analyzer's own threads and the memory change when it is created and released, rather than inferred from the difference between two noisy runs where a 3.5% CPU gap was within the transcriber's own variation.
The answer is a set of assumptions too
The verdict on the silence detector said that since the app never stops a recording on its own, a prompt that comes too early "costs one click". That turned out to be wrong, because a later review of the design showed the prompt can be hidden while the screen is being shared, nobody clicks anything, and the planned trim of the silent tail would then cut most of the meeting (the overview post has how that ended). What helped was that the assumption had been written down in the answer, so the review had something concrete to check, and the skill's rule that a premise found unchecked after a decision reopens that decision, instead of being patched around, is there for the same reason.
It isn't free, since checking premises means reading code and docs before every verdict, which takes time and tokens, so I don't run it on every change. In October it ran 18 times across 15 of about 62 sessions on the meeting-notes app, mostly right after the agent had offered options for a design decision, like a file format, stored data or the shape of a component.
Summary
The options a coding agent offers are shaped by what is easy for it to change and by estimates and platform behaviour it took from memory, and the recommendation hides both. Asking what the optimal version would look like if time and labor didn't matter takes effort out of the comparison, and making the agent check every premise it can, and list the ones it can't, turns its answer into a decision with its assumptions in plain view. We still take compromises, often the same ones the agent would have chosen, but we take them knowing what they give up, and a later review or a measurement has something written down to check against.
Top comments (0)