OpenAI Agents API: controls for long-running agents
OpenAI's September 10 announcement opens up longer-running agent workflows. We examine the responsibilities your application retains and how to design a pilot with verifiable outcomes.
- Published
- September 15, 2026
- min read
- 4 min read
- Categoría
- AI Systems
On this page
7 chapters- 01What OpenAI announces with the Agents API
- 02The agent session and the business process
- 03Persistence: define what must survive
- 04Example: investigating purchase-order discrepancies
- 05Four controls for the first pilot
- 06Test recovery before automating writes
- 07Measure reviewable deliveries and recoverable failures

Chapter 01
What OpenAI announces with the Agents API
On September 10, 2026, OpenAI introduced the Agents API in public beta. It exposes Codex execution infrastructure for integrating agents into applications, using OpenAI-managed environments, your own infrastructure or partner providers. The announcement includes context management for longer sessions and tool-based work.
For a product team, the question is what happens when work no longer fits into a short interaction. An agent may analyze documents, produce files and need clarification before finishing. The application must explain progress, preserve important decisions and distinguish a proposal from an action already executed. That operational contract deserves attention from the first pilot.
Chapter 02
The agent session and the business process
The documentation distinguishes agent, environment, session and events. OpenAI manages sessions, orchestration, compaction and recovery; the application supplies tools and chooses where execution happens. It can receive progress through events or webhooks and continue a session. Understand those components before designing product interfaces and storage.
Our recommendation is to keep an application-owned work record separate from the conversation: case identifier, input-data version, owner, review status and approved result. The session holds the technical interaction; the record explains the commitment made by your product. This separation helps answer decisive questions, such as who approved a report and which information it used.
Chapter 03
Persistence: define what must survive
In OpenAI-hosted environments, each session has a separate workspace. Documentation distinguishes workspace files from published artifacts: published copies can remain available after environment expiry. Network access is configurable. Closing the event stream alone does not cancel a task.
Design recovery around that distinction. Keep verifiable references to results the product must retain and define an explicit retention policy. A temporary file should not be the only record of an approved decision. In the interface, distinguish work in progress, material ready for review and an accepted delivery; a created file may still contain errors or be incomplete.
In our proposed pilot design, the interface would offer stop, clarify and retry as distinct actions. Stopping requires checking that pending operations have ceased; clarification preserves the case and adds information; retrying must explain what is reused and what is recalculated. Show the last verified progress and who should act when the process is waiting. An endlessly animated indicator communicates activity but does not explain whether work is progressing or needs intervention.
Chapter 04
Example: investigating purchase-order discrepancies
Consider a hypothetical workflow that reviews differences between purchase orders and receipts. The user selects a period and the agent receives a bounded copy of the records. Its initial goal is to produce a discrepancy list with references to each document, rather than automatically update inventory or approve payments. The useful output is a review package that makes each conclusion traceable.
Before execution, define what counts as a discrepancy: units, quantities, dates, tolerances and cancelled records. If a receipt is missing, the agent should flag the absence and request the relevant data instead of assuming noncompliance. A reviewer validates the evidence and accepts or rejects proposals. This scope tests reasoning and continuity without treating a model observation as a confirmed accounting fact.
Chapter 05
Four controls for the first pilot
Start with small boundaries the team can verify using real cases. Instructions guide the agent, but tool authorization belongs in the service executing the operation. If a tool receives a company identifier, trusting the model-supplied value is insufficient: the server must validate it against the user and permitted scope.
- Data: limit each job to the necessary company, period and documents; verify that a request for another customer's records is rejected.
- Actions: separate reading, proposing and writing; bind approval to the exact version of the reviewed change.
- Budget: set time, attempt and usage limits, with a visible status when a limit is reached.
- Output: require references, review and a verifiable result before marking the work complete.
Chapter 06
Test recovery before automating writes
Deliberately interrupt a pilot using test data after a proposal is created and before it is accepted. On resumption, the product should recognize what exists and what remains pending. Test the inverse as well: the operation completed, but confirmation never reached the interface. The system needs to query the actual outcome before deciding whether to repeat an action.
For operations with external effects, design a stable operation key and a way to detect retries. Record the input version and retain the outcome confirmed by the service. If data changed during a pause, revalidate the proposal: approval for an earlier version should not silently extend to a different one. These decisions belong to your application and need explicit tests.
Chapter 07
Measure reviewable deliveries and recoverable failures
Evaluate a sample with reference answers and known disagreements. Record which conclusions are supported, which omissions reviewers found, how much work remains unresolved and the cost of producing and reviewing the complete package. Include difficult cases: contradictory data, incomplete documents and changing scope. An attractive average on easy cases may conceal the problems that matter in operation.
Before adopting the beta, also require a demonstration of pause, recovery and rejection of an unauthorized action. Start with a bounded process, an identified owner and human review; expand permissions only when evidence justifies it. Longer sessions can support useful work with continuity. Your purchasing criteria should include how that work is verified, stopped and corrected.
Written by
Wasyra Engineering
Modernization, architecture, and reliable delivery
Wasyra Engineering documents patterns for moving legacy systems without freezing delivery or breaking ownership.
More from this author
More from this author
Engineering
Copilot Auto: evaluating cost and quality for your team
GitHub adds preferences to Copilot Auto. A practical framework for testing real tasks, measuring rework and deciding when to escalate review.
ArticleEngineering
B2B SaaS technical due diligence checklist before you invest
What to review in architecture, security, data, debt, observability, and delivery before buying, investing in, or scaling a B2B SaaS.
ArticleKeep reading
Keep reading
AI Systems
AI software factory for startups: how to ship product without bloating the team
How to use an AI software factory to validate, build, and operate SaaS products with less internal team and more evidence.
ArticleAI Systems
AI agent implementation roadmap: ship agents without breaking operations
Five stages for moving from idea to operable agent: use case, data, permissions, evaluation, deployment, and continuous improvement.
ArticleAI Systems
MCP in production: the protocol standardizing your AI agents in 2026
Model Context Protocol went from experiment to de-facto standard in twelve months. Why Gartner expects 40% of enterprise apps to use it by end of 2026.
Article