One of the most-discussed Claude Code posts on Hacker News in the past year was about separating planning from execution: close to a thousand points when I looked on 8 November. I agree with it, and I take it further than most. In my setup the plan is not a mode inside one session. It is a file, written by one session and carried out by another.
How the whole crew works is in How I run thousands of Claude Code sessions. This post is about the split itself: what a plan has to contain, and the ways it went wrong.
Why two sessions and not one
A planning session reads a lot: the code, the docs, old notes, the state of the servers. Most of that is useless once the plan is made, but in one session it stays in the context and is paid for on every later step.
So the planner writes a brief, a file with the job, the facts and the files to open, and a fresh session starts from that brief alone. The doer gets the conclusions without the search that led to them. It does one job, pushes its branch, writes a short report and ends.
Two rules keep the roles apart:
- The doer does not plan the next job. When it finds a next step, it writes that step's brief and puts it in the queue. It does not start it. Since 18 November this happens by itself when the session closes.
- The doer does not decide silently. If something in the brief is unclear, it asks. If no one is there to answer, it picks the most reasonable reading, carries on and writes the assumption into its report.
What the plan must answer before any code
On 28 October I wrote down ten questions that every change answers in its pull request, one or two lines each, before the code is written. "Don't know" is an answer. A blank is not.
- What already does this?
- What can fail, and how would a person find out?
- What is the load today, with a number and its source, and in a year?
- Which services and environments does it touch, and what runs its background half in each one?
- What happens on a retry or a double click?
- Do two writes have to land together?
- What is the simplest option, and why is it enough?
- What did you choose not to build?
- What would make us change it?
- Who has to act outside the code?
The note above them says the point: the decision should not be the most complicated or the most general one, but the one that fits our systems and our load.
Two designs that skipped them
- The relay that ran only in production. My 3D printing shop writes each order and its confirmation mail in one transaction, and a scheduled job sends the mail on. The pattern was right. On 27 and 28 October we found that test orders had sat unsent for a day: the test environment had no such job. Once it was added, every mail failed, because the test site was not allowed to send mail. Question 4, "what runs it in each environment", and question 10, "who acts outside the code", would each have been one line, and both lines would have been blank.
- Six ways to send mail. Before 24 October my platform had six mail implementations. Each was written because the previous one did not quite fit, and each one, alone, was reasonable. Together, no one could say what had been sent. Question 1, "what already does this", is the one that stops the seventh.
The first design was too simple in one place. The second was a pile of reasonable designs. The questions catch both.
Four ways a plan went stale
A brief is a picture of the world at the moment it was written. By the time a session reads it, the picture can be wrong.
- Work that was already done. On 31 October a count found 32 parts of my feature list marked as not done when they were finished, and 4 of 12 new sessions had repeated finished work. Now a session that finishes a part marks it done in the list, with the pull request as proof.
- A brief nobody could find. On 14 November ready work waited 41 minutes because four briefs had been written but never added to the queue. Now a session that writes a brief links it in the same step, or it cannot close.
- A brief older than a rule. One brief said only I publish blog posts; a newer rule said the sessions publish our own posts themselves. The session did not pick one quietly. It said so in its report, and the brief was changed.
- A topic already taken. On 21 November the session that writes this blog got a brief whose suggested topic had gone live that same morning. It read the live blog before writing, saw the overlap and wrote this post instead.
The fix for all four is the same habit: the doer checks the plan against the real state before acting, and reports the difference instead of working around it. Before a session opens, a script now also lists the shared parts of the system its task touches, and the brief has to say in one line how the job fits with each.
What I would do in your place
- Write the plan to a file. A plan in the chat dies with the session. A file can be read by a fresh session, checked and corrected.
- Start the work in a fresh session. Hand over the conclusions, not the search. The brief should carry the facts, not a pointer to where they might be.
- Make the plan answer failure and environments. Most of my bad designs were not wrong. They were missing a half that runs somewhere else.
- Let the doer check the plan first. Five minutes of reading the live state costs less than a day of work on a stale brief.
- Let the doer write the next brief, not start it. One job per session keeps each one short and its report readable.
Rules about where each instruction belongs, CLAUDE.md, a hook, a skill or the brief, are in CLAUDE.md, hooks, skills or the task. How the sessions share one machine and one test cluster is in Running many coding agents at once.