Interrupt an in-flight tool or LLM call

POST /api/v1/projects/{id}/executions/{execution_id}/interrupt

Aborts in-flight tool or LLM calls for an execution without canceling the session, so the agent continues. Send step_number to interrupt a single named call; omit the body to interrupt every call currently in flight. The response's outcome reports exactly what happened: "aborted" (something in flight was stopped), "armed" (nothing in flight; armed for the execution's next call, pending=true), "already_armed" (an unexpired arm already existed; the TTL was not extended), "noop_terminal" (the execution is already terminal, possibly on another replica), "in_flight_elsewhere" (the durable step record shows the call in flight but not on this OE replica; nothing was aborted here, and a backstop scoped to the stamped steps stops the call at dispatch if that dispatch completes on this replica — it can never trap a later call), or "noop" (a named step_number matched nothing in flight). Idempotent: repeated requests are safe.

Path parameters

  • id string Required

    Project ID

  • execution_id string Required

    Execution ID

Query parameters

  • workspace_id string

    Workspace ID that owns the execution, needed to route the interrupt to that workspace's OE

application/json

Body

Optional single-call target

  • step_number integer

    StepNumber is the execution step of the single tool/LLM call to interrupt.

Responses

  • Unsupported or malformed API version, an operation unavailable in the selected published contract, or an unacceptable representation (including unsupported media-type parameters or excluded SSE). Existing authentication, authorization, and rate-limit failures take precedence.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Optional validation details defined by the standard error schema; API negotiation errors do not emit this field.

      Hide badRequestDetail attribute Show badRequestDetail attribute object
      • fields array[object]

        Fields with validation failures.

        Hide fields attributes Show fields attributes object

        A field and its validation failure.

        • description string Required

          Human-readable validation failure.

        • field string Required

          Name or path of the invalid request field.

    • detail string Required

      Human-readable error details.

    • error integer Required

      HTTP status code.

    • errorCode string Required

      Machine-readable error code.

    • parameters array[string]

      Request parameter names associated with the error; omitted when none apply.

    • reason string Required

      HTTP status reason phrase.

    Hide response attributes Show response attributes object
    • badRequestDetail object

      Optional validation details defined by the standard error schema; API negotiation errors do not emit this field.

      Hide badRequestDetail attribute Show badRequestDetail attribute object
      • fields array[object]

        Fields with validation failures.

        Hide fields attributes Show fields attributes object

        A field and its validation failure.

        • description string Required

          Human-readable validation failure.

        • field string Required

          Name or path of the invalid request field.

    • detail string Required

      Human-readable error details.

    • error integer Required

      HTTP status code.

    • errorCode string Required

      Machine-readable error code.

    • parameters array[string]

      Request parameter names associated with the error; omitted when none apply.

    • reason string Required

      HTTP status reason phrase.

  • 200

    OK

    Additional properties are allowed.

    Additional properties are allowed.

  • Bad Request

    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
  • Unauthorized

    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
  • 404

    Not Found

    Additional properties are allowed.

    Additional properties are allowed.

  • Request Entity Too Large

    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
    Hide response attributes Show response attributes object
    • code string
    • error string
    • success boolean
  • 502

    Bad Gateway

    Additional properties are allowed.

    Additional properties are allowed.

POST /api/v1/projects/{id}/executions/{execution_id}/interrupt
curl \
 --request POST 'https://agentengine.mongodb.com/api/v1/projects/{id}/executions/{execution_id}/interrupt' \
 --header "Authorization: $API_KEY" \
 --header "Content-Type: application/json" \
 --data '{
  "step_number": 42
}'
Request examples
{
  "step_number": 42
}
Response examples (406)
{
  "detail": "This operation is not available in API version 2026-09-20-preview.",
  "error": 406,
  "errorCode": "OPERATION_NOT_IN_API_VERSION",
  "parameters": [
    "Accept"
  ],
  "reason": "Not Acceptable"
}
{
  "detail": "This operation supports text/event-stream, which the Accept header excludes. Remove unsupported media-type parameters or accept this type with a positive q value.",
  "error": 406,
  "errorCode": "UNACCEPTABLE_MEDIA_TYPE",
  "parameters": [
    "Accept"
  ],
  "reason": "Not Acceptable"
}
{
  "detail": "The requested API version is not supported. Supported versions: 2026-09-20-preview.",
  "error": 406,
  "errorCode": "UNSUPPORTED_API_VERSION",
  "parameters": [
    "Accept"
  ],
  "reason": "Not Acceptable"
}
Response examples (406)
{
  "detail": "This operation is not available in API version 2026-09-20-preview.",
  "error": 406,
  "errorCode": "OPERATION_NOT_IN_API_VERSION",
  "parameters": [
    "Accept"
  ],
  "reason": "Not Acceptable"
}
Response examples (200)
{}
Response examples (200)
{}
Response examples (400)
{
  "code": "string",
  "error": "string",
  "success": true
}
Response examples (400)
{
  "code": "string",
  "error": "string",
  "success": true
}
Response examples (401)
{
  "code": "string",
  "error": "string",
  "success": true
}
Response examples (401)
{
  "code": "string",
  "error": "string",
  "success": true
}
Response examples (404)
{}
Response examples (404)
{}
Response examples (413)
{
  "code": "string",
  "error": "string",
  "success": true
}
Response examples (413)
{
  "code": "string",
  "error": "string",
  "success": true
}
Response examples (502)
{}
Response examples (502)
{}