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

# Remove a queued message from a task

> Removes one message from a task's queue before the task takes it, answering 204.

Use this tool when you need to:
- Withdraw a follow-up sent to a task before a turn picks it up
- Drop one of several messages queued behind the running turn

Examples:
- DELETE /tasks/{taskID}/messages/{messageID}
- DELETE /tasks/6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21/messages/2f8c4d1a-7b3e-4a9f-8c2d-5e6f7a8b9c0d

Hints:
- taskID is the task's uuid and messageID the id respondToTask answered for the message; the schema answers 422 for either when it is not a lowercase uuid.
- Answers 204 with no body. A message the task has that is no longer queued, because a turn took it or it was removed already, is refused with 409 message_not_queued; a message the task does not have is 404.
- A task whose status is queued cannot lose its last queued message: that removal is refused with 409 last_queued_message and removes nothing.
- Use stopTask instead, with discard_queued_messages true, to drop every queued message at once, a queued task's last one included.
- Restricted to the task's creator or an admin or owner of its organization: another member is refused with 403 control_forbidden, a viewer or billing member with 403 org_role_insufficient, a suspended organization with 403 org_suspended, an agent host's grant with 403 agent_host_route_not_allowed, and a task the caller cannot see is 404; 503 when the membership check is unavailable.
- On its person's computer it takes back a message Aether still holds, or one whose run Aether holds back, which then leaves every read; a message already handed to the computer is 409 message_not_queued, and the first message of a task whose start has not run it is 409 last_queued_message. A message of a chat the caller cannot read is 404, and one whose chat's can.send reads not_permitted is refused with its reason. An aether CLI below 0.2.64 is refused a task on a computer with 409 task_backed_by_work_tree.



## OpenAPI

````yaml api-reference/openapi.json DELETE /tasks/{taskID}/messages/{messageID}
openapi: 3.1.0
info:
  title: Aether API
  version: 0.1.0
servers:
  - url: https://api.runaether.dev
security:
  - bearerAuth: []
paths:
  /tasks/{taskID}/messages/{messageID}:
    delete:
      tags:
        - tasks
      summary: Remove a queued message from a task
      description: >-
        Removes one message from a task's queue before the task takes it,
        answering 204.


        Use this tool when you need to:

        - Withdraw a follow-up sent to a task before a turn picks it up

        - Drop one of several messages queued behind the running turn


        Examples:

        - DELETE /tasks/{taskID}/messages/{messageID}

        - DELETE
        /tasks/6f1c2a9e-3b7d-4c55-9a2e-0d8b1f4e7c21/messages/2f8c4d1a-7b3e-4a9f-8c2d-5e6f7a8b9c0d


        Hints:

        - taskID is the task's uuid and messageID the id respondToTask answered
        for the message; the schema answers 422 for either when it is not a
        lowercase uuid.

        - Answers 204 with no body. A message the task has that is no longer
        queued, because a turn took it or it was removed already, is refused
        with 409 message_not_queued; a message the task does not have is 404.

        - A task whose status is queued cannot lose its last queued message:
        that removal is refused with 409 last_queued_message and removes
        nothing.

        - Use stopTask instead, with discard_queued_messages true, to drop every
        queued message at once, a queued task's last one included.

        - Restricted to the task's creator or an admin or owner of its
        organization: another member is refused with 403 control_forbidden, a
        viewer or billing member with 403 org_role_insufficient, a suspended
        organization with 403 org_suspended, an agent host's grant with 403
        agent_host_route_not_allowed, and a task the caller cannot see is 404;
        503 when the membership check is unavailable.

        - On its person's computer it takes back a message Aether still holds,
        or one whose run Aether holds back, which then leaves every read; a
        message already handed to the computer is 409 message_not_queued, and
        the first message of a task whose start has not run it is 409
        last_queued_message. A message of a chat the caller cannot read is 404,
        and one whose chat's can.send reads not_permitted is refused with its
        reason. An aether CLI below 0.2.64 is refused a task on a computer with
        409 task_backed_by_work_tree.
      operationId: removeTaskFromQueue
      parameters:
        - in: path
          name: taskID
          required: true
          schema:
            format: uuid
            pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            type: string
        - in: path
          name: messageID
          required: true
          schema:
            format: uuid
            pattern: ^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$
            type: string
      responses:
        '204':
          description: No Content
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TasksErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/TasksErrorResponse'
                  - $ref: '#/components/schemas/OrgAuthorizationErrorResponse'
                  - $ref: '#/components/schemas/ControlForbiddenErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TasksErrorResponse'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/TaskMessageNotQueuedErrorResponse'
                  - $ref: '#/components/schemas/TaskLastQueuedMessageErrorResponse'
                  - $ref: '#/components/schemas/TaskBackedByWorkTreeErrorResponse'
          description: Conflict
        '410':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TasksErrorResponse'
          description: Gone
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TasksErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TasksErrorResponse'
          description: Internal Server Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TasksErrorResponse'
          description: Service Unavailable
components:
  schemas:
    TasksErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - account_deleting
            - aether_inference_unserved
            - agent_pr_blocked
            - agent_pr_pending
            - agent_profile_changed
            - agent_starts_off
            - agent_uses_own_sign_in
            - answer_on_its_way
            - app_identity_missing
            - attachments_unsupported
            - attribution_unavailable
            - bad_gateway
            - bad_request
            - base_branch_unusable
            - branch_exists
            - caller_inactive
            - chat_archived
            - chat_being_forked
            - chat_moved
            - chat_not_removable
            - chat_settings_fixed
            - chats_not_addable
            - checkout_not_archivable
            - cli_upgrade_required
            - client_outdated
            - computer_cli_outdated
            - computer_starts_no_agents
            - computer_starts_no_forks
            - computer_unreachable
            - conflict
            - connection_creator_only
            - connection_harness_mismatch
            - connection_not_held
            - contents_write_required
            - continuation_failed
            - continuation_unavailable
            - control_forbidden
            - creator_github_access_missing
            - credential_kind_not_admitted
            - credential_named_file
            - detached_head
            - download_unsupported
            - embeddings_unavailable
            - feature_unsupported
            - file_references_unsupported
            - fix_not_requested
            - fix_requests_unrecorded
            - forbidden
            - fork_branch_delete_unsupported
            - fork_forbidden
            - fork_in_progress
            - fork_unsupported
            - gateway_timeout
            - github_claim_unverified
            - github_failed
            - github_identity_mismatch
            - github_identity_required
            - github_push_access_required
            - github_reconnect_required
            - github_ref_not_found
            - gone
            - handed_branch_protected
            - head_moved
            - html_render_nul_byte
            - html_render_too_large
            - idempotency_key_conflict
            - idempotency_key_reused
            - idle_compaction_not_pending
            - idle_compaction_skipped
            - inference_proxy_unavailable
            - insufficient_credits
            - insufficient_inference_balance
            - interaction_mode_unsupported
            - internal_error
            - invalid_request
            - last_queued_message
            - live_protocol_unsupported
            - main_chat_permanent
            - mcp_server_not_connected
            - merge_when_ready_requires_pr_review
            - message_not_queued
            - method_not_allowed
            - mode_forbidden
            - name_follows_session
            - no_checkout_on_computer
            - no_checkpoint_yet
            - no_commit
            - no_dispatch_target
            - no_main_chat
            - no_origin
            - no_turn_running
            - no_work_tree_folder
            - not_acceptable
            - not_found
            - not_implemented
            - onboarding_already_completed
            - onboarding_requirements_missing
            - open_in_terminal
            - org_id_required
            - org_role_insufficient
            - org_suspended
            - payment_required
            - pending_input_answered
            - permission_prompt_answered_in_terminal
            - permission_prompt_expired
            - permission_prompt_open
            - permission_prompt_stopped
            - pr_automation_unsupported
            - pr_review_actor_required
            - pr_review_connection_spent
            - pr_review_publish_forbidden
            - precondition_failed
            - project_archived
            - project_has_no_repository
            - project_repo_disconnected
            - project_repository_differs
            - project_required
            - pull_request_closed
            - pull_request_mirror_failed
            - pull_request_not_mirrored
            - push_failed
            - push_file_too_large
            - push_rejected
            - push_secret_detected
            - question_answers
            - question_shortened
            - queue_for_later_unsupported
            - queued_stop_requires_discard
            - rate_limited
            - reasoning_effort_fixed
            - repository_administration_not_granted
            - repository_already_connected
            - repository_create_forbidden
            - repository_create_rejected
            - repository_created_not_linked
            - repository_not_connected
            - repository_owner_not_caller
            - request_canceled
            - request_expired
            - request_timeout
            - request_too_large
            - review_name_follows_pull_request
            - sandbox_deleted
            - sandbox_failed
            - sandbox_needs_message
            - save_in_progress
            - save_requires_task_creator
            - service_unavailable
            - session_file_missing
            - session_gone
            - session_not_started_by_aether
            - slash_command
            - slash_commands_unsupported
            - stack_cycle
            - stack_too_large
            - stack_two_parents
            - stale_execution
            - stale_or_indeterminate
            - stale_pending_input
            - stream_delivery_gap
            - stream_event_conflict
            - task_already_saved
            - task_archived
            - task_awaiting_message
            - task_awaiting_tool_response
            - task_backed_by_work_tree
            - task_bound_at_creation
            - task_branch_diverged
            - task_branch_is_default
            - task_branch_mismatch
            - task_branch_missing
            - task_connection_disconnected
            - task_creator_deleted
            - task_executing
            - task_file_too_large
            - task_has_no_branch
            - task_has_no_commits
            - task_has_no_files
            - task_has_no_repository
            - task_history_has_merges
            - task_ineligible
            - task_is_child
            - task_not_accepting_messages
            - task_not_pinnable
            - task_not_started
            - task_rebase_in_progress
            - task_settings_changed
            - task_start_failed
            - task_start_pending
            - teleport_unavailable
            - terminal_chat
            - terminal_chat_continuation_refused
            - terminal_chat_run_running
            - terminal_question
            - too_large
            - too_many_live_connections
            - too_many_waiting_messages
            - turn_running
            - unauthenticated
            - unsigned_aether_head
            - unsigned_commit
            - unsupported_changes
            - unsupported_media_type
            - untyped_error
            - user_suspended
            - validation_failed
            - working_tree_dirty
            - workspace_git_unavailable
            - workspace_gone
            - workspace_outdated
            - workspace_rejected
            - workspace_start_failed
          minLength: 1
          type: string
        error:
          minLength: 1
          type: string
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
      required:
        - error
        - code
      type: object
    OrgAuthorizationErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - org_membership_required
            - org_role_insufficient
            - org_suspended
            - account_deleting
            - agent_host_route_not_allowed
            - credential_kind_not_admitted
            - grant_scope_insufficient
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    ControlForbiddenErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - control_forbidden
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    TaskMessageNotQueuedErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - message_not_queued
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    TaskLastQueuedMessageErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - last_queued_message
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    TaskBackedByWorkTreeErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - task_backed_by_work_tree
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

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