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

# Diff a forked Session against its source

> Compares a fork with its recorded source: `id` must be a fork, and lineage is read from the branch's own ledger rather than from anything the caller claims. Returns the fork boundary (`through_event`, `through_sequence`), a tail summary per side past that boundary (positions scanned, event counts by type, the settling event, `last_seq`, and a `complete` flag that goes false when the bounded scan truncated), the diverged projection fields and both statuses, plus each side's Outcome and context-token totals. Unavailable positions are counted rather than guessed at, so erasure stays as visible here as in an export, and the whole view is derived on every read. An admin or root key may add `wire=true` for the model-wire drift block.

Checkfu support posture: alpha; hosted. Required evidence journey: session-turn. Deployment-specific readiness and the latest proven release are available from GET /v1/support/capabilities.



## OpenAPI

````yaml /openapi.json get /v1/sessions/{id}/diff
openapi: 3.1.0
info:
  title: Checkfu API
  version: '2026-08-27'
  description: >-
    Authentication is declared per operation: API-key, runtime, or connector
    bearer; Automation signature; or credential-free pairing redemption. Every
    general Checkfu REST request requires the dated `Checkfu-Version` header
    (one of: 2026-08-27); the three MCP JSON-RPC transports use
    `MCP-Protocol-Version`, A2A uses `A2A-Version`, and the provider OAuth
    callback carries neither Checkfu header. API keys resolve one Workspace
    without a request selector; authenticated responses identify it with
    `Checkfu-Workspace-Id`.
servers:
  - url: https://api.checkfu.com
security:
  - bearerAuth: []
tags:
  - name: organizations
  - name: sourceRepositories
  - name: tenants
  - name: workspaces
  - name: principals
  - name: principalGroups
  - name: principalAccessCredentials
  - name: apiKeys
  - name: agents
  - name: harnesses
  - name: harnessRuntime
  - name: sandboxProfiles
  - name: computerProfiles
  - name: permissionAssignments
  - name: actionPolicies
  - name: files
  - name: memoryStores
  - name: dreams
  - name: modelCredentials
  - name: modelRoutingProfiles
  - name: blueprintInstallations
  - name: toolSources
  - name: skills
  - name: skillSources
  - name: agentSources
  - name: skillProposals
  - name: instructionProposals
  - name: catalog
  - name: concepts
  - name: support
  - name: connections
  - name: connectionVaults
  - name: connectionAssignments
  - name: connectedRuntimes
  - name: projects
  - name: collaboration
  - name: automationGraphs
  - name: automations
  - name: actionApprovals
  - name: standingApprovals
  - name: usage
  - name: models
  - name: outcomes
  - name: budgets
  - name: billing
  - name: sessions
  - name: audit
  - name: sessionExports
  - name: runs
  - name: runnerPools
  - name: transcripts
  - name: sessionWatches
  - name: webhookEndpoints
  - name: integrationGateway
  - name: agentDeployments
  - name: workEnvironments
  - name: computers
  - name: computerScreens
  - name: computerBrowserObservations
  - name: computerBrowserActions
  - name: environments
  - name: vaults
  - name: apiMcp
  - name: a2a
paths:
  /v1/sessions/{id}/diff:
    get:
      tags:
        - sessions
      summary: Diff a forked Session against its source
      description: >-
        Compares a fork with its recorded source: `id` must be a fork, and
        lineage is read from the branch's own ledger rather than from anything
        the caller claims. Returns the fork boundary (`through_event`,
        `through_sequence`), a tail summary per side past that boundary
        (positions scanned, event counts by type, the settling event,
        `last_seq`, and a `complete` flag that goes false when the bounded scan
        truncated), the diverged projection fields and both statuses, plus each
        side's Outcome and context-token totals. Unavailable positions are
        counted rather than guessed at, so erasure stays as visible here as in
        an export, and the whole view is derived on every read. An admin or root
        key may add `wire=true` for the model-wire drift block.


        Checkfu support posture: alpha; hosted. Required evidence journey:
        session-turn. Deployment-specific readiness and the latest proven
        release are available from GET /v1/support/capabilities.
      operationId: sessions.diffSession
      parameters:
        - name: id
          in: path
          schema:
            $ref: '#/components/schemas/SessionId'
          required: true
        - name: checkfu-version
          in: header
          schema:
            type: string
            enum:
              - '2026-08-27'
          required: true
        - name: wire
          in: query
          schema:
            type: string
            enum:
              - 'true'
          required: false
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  source:
                    $ref: '#/components/schemas/SessionId'
                  branch:
                    $ref: '#/components/schemas/SessionId'
                  through_event:
                    $ref: '#/components/schemas/EventId'
                  through_sequence:
                    type: integer
                    allOf:
                      - exclusiveMinimum: 0
                  source_tail:
                    $ref: '#/components/schemas/Objects_164'
                  branch_tail:
                    $ref: '#/components/schemas/Objects_164'
                  projection:
                    type: object
                    properties:
                      source_status:
                        type: string
                      branch_status:
                        type: string
                      diverged_fields:
                        type: array
                        items:
                          type: string
                    required:
                      - source_status
                      - branch_status
                      - diverged_fields
                    additionalProperties: false
                  source_outcome:
                    anyOf:
                      - $ref: '#/components/schemas/Objects_165'
                      - type: 'null'
                  branch_outcome:
                    anyOf:
                      - $ref: '#/components/schemas/Objects_165'
                      - type: 'null'
                  source_context:
                    anyOf:
                      - $ref: '#/components/schemas/Objects_166'
                      - type: 'null'
                  branch_context:
                    anyOf:
                      - $ref: '#/components/schemas/Objects_166'
                      - type: 'null'
                  wire:
                    type: object
                    properties:
                      canonical_form_version:
                        type: number
                        enum:
                          - 1
                      source_calls:
                        type: integer
                        allOf:
                          - minimum: 0
                      branch_calls:
                        type: integer
                        allOf:
                          - minimum: 0
                      compared:
                        type: integer
                        allOf:
                          - minimum: 0
                      matched:
                        type: integer
                        allOf:
                          - minimum: 0
                      unreadable:
                        type: integer
                        allOf:
                          - minimum: 0
                      truncated:
                        type: boolean
                      first_divergence:
                        anyOf:
                          - type: object
                            properties:
                              index:
                                type: integer
                                allOf:
                                  - minimum: 0
                              source_seq:
                                anyOf:
                                  - type: integer
                                  - type: 'null'
                              branch_seq:
                                anyOf:
                                  - type: integer
                                  - type: 'null'
                            required:
                              - index
                              - source_seq
                              - branch_seq
                            additionalProperties: false
                          - type: 'null'
                    required:
                      - canonical_form_version
                      - source_calls
                      - branch_calls
                      - compared
                      - matched
                      - unreadable
                      - truncated
                      - first_divergence
                    additionalProperties: false
                required:
                  - source
                  - branch
                  - through_event
                  - through_sequence
                  - source_tail
                  - branch_tail
                  - projection
                  - source_outcome
                  - branch_outcome
                  - source_context
                  - branch_context
                additionalProperties: false
          headers:
            checkfu-workspace-id:
              description: The Workspace resolved from the authenticated bearer credential.
              required: true
              schema:
                $ref: '#/components/schemas/WorkspaceId'
        '400':
          description: Typed Checkfu wire error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationMalformedError'
        '401':
          description: Typed Checkfu wire error
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - type
                      - message
                      - more
                    properties:
                      type:
                        type: string
                        enum:
                          - auth.invalid_key
                      message:
                        type: string
                      more:
                        type: string
                        enum:
                          - >-
                            https://docs.checkfu.com/reference/errors#auth-invalid-key
                        description: >-
                          Stable public documentation and remedy for this error
                          type.
                    additionalProperties: false
                additionalProperties: false
        '403':
          description: >-
            The organization, tenant, or workspace backing this key is
            administratively disabled. | Deployment governance or retention
            policy denied the request.
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    required:
                      - error
                    properties:
                      error:
                        type: object
                        properties:
                          type:
                            type: string
                            enum:
                              - auth.disabled_tenancy
                          message:
                            type: string
                          more:
                            type: string
                            enum:
                              - >-
                                https://docs.checkfu.com/reference/errors#auth-disabled-tenancy
                            description: >-
                              Stable public documentation and remedy for this
                              error type.
                        required:
                          - type
                          - message
                          - more
                        additionalProperties: false
                    additionalProperties: false
                  - $ref: '#/components/schemas/PolicyDeniedError'
        '404':
          description: >-
            The requested resource does not exist in the resolved deployment
            boundary.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationNotFoundError'
        '429':
          description: Typed Checkfu wire error
          headers:
            retry-after:
              description: >-
                Delay in seconds for rate limits or deployment quotas with a
                known release or UTC reset boundary
              required: false
              schema:
                type: integer
                minimum: 1
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - type
                      - message
                      - more
                    properties:
                      type:
                        type: string
                        enum:
                          - budget.exceeded
                      message:
                        type: string
                      more:
                        type: string
                        enum:
                          - >-
                            https://docs.checkfu.com/reference/errors#budget-exceeded
                        description: >-
                          Stable public documentation and remedy for this error
                          type.
                    additionalProperties: false
                additionalProperties: false
        '500':
          description: >-
            An unexpected internal failure occurred; the message contains an
            opaque incident reference.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RuntimeInternalError'
      security:
        - bearerAuth: []
components:
  schemas:
    SessionId:
      type: string
      allOf:
        - pattern: ^sess_[0-9a-f]{32}$
    EventId:
      type: string
      allOf:
        - pattern: ^evt_[0-9a-f]{32}$
    Objects_164:
      type: object
      properties:
        session:
          $ref: '#/components/schemas/SessionId'
        positions:
          type: integer
          allOf:
            - minimum: 0
        events:
          type: integer
          allOf:
            - minimum: 0
        unavailable:
          type: integer
          allOf:
            - minimum: 0
        by_type:
          type: array
          items:
            type: object
            properties:
              type:
                type: string
              count:
                type: integer
                allOf:
                  - exclusiveMinimum: 0
            required:
              - type
              - count
            additionalProperties: false
        settled:
          anyOf:
            - type: object
              properties:
                type:
                  type: string
                seq:
                  type: integer
                  allOf:
                    - exclusiveMinimum: 0
              required:
                - type
                - seq
              additionalProperties: false
            - type: 'null'
        last_seq:
          type: integer
          allOf:
            - minimum: 0
        complete:
          type: boolean
      required:
        - session
        - positions
        - events
        - unavailable
        - by_type
        - settled
        - last_seq
        - complete
      additionalProperties: false
    Objects_165:
      type: object
      properties:
        outcome:
          $ref: '#/components/schemas/OutcomeId'
        iteration:
          type: integer
          allOf:
            - minimum: 0
        result:
          anyOf:
            - type: string
            - type: 'null'
      required:
        - outcome
        - iteration
        - result
      additionalProperties: false
    Objects_166:
      type: object
      properties:
        cumulative_tokens:
          type: integer
          allOf:
            - minimum: 0
        current_context_tokens:
          type: integer
          allOf:
            - minimum: 0
        condensations:
          type: integer
          allOf:
            - minimum: 0
      required:
        - cumulative_tokens
        - current_context_tokens
        - condensations
      additionalProperties: false
    WorkspaceId:
      type: string
      allOf:
        - pattern: ^wrkspc_[0-9a-f]{32}$
    ValidationMalformedError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - validation.malformed
            message:
              type: string
            more:
              type: string
              enum:
                - https://docs.checkfu.com/reference/errors#validation-malformed
              description: Stable public documentation and remedy for this error type.
          required:
            - type
            - message
            - more
          additionalProperties: false
      required:
        - error
      additionalProperties: false
      description: >-
        The request could not be decoded or violated a declared input
        constraint.
    PolicyDeniedError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - policy.denied
            message:
              type: string
            more:
              type: string
              enum:
                - https://docs.checkfu.com/reference/errors#policy-denied
              description: Stable public documentation and remedy for this error type.
          required:
            - type
            - message
            - more
          additionalProperties: false
      required:
        - error
      additionalProperties: false
      description: Deployment governance or retention policy denied the request.
    ValidationNotFoundError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - validation.not_found
            message:
              type: string
            more:
              type: string
              enum:
                - https://docs.checkfu.com/reference/errors#validation-not-found
              description: Stable public documentation and remedy for this error type.
          required:
            - type
            - message
            - more
          additionalProperties: false
      required:
        - error
      additionalProperties: false
      description: >-
        The requested resource does not exist in the resolved deployment
        boundary.
    RuntimeInternalError:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - runtime.internal
            message:
              type: string
            more:
              type: string
              enum:
                - https://docs.checkfu.com/reference/errors#runtime-internal
              description: Stable public documentation and remedy for this error type.
          required:
            - type
            - message
            - more
          additionalProperties: false
      required:
        - error
      additionalProperties: false
      description: >-
        An unexpected internal failure occurred; the message contains an opaque
        incident reference.
    OutcomeId:
      type: string
      allOf:
        - pattern: ^outc_[0-9a-f]{32}$
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````