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

# Report the result of one run

> The terminal result of one lease. A report from a holder the fleet has already superseded is refused by the fence and writes nothing. A stale writer therefore cannot land a partial finalize on the current holder's run. 



## OpenAPI

````yaml https://raw.githubusercontent.com/agentsfleet/agentsfleet/main/public/openapi.json post /v1/runners/me/reports
openapi: 3.1.0
info:
  title: agentsfleet Control Plane API
  description: API for managing workspaces, fleets, triggers, and runs.
  contact:
    name: agentsfleet
    url: https://agentsfleet.net
  license:
    name: MIT
    identifier: MIT
  version: 1.0.0
servers:
  - url: https://api.agentsfleet.net
    description: Production
security: []
paths:
  /v1/runners/me/reports:
    post:
      tags:
        - Runners
      summary: Report the result of one run
      description: >-
        The terminal result of one lease. A report from a holder the fleet has
        already superseded is refused by the fence and writes nothing. A stale
        writer therefore cannot land a partial finalize on the current holder's
        run. 
      operationId: runner_report
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReportRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReportResponse'
        '401':
          description: No credential, or one this route does not accept
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '403':
          description: The credential is good and lacks the capability this route requires
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '413':
          description: The payload is over this route's ceiling
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '429':
          description: The instance is at its ceiling
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '500':
          description: The daemon failed to answer
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
        '503':
          description: A dependency this route needs is unreachable
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/ProblemBody'
      security:
        - RunnerBearerAuth: []
components:
  schemas:
    ReportRequest:
      type: object
      description: '`POST /v1/runners/me/reports` — one batched write keyed by event id.'
      required:
        - lease_id
        - event_id
        - fencing_token
        - outcome
        - failure_detail
        - response_text
        - tokens
        - input_tokens
        - cached_input_tokens
        - output_tokens
        - telemetry
        - checkpoint
      properties:
        cached_input_tokens:
          type: integer
          format: int32
          description: Cumulative cache-read tokens for the whole run.
          minimum: 0
        checkpoint:
          $ref: '#/components/schemas/ReportCheckpoint'
          description: Where to resume this session.
        event_id:
          type: string
          description: The event this report is about.
        failure_detail:
          type: string
          description: Human-readable cause, stored only on failure.
        failure_reason:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/FailureClass'
              description: The granular cause when the run failed.
        fencing_token:
          type: integer
          format: int64
          description: Monotonic guard, verified against the fleet's live sequence.
          minimum: 0
        input_tokens:
          type: integer
          format: int32
          description: Cumulative prompt tokens for the whole run.
          minimum: 0
        lease_id:
          type: string
          description: The lease being reported on.
        outcome:
          $ref: '#/components/schemas/Outcome'
          description: The binary verdict.
        output_tokens:
          type: integer
          format: int32
          description: Cumulative completion tokens for the whole run.
          minimum: 0
        response_text:
          type: string
          description: The run's output.
        telemetry:
          $ref: '#/components/schemas/ReportTelemetry'
          description: Latency the runner observed.
        tokens:
          type: integer
          format: int64
          description: |-
            The run's total tokens, for reporting. Billing charges the three
            cumulative fields below, which settle against the usage ledger.
          minimum: 0
      additionalProperties: false
    ReportResponse:
      type: object
      description: '`POST /v1/runners/me/reports` reply.'
      required:
        - ok
      properties:
        ok:
          type: boolean
          description: Whether the write landed.
      additionalProperties: false
    ProblemBody:
      type: object
      description: The body every refusal carries, under `application/problem+json`.
      required:
        - docs_uri
        - title
        - detail
        - error_code
        - request_id
      properties:
        action_id:
          type:
            - string
            - 'null'
          description: 'On that 409 only: the action the gate held.'
        current_state:
          type:
            - string
            - 'null'
          description: 'On a 409 only: the state that forbade the transition.'
        detail:
          type: string
          description: One sentence on what was refused and why.
        docs_uri:
          type: string
          description: Where the error code is documented.
        error_code:
          type: string
          description: The registry code, stable across releases.
        etag:
          type:
            - string
            - 'null'
          description: >-
            On a 412 only: the resource's current entity tag, to refetch and
            retry.
        gate_id:
          type:
            - string
            - 'null'
          description: 'On an answered approval gate''s 409 only: the gate that was answered.'
        missing_secrets:
          type:
            - array
            - 'null'
          items:
            type: string
          description: 'On a 424 only: the credentials this workspace has yet to store.'
        outcome:
          type:
            - string
            - 'null'
          description: 'On that 409 only: the answer that stands.'
        request_id:
          type: string
          description: The request this refusal answers, for support.
        resolved_at:
          type:
            - integer
            - 'null'
          format: int64
          description: 'On that 409 only: when the standing answer was given.'
        resolved_by:
          type:
            - string
            - 'null'
          description: 'On that 409 only: who gave it.'
        title:
          type: string
          description: A short name for the refusal, safe to show a person.
        user_message:
          type:
            - string
            - 'null'
          description: A curated sentence for end users, where the code has one.
    ReportCheckpoint:
      type: object
      description: Session resume cursor written to the fleet's stored session context.
      required:
        - last_event_id
        - last_response
      properties:
        last_event_id:
          type: string
          description: The last event this session processed.
        last_response:
          type: string
          description: The last response it produced.
      additionalProperties: false
    FailureClass:
      type: string
      description: Why a run failed, at the granularity the classification site knows.
      enum:
        - startup_posture
        - policy_deny
        - timeout_kill
        - oom_kill
        - resource_kill
        - runner_crash
        - transport_loss
        - landlock_deny
        - lease_expired
        - renewal_terminate
        - budget_breach
    Outcome:
      type: string
      description: >-
        The terminal verdict a runner reports.


        Mirrors the event statuses a RUNNER can produce; the daemon-side
        statuses are

        never runner-reported.
      enum:
        - processed
        - fleet_error
    ReportTelemetry:
      type: object
      description: Latency the runner observed for one run.
      required:
        - time_to_first_token_ms
        - wall_ms
      properties:
        time_to_first_token_ms:
          type: integer
          format: int32
          description: Milliseconds until the first token arrived.
          minimum: 0
        wall_ms:
          type: integer
          format: int64
          description: Total wall-clock milliseconds.
          minimum: 0
      additionalProperties: false
  securitySchemes:
    RunnerBearerAuth:
      type: http
      scheme: bearer
      bearerFormat: agt_r
      description: The opaque agt_r token minted when the runner enrols (POST /v1/runners)

````