Four Harness Pieces, Now Behind One API

On September 10, 2026, OpenAI opened the Agents API in public beta, turning the Codex harness that teams used to hand-build into a managed runtime. Four concepts — agent, environment, session, and events — now cover what used to be your own model-tool loop, session persistence, and context compaction and recovery. A good share of the harness components teams have been assembling piece by piece — regression gates, permission sandboxes — now sit behind a single API call.

The Cost That Isn't on the Price Sheet

Pricing adds no separate harness fee: you pay only for the tokens and tools your agents use. The real cost shows up elsewhere. The environment where code runs and files get edited is either OpenAI-hosted or one of nine partner sandboxes — Blaxel, Cloudflare, Daytona, DigitalOcean, E2B, Modal, Oracle, Runloop, and Vercel — and that choice is itself a form of lock-in. Context compaction is vendor-managed too, which narrows how far you can dig when it fails.

Build Roadmap and Pitfalls: A Build-vs-Managed Harness Decision Gate

(a) Start the decision with numbers. Tabulate the person-hours your team spends maintaining its own harness per quarter, the hours a managed switch would plausibly save, and a tolerance ceiling for sandbox-partner migration (say, within 5 business days). Without that table, the conversation stalls at "this looks simpler."

(b) Four failure patterns are worth naming early. First, switching to managed wholesale and discarding regression gates and permission sandboxes you already built, only to relearn the same ground from vendor docs. Second, the opposite: insisting on a custom build and re-implementing context compaction and recovery that the vendor has already validated, delaying your own launch. Third, locking code into one of the nine partner sandboxes with no migration plan, then getting stuck when that partner changes pricing or region availability. Fourth, session and event log schemas fixed on the vendor's side that don't line up with your own observability dashboard fields.

Recovery starts with dual logging. Keep session state in your own logs alongside the vendor's, and switching from one sandbox partner to another won't cost you the handoff data. Put a mapping layer between the managed API's response schema and your own observability fields, and a vendor field change won't break your dashboard.

(c) Build the pre-switch operations checklist around four questions: do event and session log fields map to your observability standard, is the context-compaction policy documented well enough to debug, how much code actually needs to change to swap sandbox partners, and does a minimal fallback path back to your own harness still exist if the managed service goes down.

(d) This decision doesn't get made once. Compare your own maintenance person-hours against the managed fee (tokens and tools consumed) again every quarter, and track the vendor's API changelog separately so you know which changes shifted last quarter's call before the next review.

A Checklist to Use Today

A managed harness has no line item for the harness itself — the lock-in cost just moves to sandbox-partner choice and the opacity of context compaction. Compare maintenance hours against the time a switch would save in real numbers, and put a log-mapping layer and a fallback path in place, and your team's decision criteria survive even if one of the nine partners changes under you.

References

Introducing the Agents API and hosted sandboxes — OpenAI Developer Community

Ask AI about this article

The assistant has read this article. Ask anything — it answers from the text and says so when something isn't in it.

Loading the chat…