Context between tasks
What each task in a plan is handed, and what it is not
A plan runs several sessions, one after another or several at once. None of them shares memory with the others. Each one starts with an empty context window, so the only thing that carries knowledge forward is what the orchestrator decides to hand over. That decision is worth reading, because it is the difference between a task that continues the work and a task that rediscovers it.
Disclosure: I build Ordewell, so what follows is how it does this rather than a survey. It is free and Apache 2.0. The shape of the problem is the same in any tool that runs more than one session, so the reasoning is useful even if you never install it.
The problem: an agent knows nothing about the session before it
It is tempting to imagine the plan as a conversation. It is not. Task two is a fresh process with a fresh prompt. Whatever task one learned about your codebase, whichever approach it abandoned, whatever it named a function, all of that is gone unless it was written into the working tree or handed back explicitly.
The lazy fix is to paste everything: the whole transcript of every previous task, or the planning conversation that produced the plan. That fails quietly. A transcript is mostly tool calls, dead ends and file dumps, and a model handed all of it tends to pick up where the last session left off, redoing or "improving" work that is already finished instead of doing its own task.
What a task is actually handed
Three blocks, assembled in a fixed order and placed above the task's own prompt. First the plan map, then the outputs of the tasks it directly depends on, then the task itself. All three are composed from the plan state, not from anything a model wrote about itself.
The plan map is a numbered list of the tasks in the plan with their current status, the runner assigned to the current one if a runner is set, and a pointer on the line the session is working:
## Plan map
1. [done ] Add the settings model
2. [NOW ] Wire the flag into the CLI ← you are here
3. [next ] Update the reference docs
(4 tasks omitted from this view)
Statuses are read off the stored task state, so the map is a report of what already happened rather than a plan the model is free to reinterpret. The header states the one rule that matters: this list is for context, do only the task marked as current, and do not preempt the tasks that follow.
The outputs of direct dependencies, and nobody else's
Below the map comes a block per dependency the task declared, in plan order. Each block holds that task's handoff, the words it left for whoever picks up next: for a change task the commit message first, then the summary, then any findings whole, each with the evidence it cites. The block is capped at 4,000 characters per dependency, and the cut falls between findings rather than inside one: what does not fit closes with a count and a pointer, +3 more findings; read task #12.
Two details matter. The first is that nothing is cut blind: a handoff is authored, at most
1,500 characters of summary plus findings, and a task that never reported falls back to
the end of its output, which is where a runner's last words sit. The second is that the
push stops at direct dependencies, but the pull does not. A task can call
read_task to read the full handoff of any task in its readable set: its
transitive dependencies, its loop's other end in either direction, and an earlier attempt
of its own or of a dependency by naming the attempt. Every call is recorded in the
reader's log, so the graph decides what can be reached and the log records what was.
Two tasks running side by side in the same wave see nothing of each other. That is deliberate: they touched different files by design, and giving each one the other's in-progress output would invite it to edit the other's work.
The handoff is the task's own words
A task finishes by calling task_complete with a status and a handoff: a
summary written for the next agent, optional numbered findings (each with a severity,
a detail and evidence that points at a file, a commit, a task or a URL), artifacts, and
for a change task the commit message the landed commit will carry. An optional long
report is stored with the attempt and pulled by whoever needs it, never pushed. Ordewell
numbers the findings F1, F2… in the order the author gave, so
a fix can say it answered F3 of task 12 and a later review can say which ones it
re-checked. A script task and a manual task hand over too, with what Ordewell itself
knows: an exit status and the end of the output, or the user's note.
Because the handoff arrives as structured data from a known attempt, there is nothing in it that could be mistaken for another task's evidence. A dependent can quote its predecessor freely; only its own attempt can report it done.
A resumed session gets the files and a warning
Continuing a task is a different case. The session still holds its original prompt, so the prompt is not resent. What changed is the working directory: it was recreated from the integration branch, so an earlier attempt's edits are present only if that work actually landed. The continuation reminder says exactly that, and tells the model to check the files before relying on them.
That is the whole protocol. No transcript pasted forward, no memory file that quietly drifts out of date. Task state and each task's own report are the interface, and everything a task knows about its predecessors came through it.
Honest limits
- A handoff is only as good as its writer. If an agent reports "done" with a vague summary, that vagueness is what the next task reads. The findings help when the author writes them, and so does a plan that asks for specific handoffs in the task prompt. Ordewell never summarises on the author's behalf.
- The push stops at direct dependencies. A task three
steps down is not handed the first task's findings; it has to know to ask
for them with
read_task, which reaches its transitive dependencies and its loop's other end, but not a sibling's work. - The map is a window. Past 30 entries the list is trimmed around the current task and the footer counts what was left out. A task cannot see the whole plan, by design.
- It is text, not an enforcement. A model can ignore the instruction to stay in scope. The boundary keeps it informed, not obedient.
- The pull is bounded on purpose. The 4,000-character block per dependency keeps a predecessor's noise from crowding out the task's own prompt, and the readable set keeps a task out of work it was never given. Raise neither and you trade attention for detail.
Source and design notes
Everything above is in the repository rather than recalled: promptAugment.ts (the composition order, the per-dependency block, the 30 entry window and its look back), Handoff.ts (what a handoff carries and the limits on it), the Task model, and github.com/ordewell/ordewell.