PARAS MADAN
All writing

Latest in AI

OpenAI Control Room: What It Stops and How to Design Agent Cancellation

Stopping new model output leaves an important engineering question: what happens to tools and jobs that are already running?

OpenAI's Control Room stops model output for research workloads by checking authorization at the inference engine. The November 9 disclosure is about internal research infrastructure, not a new customer API. Its useful lesson for application builders is where to enforce a stop, and what remains outside that boundary.

What OpenAI Control Room actually stops

According to the technical disclosure, workloads attach a job ID to inference requests. Engines check whether that job may continue. Revoking permission stops further model output, while the workload process can remain alive and shared engines continue serving other jobs.

OpenAI reports a maximum 35-second delay after Control Room receives a stop instruction, caused by authorization caching. That is an intervention delay, not the time required to detect a problem. The design fails closed: unavailable authorization means inference is denied. OpenAI says fail-closed operation covers frontier research workloads, with the remaining research rollout finishing over the following days.

For builders, the distinction is important: a stop needs a defined boundary. A button labeled “Stop agent” is an ambiguous promise unless the system knows which requests, workers and external actions belong to that agent.

Model cancellation and tool cancellation are separate

OpenAI's function-calling guide describes the application receiving a tool call, executing the corresponding code, then returning its result to the model. That application-side execution is a separate stage from generating the instruction.

Consider a support agent that has already requested an account update. If a worker is applying that update when an operator stops the model, there may be no further inference to interrupt. Your cancellation path must reach the worker or prevent its next write. A finished write needs reconciliation or an authorized compensating action, rather than a claim that cancellation erased it.

This is why closing a chat stream is a poor definition of stopping an agent. It changes what the user sees, but it does not establish what happened to work dispatched before the connection closed.

What developers can cancel through the Responses API

The public background-mode documentation provides a cancellation operation for an in-flight background response: POST /v1/responses/{response_id}/cancel. The SDK equivalent is client.responses.cancel(response_id). The documented operation is idempotent, so repeated cancellation calls return the final Response object.

Store the response ID when creating background work and inspect the returned state when cancelling it. Do not present this endpoint as access to Control Room, or infer that cancelling one response also cancels every application task associated with it.

For an application with multiple responses and workers, maintain your own mapping from a user-visible run to its active response IDs, queued jobs and child runs. Otherwise an operator can stop the visible parent while a child continues working under an unrelated identifier.

A practical cancellation design

The following is an application design checklist, not a description of OpenAI's implementation or a claim of hands-on testing. Use one durable run record as the authority for whether new work is allowed, and make the dispatchers that can create side effects check it.

  1. Record the stop before requesting cleanup. Persist the run's cancellation state and timestamp. Block new model requests, child jobs and tool dispatches for that run. If cleanup fails, the run should remain stopped rather than silently becoming eligible again.
  2. Cancel active provider responses where supported, and send cancellation to application workers. Track acknowledgments separately. A network timeout means the outcome needs checking, not that the worker definitely stopped.
  3. Remove or invalidate queued work. A worker that wakes after cancellation must reject the stale job, even if it was legitimately queued earlier.
  4. Reconcile in-flight external actions. Record whether each action completed, failed or remains uncertain. Use service-side status checks and stable operation identifiers before considering any retry.
  5. Require an explicit recovery decision. Resuming work should create a deliberate transition with known permissions and remaining tasks, rather than letting a generic retry loop restart the cancelled run.

There is a race between checking permission and committing a side effect. A check in the web server is insufficient if a queue worker performs the write seconds later. Put another check at the execution boundary. For especially consequential writes, use transactional state or fencing supported by the system doing the write, so an older worker cannot act merely because it passed an earlier check.

No local flag can recall a request already accepted by an unrelated external service. Where that service offers cancellation, use its contract. Where it does not, the honest final status may be “stopped further work; one action completed before cancellation.”

Test the stop path with a delayed worker

A useful test does not need a real customer account. Build a disposable workflow that reads a test record, waits, then attempts to update a marker. Request cancellation during the wait and verify that the marker remains unchanged. Repeat with the stop arriving just before dispatch, immediately after dispatch and after the write commits.

Then restart the worker and redeliver the queued message. Neither should revive cancelled work. Test a duplicate stop request, an unavailable authorization store and a delayed provider cancellation response. Record the actual outcomes instead of checking only whether the interface displayed a confirmation.

Measure three intervals separately: detection to decision, decision to recorded cancellation, and cancellation to the last permitted side effect. The final interval is the one your product's “Stop” promise depends on. Decide an acceptable bound for your own system and workload rather than borrowing another company's published number.

A reliable agent needs more than a way to generate the next action. It needs an enforceable answer to who can stop that action, how quickly, and what the operator should do when it is already too late.

I’m Paras. I work at the intersection of AI, engineering and distribution.

I help teams explain complex AI infrastructure and engineering tradeoffs through clear technical writing developers can use.

Book a 30-minute call.