> ## Documentation Index
> Fetch the complete documentation index at: https://docs.murmur.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Interrupt an agent's turn

> StopTurn interrupts the agent's current turn. The agent stays alive for subsequent follow-ups. Returns a validation error if no turn is running or if run_id does not match.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/agent/stop-turn
openapi: 3.0.0
info:
  title: Murmur REST API
  description: >-
    PRE-ALPHA: INTERFACE SUBJECT TO CHANGE WITHOUT NOTICE.


    The murmur REST API lets you spawn agents, track their progress, manage
    their task lists, and read and write catalog resources from any HTTP client.
  version: v1
servers:
  - url: https://api.murmur.dev
security:
  - ApiKey: []
tags:
  - name: MurmurService
paths:
  /v1/agent/stop-turn:
    post:
      tags:
        - MurmurService
      summary: Interrupt an agent's turn
      description: >-
        StopTurn interrupts the agent's current turn. The agent stays alive for
        subsequent follow-ups. Returns a validation error if no turn is running
        or if run_id does not match.
      operationId: MurmurService_StopTurn
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/murmurApiV1StopTurnRequest'
        required: true
      responses:
        '200':
          description: A successful response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/murmurApiV1StopTurnResponse'
        default:
          description: An unexpected error response.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/googleRpcStatus'
components:
  schemas:
    murmurApiV1StopTurnRequest:
      type: object
      properties:
        agentId:
          $ref: '#/components/schemas/v1AgentId'
        runId:
          type: integer
          format: int32
          description: >-
            The turn to stop. Required: must equal the agent's current run
            number — read it from the runCount field of the agent status
            response. An omitted or stale value is rejected with
            INVALID_ARGUMENT, so a retried stop never kills a newer turn.
        mode:
          $ref: '#/components/schemas/v1StopTurnMode'
    murmurApiV1StopTurnResponse:
      type: object
    googleRpcStatus:
      type: object
      properties:
        code:
          type: integer
          format: int32
          description: >-
            Numeric status code for the failure, matching the HTTP status of the
            response via the standard mapping (e.g. 3 INVALID_ARGUMENT → 400, 5
            NOT_FOUND → 404, 7 PERMISSION_DENIED → 403, 16 UNAUTHENTICATED →
            401).
        message:
          type: string
          description: Human-readable description of what caused the failure.
        details:
          type: array
          items:
            $ref: '#/components/schemas/protobufAny'
          description: >-
            Machine-readable error details, when the failure carries them.
            Usually empty.
      description: The error envelope returned on every non-2xx response.
    v1AgentId:
      type: object
      properties:
        tenant:
          $ref: '#/components/schemas/v1Tenant'
        ownerProvider:
          $ref: '#/components/schemas/v1Provider'
        account:
          type: string
          description: >-
            Owner account: username for identity-provider owners,
            service-profile name for PROVIDER_SERVICE_PROFILE.
        agent:
          type: array
          items:
            type: string
          title: |-
            Agent path — the hierarchy from root to leaf.
            Root agent:  ["fix-bug"]
            Child:       ["fix-bug", "api"]
            Grandchild:  ["fix-bug", "api", "tests"]
        workspace:
          type: string
          description: >-
            Workspace this agent belongs to; scopes its repos, environment, and
            base branches. Optional at spawn: when empty, the server selects
            one, so a returned AgentId always carries a concrete workspace.
      description: >-
        Identifies an agent. The identity is (tenant, workspace, owner, agent
        path); the workspace scopes the agent's repos, environment, and base
        branches.
    v1StopTurnMode:
      type: string
      enum:
        - STOP_TURN_MODE_UNSPECIFIED
        - STOP_TURN_MODE_INTERRUPT
        - STOP_TURN_MODE_KILL
      default: STOP_TURN_MODE_UNSPECIFIED
      description: >-
        Controls how the running turn is stopped. INTERRUPT stops gracefully —
        the agent flushes its cost, duration, and response before exiting. KILL
        terminates immediately with no result recovery. There is no automatic
        escalation: send a second stop with KILL mode if the first doesn't take
        effect.

         - STOP_TURN_MODE_UNSPECIFIED: treated as INTERRUPT
         - STOP_TURN_MODE_INTERRUPT: graceful stop — first press
         - STOP_TURN_MODE_KILL: forceful stop — second press (escalation)
    protobufAny:
      type: object
      properties:
        '@type':
          type: string
          description: >-
            Identifies the payload type of this detail value; the remaining
            properties are that type's fields.
      additionalProperties: {}
      description: >-
        A structured detail value. `@type` identifies the payload type; the
        remaining properties are that type's fields.
    v1Tenant:
      type: object
      properties:
        provider:
          $ref: '#/components/schemas/v1Provider'
        org:
          type: string
          title: username or org name
      description: |-
        Tenant identifies an organization within a provider. It is the unit of
        multi-tenant scoping — all resources (agents, pools, VMs) belong to
        exactly one tenant.
    v1Provider:
      type: string
      enum:
        - PROVIDER_UNSPECIFIED
        - PROVIDER_GITHUB_OAUTH
        - PROVIDER_GITHUB_APP
        - PROVIDER_GOOGLE_OIDC
        - PROVIDER_SERVICE_PROFILE
      default: PROVIDER_UNSPECIFIED
      description: |-
        Provider identifies the identity provider type for a tenant namespace.
        Each provider is a distinct namespace — no cross-provider mixing.

         - PROVIDER_GITHUB_OAUTH: the namespace of an individual GitHub user — a single login (human or bot, e.g. "alice"), addressed as github_oauth/{login}
         - PROVIDER_GITHUB_APP: the org/tenant namespace — its account is the org name (github_app/{org}), never a person
         - PROVIDER_GOOGLE_OIDC: Google Workspace domain
         - PROVIDER_SERVICE_PROFILE: owner is a CatalogServiceProfile; account is the profile name
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      description: 'murmur API key: mur_<key_id>.<secret>'

````