Agent architecture

Build first, ask second

Turning a scheduled agent from a question-asker into a sandboxed teammate that ships work for review.

Of 49 task bullets, 53% had a default, 35% needed intent and 12% were out of scope.

Updated November 2026. I retired the scheduled agent in this essay in August. Even after the change described here, its questions went to a file nobody opened and thirteen piled up unanswered. When the credential it ran on expired, it failed silently for about five weeks. Work now reaches an agent only when I put a card on a queue and write down what done looks like while I still hold the intent, which is Pattern 14 of my reference architecture. The classification below still holds wherever that mandate is already clear. The rest is the May design, lightly edited.

For about a month, my project-manager agent's main output was questions.

It runs on a schedule (every two hours, around the clock), reading a shared task list, thinking about each item, and writing back what it needed to know before it could act. Reasonable, on paper. In practice it produced a queue. At one point twenty-one open questions were sitting in the file, several of them five to seven days old, a couple I'd half-answered and that had quietly looped back as fresh questions. The agent I'd built to take work off my plate had made me the rate-limiting step in its own loop.

The catch is that most of those questions had an obvious answer. "Should the new skill follow the existing skill's frontmatter format?" Yes. There is exactly one format in the repo. The agent wasn't asking because the answer was unknowable. It was asking because asking felt safer than acting. So I inverted the default. The agent classifies each task, builds the ones with an obvious answer in a sandbox, and surfaces the finished work as a diff I can review. Questions became the fallback. Here is what that change looked like, and what it cost.

Three buckets for every task

The whole approach rests on one decision the agent makes before it touches anything. What kind of task is this? Every item lands in one of three buckets.

The bias is deliberately toward has-default. When I ran the classifier over a backlog of forty-nine real task bullets, it sorted them 53% has-default, 35% needs-intent, 12% out-of-scope. More than half were things the agent could simply have done, and it had been asking about them out of caution.

The classification itself is cheap. It's one prompt holding the task text, the repo's conventions and a single rule, which is to fall back to needs-intent when in doubt. That conservative default is the safety valve. A misfiled has-default costs a wasted branch. A misfiled needs-intent just becomes a question, which is exactly where we started. The expensive direction is fenced off.

The classification pays off a second time on the tasks it doesn't build. A needs-intent task no longer yields "What do you want me to do about X?" It yields a question with the homework done: "I read this as needs-intent because the repo has no precedent for it. Here are the three options I see, and the one I'd pick. Which way?" The agent has an opinion and declines to act on it alone. Out-of-scope tasks name the missing piece (the credential, the access, the capability) instead of attempting and failing in a way I have to clean up.

The sandbox contract

"Build it speculatively" sounds reckless. It's the opposite, and the reason is the sandbox.

The agent never touches the main line of work. For anything in a git repo, it builds on a worktree, a separate working copy on its own branch:

git worktree add ../heartbeat-<slug> -b heartbeat/<slug>

For non-git scopes (task files, notes, reference docs), it writes into a staging folder (<slug>_staging/) with a REVIEW.md that lists what changed and the exact command to integrate it. Either way the output is the same shape, an isolated and reversible change I can read as a diff.

That shape is the point. It changes what I do from answering to reviewing. Reviewing finished work is faster, and worth more, than answering an open-ended question about work that doesn't exist yet. A question makes me hold the whole problem in my head and imagine a solution. A diff shows me the solution and asks yes or no.

The economics flip too. A bad question costs me an afternoon of switching context. A bad branch costs nothing, because I delete it. That asymmetry is what makes speculative work safe. The agent is free to be wrong, because being wrong is cheap and visible, instead of being hesitant, which is expensive and invisible. Every build lands as one line in a review queue (date, task, where it's staged, a one-sentence summary), and the morning brief surfaces the open ones under "Awaiting your review." The review surface is deliberately boring, one line per item with the diff a click away.

The failure I had to design around

Here's what didn't work the first time.

An agent that builds speculatively will, left alone, rebuild things you've already rejected. It has no memory of last Tuesday. It re-reads the task list, re-classifies the same item as has-default, and cheerfully reproduces the branch you just threw away, every two hours, forever. Speculative building without memory regenerates the same mistake every two hours.

The fix is a rejection log. When I reject a build, the agent appends an entry to an append-only file, shaped like an architecture decision record:

## 2026-04-24 — <task>
Attempted:          <what it built>
Rejected because:   <my reason, in my words>
Lesson for next:    <what a different attempt would change>

Before it classifies anything, the agent greps that file for the task's slug. If there's history, it reads the lesson and either changes its approach or, after three rejections on the same task, stops guessing and reverts to a question, carrying the whole history with it. "I've tried this three ways; here's each attempt and why you rejected it; I need your intent." It's a circuit breaker. The idea comes from how teams already work, with architecture decision records for choices and Dependabot's ignore list for "stop suggesting this." Durable memory of what not to do turns out to matter as much as the ability to act.

What changes when you flip the default

The visible change was a queue of diffs where there had been a queue of questions. Work that used to block on me for days (anything with an obvious answer) arrived finished, and I merged it or binned it in the time it takes to read a diff. Questions still happened, but they were the exception, and they arrived with options and a recommendation attached.

I want to be honest about what I can and can't claim. When I wrote this it had been running for weeks, so this is a design and its early behaviour rather than a long study. Three things were already clear.

The question I didn't have a clean answer to was how far has-default can stretch as the models improve. Every capability bump shifts tasks from needs-intent toward has-default, which is good, right up until the agent is confidently building things that genuinely needed a human, and I've stopped reading closely because the last hundred diffs were fine.


The principle underneath all of it is small. Default to action where the answer is obvious, default to asking where it isn't, and make the boundary explicit and the work reviewable. The classifier draws the boundary, the sandbox makes the work safe to be wrong, and the rejection log keeps the whole thing from looping.

It's also the smallest version of a problem every multi-agent system meets eventually, which is how much you let an autonomous process do before a human looks. Solving it for one scheduled agent, where the cost of being wrong is a deleted branch, is how you earn the right to solve it where the cost is production.

An agent that asks permission to do what it already knows how to do isn't cautious. It's just an expensive way to ask questions.

Get new essays by email on Substack.

← All writing