> ## Documentation Index
> Fetch the complete documentation index at: https://agno-v2-docs-agentos-durable-background-execution.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Requeue Failed Queue Job

> Requeue a terminally failed or cancelled job for one more execution (raises its attempt budget by one). The operator remedy for crashed runs under the no-silent-re-execution default. Requeueing a CANCELLED job whose cancellation intent is still live requires clear_cancellation=true - an explicit override of the recorded cancel; without it the re-driven attempt is re-cancelled at its first checkpoint. Requeueing a job that FAILED within the last lock_grace seconds requires force=true: its worker may still be executing (swept-but-alive), and a second producer would race unfenced writes.



## OpenAPI

````yaml /reference-api/openapi.yaml post /queue/jobs/{job_id}/requeue
openapi: 3.1.0
info:
  title: Agno API Reference
  description: The all-in-one, private, secure agent platform that runs in your cloud.
  version: 2.7.2
servers: []
security: []
paths:
  /queue/jobs/{job_id}/requeue:
    post:
      tags:
        - Queue
      summary: Requeue Failed Queue Job
      description: >-
        Requeue a terminally failed or cancelled job for one more execution
        (raises its attempt budget by one). The operator remedy for crashed runs
        under the no-silent-re-execution default. Requeueing a CANCELLED job
        whose cancellation intent is still live requires clear_cancellation=true
        - an explicit override of the recorded cancel; without it the re-driven
        attempt is re-cancelled at its first checkpoint. Requeueing a job that
        FAILED within the last lock_grace seconds requires force=true: its
        worker may still be executing (swept-but-alive), and a second producer
        would race unfenced writes.
      operationId: requeue_queue_job
      parameters:
        - name: job_id
          in: path
          required: true
          schema:
            type: string
            title: Job Id
        - name: clear_cancellation
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Clear Cancellation
        - name: force
          in: query
          required: false
          schema:
            type: boolean
            default: false
            title: Force
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/QueueJobSchema'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthenticatedResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerErrorResponse'
        '503':
          description: Durable job queue not enabled on this replica
      security:
        - HTTPBearer: []
components:
  schemas:
    QueueJobSchema:
      properties:
        id:
          type: string
          title: Id
          description: Job ID (identical to the run's run_id)
        component_type:
          type: string
          title: Component Type
          description: 'Component kind: agent, team or workflow'
        component_id:
          type: string
          title: Component Id
          description: ID of the agent/team/workflow the run executes on
        session_id:
          type: string
          title: Session Id
          description: Session the run belongs to
        job_type:
          type: string
          title: Job Type
          description: Kind of work the ticket carries (runs only today)
          default: run
        user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: User Id
          description: User the run was submitted for
        payload:
          additionalProperties: true
          type: object
          title: Payload
          description: Serialized run parameters
        status:
          type: string
          title: Status
          description: queued | running | completed | failed | cancelled | paused
        attempt:
          type: integer
          title: Attempt
          description: Executions started so far
          default: 0
        max_attempts:
          type: integer
          title: Max Attempts
          description: Execution budget under any failure mode
          default: 1
        idempotency_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Idempotency Key
          description: Client-provided dedupe key, if any
        available_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Available At
          description: Epoch seconds the job becomes claimable
        locked_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Locked By
          description: Worker currently holding the job's lock
        locked_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Locked At
          description: Epoch seconds the current lock was taken
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
          description: Terminal error of the last attempt, if any
        created_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Created At
          description: Epoch seconds the job was accepted
        updated_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Updated At
          description: Epoch seconds of the last state change
        completed_at:
          anyOf:
            - type: integer
            - type: 'null'
          title: Completed At
          description: Epoch seconds the job reached a terminal state
      type: object
      required:
        - id
        - component_type
        - component_id
        - session_id
        - status
      title: QueueJobSchema
      description: One durable queue job (a background run's queue ticket).
    BadRequestResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Error detail message
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: Error code for categorization
      type: object
      required:
        - detail
      title: BadRequestResponse
      example:
        detail: Bad request
        error_code: BAD_REQUEST
    UnauthenticatedResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Error detail message
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: Error code for categorization
      type: object
      required:
        - detail
      title: UnauthenticatedResponse
      example:
        detail: Unauthenticated access
        error_code: UNAUTHENTICATED
    NotFoundResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Error detail message
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: Error code for categorization
      type: object
      required:
        - detail
      title: NotFoundResponse
      example:
        detail: Not found
        error_code: NOT_FOUND
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    InternalServerErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Error detail message
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
          description: Error code for categorization
      type: object
      required:
        - detail
      title: InternalServerErrorResponse
      example:
        detail: Internal server error
        error_code: INTERNAL_SERVER_ERROR
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````