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

# Resolve a wait

> Resolves a human, async hook, or client hook wait with an allow or deny decision.



## OpenAPI

````yaml /openapi/platform.v1.json post /v1/threads/{threadId}/waits/{waitId}/resolve
openapi: 3.0.3
info:
  description: Public platform API for catalog and proxied data-plane routes.
  title: Matrices Platform API
  version: v1
servers:
  - url: https://api.matrices.com
security: []
tags:
  - description: Authenticated bearer credential context.
    name: auth
    x-group: Auth
  - description: Write-only provider credentials with safe connection metadata.
    name: connections
    x-group: Connections
  - description: Materialized workspace principals and active agent counts.
    name: identities
    x-group: Identities
  - description: Remote MCP server registrations.
    name: toolsets
    x-group: Toolsets
  - description: Named allow-only agent tool permissions.
    name: roles
    x-group: Roles
  - description: Client-executed tool calls.
    name: tools
    x-group: Tools
  - description: Reusable agent behavior profiles.
    name: profiles
    x-group: Profiles
  - description: Workspace-owned agent identities.
    name: agents
    x-group: Agents
  - description: Immutable private image inputs.
    name: images
    x-group: Images
  - description: Public model catalog.
    name: models
    x-group: Models
  - description: Running agent threads.
    name: threads
    x-group: Threads
  - description: Agent schedules.
    name: schedules
    x-group: Schedules
  - description: Workspace append-only feeds.
    name: feeds
    x-group: Feeds
  - description: Agent subscriptions over workspace feeds.
    name: subscriptions
    x-group: Subscriptions
  - description: Agent-private and workspace-shared durable memory notes.
    name: memory
    x-group: Memory
  - description: Thread messages.
    name: messages
    x-group: Messages
  - description: Thread event log data.
    name: events
    x-group: Events
  - description: Runtime hook audit and wait resolution.
    name: hooks
    x-group: Hooks
paths:
  /v1/threads/{threadId}/waits/{waitId}/resolve:
    post:
      tags:
        - hooks
      summary: Resolve a wait
      description: >-
        Resolves a human, async hook, or client hook wait with an allow or deny
        decision.
      operationId: ResolveWait
      parameters:
        - $ref: '#/components/parameters/ThreadID'
        - $ref: '#/components/parameters/WaitID'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResolveWaitRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResolveWaitResult'
          description: Resolved wait.
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '503':
          $ref: '#/components/responses/RuntimeUnavailable'
      security:
        - APIKeyBearer: []
components:
  parameters:
    ThreadID:
      in: path
      name: threadId
      required: true
      schema:
        type: string
    WaitID:
      in: path
      name: waitId
      required: true
      schema:
        type: string
  schemas:
    ResolveWaitRequest:
      properties:
        decision:
          $ref: '#/components/schemas/HookDecision'
        grant:
          $ref: '#/components/schemas/GrantSpec'
        reason:
          type: string
        updatedInput:
          $ref: '#/components/schemas/JSONValue'
        updatedOutput:
          $ref: '#/components/schemas/JSONValue'
        updatedText:
          type: string
      required:
        - decision
      type: object
    ResolveWaitResult:
      properties:
        wait:
          $ref: '#/components/schemas/WaitRecord'
      required:
        - wait
      type: object
    HookDecision:
      enum:
        - allow
        - deny
        - ask
        - defer
      type: string
    GrantSpec:
      properties:
        actions:
          items:
            $ref: '#/components/schemas/ToolPermission'
          maxItems: 16
          type: array
        expiresAt:
          format: date-time
          type: string
        uses:
          format: int64
          minimum: 1
          type: integer
      type: object
    JSONValue:
      description: Arbitrary JSON value.
    WaitRecord:
      properties:
        continuation:
          $ref: '#/components/schemas/JSONValue'
        createdAt:
          format: date-time
          type: string
        decision:
          $ref: '#/components/schemas/HookDecision'
        expiresAt:
          format: date-time
          type: string
        hookId:
          type: string
        id:
          type: string
        point:
          $ref: '#/components/schemas/WaitPoint'
        processor:
          $ref: '#/components/schemas/HookProcessorType'
        reason:
          type: string
        resolvedAt:
          format: date-time
          type: string
        resolvedBy:
          $ref: '#/components/schemas/Principal'
        status:
          $ref: '#/components/schemas/WaitStatus'
        target:
          $ref: '#/components/schemas/WaitTarget'
        targets:
          $ref: '#/components/schemas/AgentWaitTargets'
        threadId:
          type: string
        toolCallId:
          type: string
        toolName:
          type: string
        toolsetId:
          type: string
        turnId:
          type: string
      required:
        - id
        - threadId
        - turnId
        - target
        - status
        - createdAt
      type: object
    ErrorResponse:
      properties:
        attemptsRemaining:
          type: integer
        code:
          type: string
        error:
          type: string
        message:
          type: string
        retryAfterSeconds:
          type: integer
      required:
        - error
        - message
      type: object
    ToolPermission:
      maxLength: 176
      pattern: >-
        ^tool:(\*|(builtin|managed|workspace):(\*|[a-z0-9][a-z0-9_-]{0,31}\.\*|[a-z0-9][a-z0-9_-]{0,31}\.[A-Za-z0-9][A-Za-z0-9_.-]{0,127}))$
      type: string
    WaitPoint:
      enum:
        - before_turn_start
        - before_tool_call
        - after_tool_result
        - after_model_response
        - tool_execution
      type: string
    HookProcessorType:
      enum:
        - url
        - agent
        - client
      type: string
    Principal:
      properties:
        id:
          type: string
        identity:
          $ref: '#/components/schemas/Identity'
        origin:
          $ref: '#/components/schemas/Origin'
        type:
          enum:
            - user
            - api_key
            - agent
            - schedule
            - trigger
            - subscription
          type: string
      required:
        - type
        - id
      type: object
    WaitStatus:
      enum:
        - pending
        - resolved
        - expired
      type: string
    WaitTarget:
      enum:
        - url
        - client
        - agent
      type: string
    AgentWaitTargets:
      properties:
        entries:
          items:
            $ref: '#/components/schemas/AgentWaitTarget'
          type: array
        kind:
          $ref: '#/components/schemas/AgentWaitKind'
        timeoutMs:
          type: integer
      required:
        - kind
        - entries
        - timeoutMs
      type: object
    Identity:
      description: >-
        Provenance identity. Surrounding whitespace is trimmed on input; values
        may contain at most 512 UTF-8 bytes and no Unicode control characters.
      type: string
    Origin:
      additionalProperties: false
      description: >-
        Caller-asserted external event metadata. Only trigger principals may
        assert it; every other principal is rejected.
      properties:
        channelId:
          description: Provider channel identifier, limited to 512 UTF-8 bytes.
          type: string
        messageId:
          description: Provider message identifier, limited to 512 UTF-8 bytes.
          type: string
        provider:
          $ref: '#/components/schemas/OriginProvider'
        senderId:
          description: Provider sender identifier, limited to 512 UTF-8 bytes.
          type: string
        tenantId:
          description: Provider tenant identifier, limited to 512 UTF-8 bytes.
          type: string
        threadId:
          description: Provider thread identifier, limited to 512 UTF-8 bytes.
          type: string
      required:
        - provider
        - tenantId
        - senderId
      type: object
    AgentWaitTarget:
      properties:
        threadId:
          type: string
        turnId:
          type: string
      required:
        - threadId
        - turnId
      type: object
    AgentWaitKind:
      enum:
        - agents.ask
        - threads.wait
        - hook
      type: string
    OriginProvider:
      description: >-
        Caller-asserted external event provider. This value carries no
        authority.
      enum:
        - slack
      type: string
  responses:
    BadRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: Invalid request.
    NotFound:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: Resource not found.
    Conflict:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: Request conflicts with the thread's current state.
    RuntimeUnavailable:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
      description: Runtime environment is unavailable or cannot be selected.
  securitySchemes:
    APIKeyBearer:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.