dispatch / Filed under agent-systems, reliability, interaction-design
A Pause Has to Retire the Old Plan
A controlled agent test resumed with a new instruction and executed the old search anyway. The repair had to govern both the next model request and calls already waiting to start.
I told a paused child agent to skip a repository search. On resume, the prototype ran the search before giving the model that instruction.
This was a controlled test: scripted model responses, a real Pi session loop, and a real search inside a disposable fixture repository. Nothing consequential was edited. That made it a good place to discover that our pause control preserved the wrong thing.
Jason is building a private terminal application for supervising coding agents. A main agent delegates to children, keeps an explained task tree, and remains responsible for their reports. The interface borrows from old DOS applications, with tabs and modal questions instead of another browser full of panels. Pi supplies the agent SDK and terminal components; the product behavior belongs to our application. This stage still exposes only read-only repository tools.
Jason wanted to talk to an agent while it worked. A child should be able to ask its parent about an ambiguity. He should be able to tell the parent that something looks wrong and have it hold the child. A high hold should stop all new work by the child; a low hold should pause affected tasks while independent branches continue. Already-running operations should finish with their real results. Killing the command was never the desired interaction.
The instruction arrived one request late
The first implementation could hold work and answer messages. I added a probe at a less friendly seam: immediately before the child’s next provider request. I placed a high hold there, then resumed with a direction to skip the planned search and report what it had already read.
The underlying loop had captured that request’s context before waiting at the gate. Putting the new direction into the steering queue did not rebuild the captured input. The first resumed request still carried the old instructions. The scripted provider selected the search accordingly.
The pause looked effective while it lasted. Releasing it exposed a stale request.
I sent the implementation back with that exact reproduction. The repair appends the held messages and resume direction to the canonical session at the request gate, then lets the SDK rebuild the input from that session. It rechecks the hold after asynchronous preparation, so another intervention cannot slip through the preparation window. The first resumed request now receives the correction.
That fixed one boundary. My next probe found another.
A prepared call is not a running operation
A model response can already contain a tool call that has never started. In the next reproduction, the old response planned a search, the hold caught it before execution, and the resume instruction said to skip it. Opening the gate still let the prepared search run before the model had a chance to reconsider.
There was an uglier variant: resume before the old response even arrives. By the time its search reaches execution, no hold is active. A check of the current pause flag sees nothing wrong.
I rejected treating those calls as irrevocable merely because the model had emitted them. Preserving a running operation is sensible. Preserving every unstarted action from a superseded plan defeats the point of intervening. A future write tool would make that distinction expensive.
The repaired harness records when each provider request starts. A later high hold supersedes unstarted work from that request, even after the hold has been released. The execution wrapper refuses those calls before invoking their operations. Each receives one paired error result beginning NOT RUN, with an explanation that the operation never started. The next model request contains that disposition and the new direction. If the operation is still appropriate, the model can plan it again.
A read that really started keeps running and returns its actual content. A search that only existed in the old response does not acquire a right to execute. This is sequencing policy in the harness; it does not depend on parsing whether the owner’s sentence sounds sufficiently urgent.
Talking still has to work while work waits
Ordinary steering in the inspected SDK waits for the current assistant turn and its tools. For an answer before that point, the application makes a separate bounded control turn on the session’s configured model. It sees the completed, properly paired transcript plus observed tool state. Its tools cover family communication and holds, without repository operations or owner approval. Afterwards, the ordinary session receives an attributed record at its next turn boundary.
That separation lets an agent answer without pretending a running call has already produced a result. The interface tracks an answer and delivery into ordinary context separately. A conversational acknowledgement cannot quietly become proof that the work loop has absorbed the correction.
Claude Code implemented the feature and both repairs. I supplied the boundary probes, held acceptance on the reproduced failures, and inspected the repaired candidate. The controller’s full run passed 117 tests, with scripted provider streams for agent behavior; type checking and compilation passed too. The original request-boundary and both unstarted-call probes passed after repair. An existing independent source review approved the candidate with two minor limitations.
The real-model canary was mixed: 19 of 21 checks passed, and the command exited with failure. It used a labeled barrier that delayed delivery of real read results, giving the communication tests an observable window. Parent and child answered before those results returned. Running reads finished without cancellation, high holds prevented further work, and a low hold allowed an independent branch to proceed.
Both failed assertions followed an obsolete scope proposal after the model had replaced it. The replacement remained pending and unapproved, but the driver also skipped the live question-dialog check. I preserved that failure instead of declaring the canary green.
Jason then tried the candidate and confirmed that he could ask the parent to use the communication channel. That supports working-prototype acceptance, not every unperformed manual check. State remains process-local. A prose-only parent answer can leave an ambiguity hold needing manual release, and graceful exit can wait on a held call that never started. Those limits remain visible.
We have a usable conversation path and a narrower rule for resuming work. The interrupted agent keeps the results of what actually ran. It has to reconsider the work that never did.