Agent continuations let an application pause a nested agent workflow, save its state, and resume it after human approval or a failure.
2
A continuation combines the normal messages array with metadata that identifies where execution should resume and records approval decisions.
3
The prototype works through the OpenAI Python API and can shut down all agent loops while a continuation is stored or reviewed.
Summary
Greg Benson presents agent continuations as a way to make long-running and human-supervised agents resumable. An agent continuation captures the messages array plus metadata about the suspended tool call and the information needed to rebuild the agent and its subagents. This lets an application pause before a high-risk action, wait for approval, handle rate limits, or checkpoint work without keeping the agent loop alive. Benson shows that the format works recursively for agents that call subagents, including a three-layer HR example in which an account agent pauses before authorizing an account. The application can inspect and update the approval object, then send the continuation back through the same request interface. The prototype is built on the OpenAI Python API with no other dependencies. Benson also describes broader suspension points based on time, turn counts, and asynchronous requests, with the aim of extending existing agent frameworks rather than replacing them.
Production agents need approval, checkpointing, and recovery
Benson begins with the problems that appear after an agent works in a production setting. Some actions, such as transferring money or deleting an account, need a person to make the final decision. Long-running agents can lose substantial work after a network or hardware failure, so their state needs to be saved somewhere other than the beginning of the process. Agents also increasingly run in distributed environments rather than on one developer's desktop. These concerns become harder when an orchestrator calls subagents, and those subagents call more subagents.
Benson describes the common agent pattern as a loop. The application sends messages and available tools to an LLM. If the LLM requests a tool, the agent loop calls it, collects the result, and sends that result back to the LLM for another decision. A tool can itself be an agent, so the same pattern can contain a subagent. Even a simple agent therefore has a sequence of LLM calls, tool calls, and returned results that must be preserved when execution is interrupted.
Continuations let the whole agent loop stop and restart
Agent continuations borrow the programming-language idea of taking a snapshot of execution and resuming it later. Benson applies that idea across multiple LLM calls, tool calls, and nested subagents. When the agent reaches a suspension point, the framework packages its state and returns it to the application layer. The application can use that state for human approval or save it for later. Once the continuation has been created, the agent loops do not need to keep running while the application waits.
The messages array provides much of the state already
Benson's design builds on the messages array used by current LLM agents. The array records the interaction history and is replayed to the LLM before its next decision. That history already contains much of what the agent has done, although it is not sufficient by itself. The continuation adds metadata that identifies the point of resumption and records what happened at the suspension point. This allows the existing message-based agent protocol to carry the additional state.
Approval support requires only a small change to agent code
In the prototype, a tool can be marked as needing approval, and the agent is created with a continuation-aware agent class. A completed request returns the agent's normal response. A suspended request returns a continuation object instead. The application can inspect its metadata, set the approval decision, and send the object back through the same request method. The agent recognizes the continuation and resumes just before the approved tool call, then continues to its final response.
A single-level continuation contains the normal messages array, a resume request identifying the tool call to continue from, and processed information such as an approval or disapproval. The framework exposes the relevant approval metadata at the top level so the application does not need to understand every nested detail. For an agent that calls a subagent, the continuation contains another continuation with that subagent's messages, resume request, and processed state. Benson says this recursive format can handle arbitrary nesting depths.
A nested HR example pauses inside an account subagent
Benson's full example has a top-level HR agent with an email tool and an account-agent tool. The account agent has create-account and authorize-account tools, with authorization requiring approval. A request to create a new account runs through the HR agent and account agent until it reaches authorization. The approval state propagates back through each level into one continuation object for the application. After the application updates the approval, the framework restores both the HR agent and account-agent state and completes the request.
The prototype can support suspension conditions beyond approval
The prototype is built on the OpenAI Python API and has no other dependencies. Benson says the team has also implemented more general suspension, including suspension after a period of time, after a number of turns, and through asynchronous requests. The intended direction is to extend existing frameworks such as Strands or Pydantic AI rather than create another complete agent framework. He presents the combination of human approval and arbitrarily nested agent state as the distinctive part of the approach.
"At any point in time, we want to be able to say, "Let me pause what the agent is doing. Let me be able to save that state and then return it back to the application layer.""09:21
Who should watch
You are building agents that must pause before high-risk tool calls and wait for a person to approve them.
Your agent workflows run for a long time, call subagents, or need to recover after infrastructure failures without starting over.
You maintain an agent framework and want a protocol-level way to carry resumable state through OpenAI-style function calling.