Reason Machines · Schema

Session

Artificial IntelligenceAutomationPlatformSoftware-as-a-ServiceMachine LearningCompany

Properties

Name Type Description
follow_up object Opt-in detail field: request fields=follow_up. Null when temporarily unavailable. Durable follow-through state. Pending check-ins do not change lifecycle status; merge is never evidence of deployment
benchmark_profile object Always null: benchmark_profile is retired.
runtime_profile object runtime/reason-sync-yield-v1 on a retired isolated Session that requested it through the retired runtime_profile field. Null otherwise.
experimental_runtime_profile object The runtime profile the Session's latest Attempt runs: the default C2 harness on every Session that runs it, whether or not its request named it (a Session of the retired runtime/reason-capability-she
experimental_runtime_features arraynull The runtime features the Session's create named (experimental_runtime_features), in canonical order. Null when it named none.
session_policy object Server-resolved immutable Session policy. Enabled components remain subject to normal permissions and configuration.
session_id string The Session's stable id; pass it as sessionId to the other session tools.
placement_receipt object
origin string Where the Session was started: ui is the Reason app, external:cli, external:mcp and external:api the CLI, an MCP client and the API.
origin_agent stringnull Name of the agent or client that started the Session, when known.
agent_identity_source object How origin_agent was established: self_reported by the caller, from the credential, or from the Device.
status string Lifecycle state, not task success: running, exit (execution completed), error (execution failed), or suspended (cancelled/quota; suspended_reason says which). An exit can have outcome failure or actio
suspended_reason object Why status is suspended: cancelled (an explicit cancel stopped the Session) or quota_exhausted (the Workspace ran out of quota). Null for every other status.
url string Web URL to watch the session.
created_at stringnull When the Session was created.
started_at stringnull When execution started; null before it starts.
finished_at stringnull When execution finished; null while running.
updated_at stringnull When the Session's current Attempt last changed (status, result, pull request, usage); sort or diff on it to see which Sessions moved since a previous read.
title stringnull Display title: the Session's own title, else the issue title, else the start of the opening prompt.
prompt stringnull The opening instruction, truncated to 16 KiB. Check prompt_truncated; read the session messages for the full text.
prompt_truncated boolean True when prompt was cut to the 16 KiB echo limit.
prompt_bytes integernull UTF-8 byte length of the full prompt, before truncation.
tags array The Session's tag labels; empty when it has none.
project_id stringnull Deprecated: Projects are retired in favour of Reasons. Project containing the session, or null for an unassigned session.
reason_id stringnull The Reason (listReasons) this Session is listed under: the one whose conversation started it, directly or through the Sessions it started. A Session filed in a former Project names that Project's id,
created_by_session_id stringnull The Session whose agent started this one with sessions_create; null when a person, a trigger or a Loop started it.
delegation object The delegation limits a caller set for this Session's tree (see `delegation` on createSession); absent when none were set, which is the default tree.
automation_id stringnull The automation (Loop) whose trigger started this Session, as listReasonLoops (or listAutomations) names it; null otherwise.
target object Present on GET: the execution target this Session was created with (`cloud`, or the Device and root it runs on). A later handoff is not reflected. A Machine target reads back as its placed headless wo
machine object
repo stringnull The Session's starting repository as owner/name; null for a repository-neutral Session.
provider object Source-control provider for the session repository.
model stringnull Concrete model selected for this session, or null when inherited.
reason_version stringnull The Reason Agent version (X.Y, e.g. 1.4 for Reason Agent 1.4) of the server that executed the Session's latest turn. It names the daily release; reason_commit_sha is the exact build. During a rolling
reason_commit_sha stringnull The commit the server that executed the Session's latest turn was built from. Null when reason_version is null or the build carried no commit.
reasoning_effort stringnull Reasoning effort override the Session runs with; null when none was set.
hands_mode string Durable physical execution policy. Brain-only sessions never acquire a shell, browser, sandbox, or physical secret environment.
branch stringnull Name of the Session's working branch in its workspace. It is assigned when the machine starts, before any commit, so it exists on the remote only once the Session pushed to it: check pr_url and branch
branch_has_commits booleannull Whether the working branch reached the remote without a pull request: true when it has pushed commits, false when the Session ended without pushing any (the branch may not exist on the remote). Null w
pr_url stringnull URL of the pull request the Session opened or continued; null when there is none.
pr_title stringnull Title of that pull request.
result_summary stringnull Text summary of the latest turn's answer; null before a turn finishes.
outcome object The task verdict, and the one field that says whether the work succeeded: the task succeeded if and only if outcome is success. Retrieve a session and List sessions report the same value. With `comple
result object Caller-defined JSON result for a noninteractive completion, or the ordinary final summary for legacy Sessions.
blocker stringnull When outcome is failure or action_required: what blocked the Session and the next step a person takes, in one sentence the agent wrote (for example "Connect 1password: the deploy reads its token from
failure objectnull Why the latest turn stopped and how to get it going again, for a caller that does not read the transcript. Null while running and when the turn did not stop on a failure (an agent's own verdict is in
error_class stringnull Stable runtime failure class when execution did not produce a task outcome. Runtime codes use the run_ prefix (for example run_error, run_timeout, run_cancelled) and cloud execution codes the cloud_ p
usage_limit_resume objectnull Present on GET: the pending automatic continuation after a connected model account's usage limit. Null when none is pending, including after Stop or newer input. A pending continuation does not guaran
error_message stringnull Redacted persisted error preview, bounded to 1000 characters; null when unavailable.
failure_diagnostics objectnull Where and why the latest Attempt failed: the attribution its failure recorded when it ended the Attempt, else derived from the stored failure signature. An unknown stage remains null.
failure_stage stringnull Execution stage where failure occurred.
reason_code stringnull Specific machine-readable reason code for the failure. Runtime and cloud execution codes use the run_ and cloud_ prefixes, as in error_class.
root_cause stringnull Root cause classification of the failure.
previous_attempt_failure objectnull The most recent failed Attempt of the current Turn before the current Attempt, so a failure stays readable after a retry replaced it (for example a cloud_device_unavailable start failure followed by a
diagnostic_message stringnull Fixed public message selected from an allowlisted persisted error class, never error prose, prompts or tool output. Null when unknown.
duration_ms integernull Execution time in milliseconds; null when not recorded.
cost_usd numbernull Total model spend in USD across the session's turns. Null when usage was never reported.
usage object Token usage totals for the session. Fields are null for runs that predate usage persistence.
context object Live context occupancy after the latest turn (not billing throughput).
is_archived boolean True when the Session is archived (archiveSession); listSessions hides it unless status is archived or all.
session_type string Session, sidechat fork, or read-only subagent Session.
source_session_id stringnull The fork source for a sidechat or spawning Session for a subagent; null for a normal Session.
read_only boolean True only for subagent Sessions.
repos array Every repository currently attached to the session, as owner/name. Present on Retrieve a session only, and only when recorded.
run object
change_requests array Every change request the session opened, including ones in repositories other than `repo`. Present on Retrieve a session only, and only when recorded.
View JSON Schema on GitHub

JSON Schema

reasonmachines-com-session-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/reasonmachines-com/json-schema/reasonmachines-com-session-schema.json",
  "title": "Session",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/reasonmachines-com-openapi.json#/components/schemas/Session",
  "type": "object",
  "properties": {
    "follow_up": {
      "description": "Opt-in detail field: request fields=follow_up. Null when temporarily unavailable. Durable follow-through state. Pending check-ins do not change lifecycle status; merge is never evidence of deployment or verification.",
      "anyOf": [
        {
          "$ref": "#/$defs/SessionFollowUp"
        },
        {
          "type": "null"
        }
      ]
    },
    "benchmark_profile": {
      "description": "Always null: benchmark_profile is retired.",
      "oneOf": [
        {
          "type": "string",
          "const": "coding-benchmark-v1"
        },
        {
          "type": "null"
        }
      ]
    },
    "runtime_profile": {
      "description": "runtime/reason-sync-yield-v1 on a retired isolated Session that requested it through the retired runtime_profile field. Null otherwise.",
      "oneOf": [
        {
          "type": "string",
          "const": "runtime/reason-sync-yield-v1"
        },
        {
          "type": "null"
        }
      ]
    },
    "experimental_runtime_profile": {
      "description": "The runtime profile the Session's latest Attempt runs: the default C2 harness on every Session that runs it, whether or not its request named it (a Session of the retired runtime/reason-capability-shell-v1 continues on it) — reported as runtime/reason-c2-tools-v7; runtime/reason-v7-sync-yield-v1 or runtime/reason-v7-sync-yield-machine-sdk-v1 on a stored Session of that retired harness; runtime/reason-v7-2026-10, runtime/reason-v7-2026-11, runtime/reason-v8-2026-10, runtime/reason-v8.1-2026-10, runtime/reason-v8.2-2026-10, runtime/reason-agent-1.2, runtime/reason-agent-1.3 or runtime/reason-agent-1.3.1 on a Session that runs it; a Session of a deleted v7 evaluation profile reports the default C2 harness, which it re-admits to. Null otherwise.",
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "runtime/reason-c2-tools-v7",
            "runtime/reason-v7-sync-yield-v1",
            "runtime/reason-v7-sync-yield-machine-sdk-v1",
            "runtime/reason-v7-2026-10",
            "runtime/reason-v7-2026-11",
            "runtime/reason-v8-2026-10",
            "runtime/reason-v8.1-2026-10",
            "runtime/reason-v8.2-2026-10",
            "runtime/reason-agent-1.2",
            "runtime/reason-agent-1.3",
            "runtime/reason-agent-1.3.1"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "experimental_runtime_features": {
      "description": "The runtime features the Session's create named (experimental_runtime_features), in canonical order. Null when it named none.",
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string",
        "enum": [
          "banner",
          "sdk_index",
          "service_tier",
          "output_cap",
          "git_metadata",
          "serial_reads",
          "recovery_defer_idle_hands",
          "fewer_tests_low",
          "fewer_tests_medium",
          "fewer_tests_high",
          "fewer_tests_max",
          "fewer_tests_max_alone",
          "verify_line_alone",
          "addendum_placebo",
          "bash_yield",
          "sync_bash",
          "turn_line_removed",
          "turn_line_questions",
          "output_cap_continue",
          "image_history_append_only",
          "cache_ttl_1h"
        ]
      }
    },
    "session_policy": {
      "type": "object",
      "properties": {
        "version": {
          "type": "number",
          "const": 1,
          "description": "Version of this policy shape."
        },
        "mode": {
          "type": "string",
          "enum": [
            "standard",
            "isolated",
            "ephemeral"
          ],
          "description": "How the Session runs: standard for normal work, ephemeral for a single benchmark trial. isolated is retired: only Sessions created before its retirement report it, and a retry, follow-up, wake or move of one returns 409 session_mode_retired."
        },
        "components": {
          "type": "object",
          "properties": {
            "memoryRead": {
              "type": "boolean",
              "description": "Whether memory reads are enabled."
            },
            "memoryWrite": {
              "type": "boolean",
              "description": "Whether memory writes are enabled."
            },
            "skills": {
              "type": "boolean",
              "description": "Whether skills are enabled."
            },
            "inheritedInstructions": {
              "type": "boolean",
              "description": "Whether inherited instructions are enabled."
            },
            "integrations": {
              "type": "boolean",
              "description": "Whether integrations are enabled."
            },
            "secretInjection": {
              "type": "boolean",
              "description": "Whether secret injection is enabled."
            }
          },
          "required": [
            "memoryRead",
            "memoryWrite",
            "skills",
            "inheritedInstructions",
            "integrations",
            "secretInjection"
          ],
          "description": "The optional capability families, each enabled (true) or disabled (false) for this Session."
        },
        "workspaceOwnership": {
          "type": "string",
          "enum": [
            "managed",
            "externally-managed"
          ],
          "description": "Filesystem persistence owner. Sessions created with the deprecated ara-managed spelling report managed."
        },
        "personalContext": {
          "description": "Present and false when the Session was created with personal_context: false: it runs without its creator's personal skills, memory, secrets and connections. Absent when the creator's personal context loads.",
          "type": "boolean",
          "const": false
        },
        "pullRequestPolicy": {
          "description": "Present as draft_only when the Session was created with pull_request_policy: draft_only: its pull requests stay drafts and it cannot merge, queue, auto-merge or mark one ready. Absent for the normal delivery flow.",
          "type": "string",
          "const": "draft_only"
        }
      },
      "required": [
        "version",
        "mode",
        "components",
        "workspaceOwnership"
      ],
      "description": "Server-resolved immutable Session policy. Enabled components remain subject to normal permissions and configuration."
    },
    "session_id": {
      "type": "string",
      "description": "The Session's stable id; pass it as sessionId to the other session tools."
    },
    "placement_receipt": {
      "$ref": "#/$defs/PlacementReceipt"
    },
    "origin": {
      "type": "string",
      "enum": [
        "ui",
        "external:cli",
        "external:mcp",
        "external:api"
      ],
      "description": "Where the Session was started: ui is the Reason app, external:cli, external:mcp and external:api the CLI, an MCP client and the API."
    },
    "origin_agent": {
      "description": "Name of the agent or client that started the Session, when known.",
      "type": [
        "string",
        "null"
      ]
    },
    "agent_identity_source": {
      "description": "How origin_agent was established: self_reported by the caller, from the credential, or from the Device.",
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "self_reported",
            "credential",
            "device"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "running",
        "exit",
        "error",
        "suspended"
      ],
      "description": "Lifecycle state, not task success: running, exit (execution completed), error (execution failed), or suspended (cancelled/quota; suspended_reason says which). An exit can have outcome failure or action_required. The task succeeded if and only if outcome is success; check outcome, result, and diagnostics before treating work as successful."
    },
    "suspended_reason": {
      "description": "Why status is suspended: cancelled (an explicit cancel stopped the Session) or quota_exhausted (the Workspace ran out of quota). Null for every other status.",
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "cancelled",
            "quota_exhausted"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "url": {
      "type": "string",
      "description": "Web URL to watch the session."
    },
    "created_at": {
      "description": "When the Session was created.",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "started_at": {
      "description": "When execution started; null before it starts.",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "finished_at": {
      "description": "When execution finished; null while running.",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "updated_at": {
      "description": "When the Session's current Attempt last changed (status, result, pull request, usage); sort or diff on it to see which Sessions moved since a previous read.",
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "title": {
      "description": "Display title: the Session's own title, else the issue title, else the start of the opening prompt.",
      "type": [
        "string",
        "null"
      ]
    },
    "prompt": {
      "description": "The opening instruction, truncated to 16 KiB. Check prompt_truncated; read the session messages for the full text.",
      "type": [
        "string",
        "null"
      ]
    },
    "prompt_truncated": {
      "type": "boolean",
      "description": "True when prompt was cut to the 16 KiB echo limit."
    },
    "prompt_bytes": {
      "description": "UTF-8 byte length of the full prompt, before truncation.",
      "type": [
        "integer",
        "null"
      ]
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "The Session's tag labels; empty when it has none."
    },
    "project_id": {
      "deprecated": true,
      "description": "Deprecated: Projects are retired in favour of Reasons. Project containing the session, or null for an unassigned session.",
      "type": [
        "string",
        "null"
      ],
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "reason_id": {
      "description": "The Reason (listReasons) this Session is listed under: the one whose conversation started it, directly or through the Sessions it started. A Session filed in a former Project names that Project's id, which its Reason kept. Null when no Reason started it.",
      "type": [
        "string",
        "null"
      ]
    },
    "created_by_session_id": {
      "description": "The Session whose agent started this one with sessions_create; null when a person, a trigger or a Loop started it.",
      "type": [
        "string",
        "null"
      ]
    },
    "delegation": {
      "type": "object",
      "properties": {
        "max_depth": {
          "type": "integer",
          "minimum": 1,
          "maximum": 5,
          "description": "How deep the tree may nest below its root Session."
        },
        "children_can_create_sessions": {
          "type": "boolean",
          "description": "Whether subagents above the last level may create Sessions that join the tree."
        }
      },
      "required": [
        "max_depth",
        "children_can_create_sessions"
      ],
      "description": "The delegation limits a caller set for this Session's tree (see `delegation` on createSession); absent when none were set, which is the default tree."
    },
    "automation_id": {
      "description": "The automation (Loop) whose trigger started this Session, as listReasonLoops (or listAutomations) names it; null otherwise.",
      "type": [
        "string",
        "null"
      ]
    },
    "target": {
      "anyOf": [
        {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "cloud",
                  "description": "Run on Reason-managed cloud compute."
                }
              },
              "required": [
                "kind"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "mac"
                },
                "device_id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "root_id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                }
              },
              "required": [
                "kind",
                "device_id",
                "root_id"
              ],
              "additionalProperties": false
            },
            {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "const": "headless",
                  "description": "Run on a CLI-connected computer or externally provisioned worker."
                },
                "device_id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
                  "description": "Connected computer or worker ID returned by listDevices."
                },
                "root_id": {
                  "type": "string",
                  "format": "uuid",
                  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
                },
                "workspace_mode": {
                  "description": "Defaults to a stable Session-managed checkout. project_root explicitly operates the selected existing root.",
                  "type": "string",
                  "enum": [
                    "managed",
                    "project_root"
                  ]
                },
                "workspace_path": {
                  "description": "Absolute path of the project_root on the Device, as the client sees it (for example /app). Read only with workspace_mode project_root, as the working directory the default C2 harness names in its model prompt; ignored otherwise, and rejected when the request names experimental_runtime_profile runtime/reason-c2-tools-v7. It grants nothing and never selects a directory.",
                  "type": "string",
                  "maxLength": 4096,
                  "pattern": "^\\/[^\\u0000\\r\\n]*$"
                }
              },
              "required": [
                "kind",
                "device_id",
                "root_id"
              ],
              "additionalProperties": false
            }
          ]
        },
        {
          "type": "null"
        }
      ],
      "description": "Present on GET: the execution target this Session was created with (`cloud`, or the Device and root it runs on). A later handoff is not reflected. A Machine target reads back as its placed headless worker; see `machine`."
    },
    "machine": {
      "$ref": "#/$defs/SessionMachine"
    },
    "repo": {
      "description": "The Session's starting repository as owner/name; null for a repository-neutral Session.",
      "type": [
        "string",
        "null"
      ]
    },
    "provider": {
      "description": "Source-control provider for the session repository.",
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "github",
            "gitlab"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "model": {
      "description": "Concrete model selected for this session, or null when inherited.",
      "type": [
        "string",
        "null"
      ]
    },
    "reason_version": {
      "description": "The Reason Agent version (X.Y, e.g. 1.4 for Reason Agent 1.4) of the server that executed the Session's latest turn. It names the daily release; reason_commit_sha is the exact build. During a rolling deploy this is the release that actually ran the turn, not the newest one. Null before the turn starts and for turns that ran before versions were recorded.",
      "type": [
        "string",
        "null"
      ]
    },
    "reason_commit_sha": {
      "description": "The commit the server that executed the Session's latest turn was built from. Null when reason_version is null or the build carried no commit.",
      "type": [
        "string",
        "null"
      ]
    },
    "reasoning_effort": {
      "description": "Reasoning effort override the Session runs with; null when none was set.",
      "type": [
        "string",
        "null"
      ]
    },
    "hands_mode": {
      "type": "string",
      "enum": [
        "adaptive",
        "brain_only"
      ],
      "description": "Durable physical execution policy. Brain-only sessions never acquire a shell, browser, sandbox, or physical secret environment."
    },
    "branch": {
      "description": "Name of the Session's working branch in its workspace. It is assigned when the machine starts, before any commit, so it exists on the remote only once the Session pushed to it: check pr_url and branch_has_commits.",
      "type": [
        "string",
        "null"
      ]
    },
    "branch_has_commits": {
      "description": "Whether the working branch reached the remote without a pull request: true when it has pushed commits, false when the Session ended without pushing any (the branch may not exist on the remote). Null while undetermined, and when pr_url is set.",
      "type": [
        "boolean",
        "null"
      ]
    },
    "pr_url": {
      "description": "URL of the pull request the Session opened or continued; null when there is none.",
      "type": [
        "string",
        "null"
      ]
    },
    "pr_title": {
      "description": "Title of that pull request.",
      "type": [
        "string",
        "null"
      ]
    },
    "result_summary": {
      "description": "Text summary of the latest turn's answer; null before a turn finishes.",
      "type": [
        "string",
        "null"
      ]
    },
    "outcome": {
      "description": "The task verdict, and the one field that says whether the work succeeded: the task succeeded if and only if outcome is success. Retrieve a session and List sessions report the same value. With `completion_mode: run_outcome` it is the verdict the agent recorded (success, failure, or action_required when a person or an unavailable dependency must act); a run that stops without recording one never reports success, normally action_required with its reply in result. Recording a verdict is a tool call, so a prompt that forbids tools gets action_required even when the reply is correct. Without `completion_mode` no verdict is recorded: an exit reports success because the execution completed (action_required when the turn ended waiting on a person), which does not say the work was checked. Null while running and when status is error or suspended without a verdict.",
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "success",
            "failure",
            "action_required"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "result": {
      "description": "Caller-defined JSON result for a noninteractive completion, or the ordinary final summary for legacy Sessions."
    },
    "blocker": {
      "description": "When outcome is failure or action_required: what blocked the Session and the next step a person takes, in one sentence the agent wrote (for example \"Connect 1password: the deploy reads its token from the vault\"). The agent states it when it records the verdict, or it is the access card the turn waits on. Null when the agent stated none, while running, and when outcome is success. List sessions reports it on each row.",
      "type": [
        "string",
        "null"
      ]
    },
    "failure": {
      "description": "Why the latest turn stopped and how to get it going again, for a caller that does not read the transcript. Null while running and when the turn did not stop on a failure (an agent's own verdict is in `outcome` and `blocker`). List sessions reports it on each row.",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "category": {
          "type": "string",
          "description": "What kind of stop, for example `cloud_start_failed`, `model_auth`, `provider_model_not_included`, `integration_access` or `runtime_failure`. New categories may appear."
        },
        "title": {
          "type": "string",
          "description": "A few words, as the app titles the notice."
        },
        "message": {
          "type": "string",
          "description": "One or two plain sentences: what happened and how to get going again, the same words the app shows."
        },
        "resolution": {
          "type": "string",
          "enum": [
            "retry",
            "change_request",
            "person",
            "none"
          ],
          "description": "Who can get it going again. `retry`: send the same request again (sendSessionMessage, or create the Session again); nothing needs changing. `change_request`: edit the request or choose another model, then send it. `person`: only someone with access to the workspace or its accounts can fix it (a signed-out model account, credits, a plan, a connection's access); give them `message` and the `actions` link, and retry once they say it is fixed. `none`: a person stopped it on purpose."
        },
        "actions": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "label": {
                "type": "string",
                "description": "The button's words in the app, for example `Reconnect` or `Open Billing`."
              },
              "url": {
                "type": "string",
                "description": "Where the fix is, in the Reason app."
              }
            },
            "required": [
              "label",
              "url"
            ]
          },
          "description": "Links to the fix in the Reason app; empty when there is nothing to open."
        }
      },
      "required": [
        "category",
        "title",
        "message",
        "resolution",
        "actions"
      ]
    },
    "error_class": {
      "description": "Stable runtime failure class when execution did not produce a task outcome. Runtime codes use the run_ prefix (for example run_error, run_timeout, run_cancelled) and cloud execution codes the cloud_ prefix (for example cloud_device_unavailable); since 2026-10 they replace the earlier runtime-internal and ara_cloud_ spellings, which the API no longer reports.",
      "type": [
        "string",
        "null"
      ]
    },
    "usage_limit_resume": {
      "description": "Present on GET: the pending automatic continuation after a connected model account's usage limit. Null when none is pending, including after Stop or newer input. A pending continuation does not guarantee provider capacity. Poll this field instead of repeatedly sending the same request.",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "resumes_at": {
          "description": "When the provider's usage limit resets and Reason will try to continue automatically. Null means the provider supplied no reset time; the continuation waits for restored usage or a different model account.",
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      },
      "required": [
        "resumes_at"
      ]
    },
    "error_message": {
      "description": "Redacted persisted error preview, bounded to 1000 characters; null when unavailable.",
      "type": [
        "string",
        "null"
      ]
    },
    "failure_diagnostics": {
      "description": "Where and why the latest Attempt failed: the attribution its failure recorded when it ended the Attempt, else derived from the stored failure signature. An unknown stage remains null.",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "failure_stage": {
          "description": "Execution stage where failure occurred.",
          "type": [
            "string",
            "null"
          ]
        },
        "reason_code": {
          "description": "Specific machine-readable reason code for the failure. Runtime and cloud execution codes use the run_ and cloud_ prefixes, as in error_class.",
          "type": [
            "string",
            "null"
          ]
        },
        "root_cause": {
          "description": "Root cause classification of the failure.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "failure_stage",
        "reason_code",
        "root_cause"
      ]
    },
    "failure_stage": {
      "description": "Execution stage where failure occurred.",
      "type": [
        "string",
        "null"
      ]
    },
    "reason_code": {
      "description": "Specific machine-readable reason code for the failure. Runtime and cloud execution codes use the run_ and cloud_ prefixes, as in error_class.",
      "type": [
        "string",
        "null"
      ]
    },
    "root_cause": {
      "description": "Root cause classification of the failure.",
      "type": [
        "string",
        "null"
      ]
    },
    "previous_attempt_failure": {
      "description": "The most recent failed Attempt of the current Turn before the current Attempt, so a failure stays readable after a retry replaced it (for example a cloud_device_unavailable start failure followed by a successful retry). The current Attempt's own failure is in error_class and failure_diagnostics; this is null when the current Attempt failed, no earlier Attempt of the Turn did, or the current run is not a Session Attempt (a resource transition or wake). Returned by getSession on a full read, or when `fields` names it; not on the Session list.",
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "attempt_id": {
          "type": "string",
          "description": "The failed Attempt's id."
        },
        "status": {
          "type": "string",
          "description": "The failed Attempt's public status (error)."
        },
        "error_class": {
          "description": "That Attempt's failure class, as in error_class.",
          "type": [
            "string",
            "null"
          ]
        },
        "failure_stage": {
          "description": "Execution stage where that Attempt failed.",
          "type": [
            "string",
            "null"
          ]
        },
        "reason_code": {
          "description": "That Attempt's reason code, as in reason_code.",
          "type": [
            "string",
            "null"
          ]
        },
        "root_cause": {
          "description": "That Attempt's root cause classification.",
          "type": [
            "string",
            "null"
          ]
        },
        "finished_at": {
          "description": "When that Attempt finished.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "attempt_id",
        "status",
        "error_class",
        "failure_stage",
        "reason_code",
        "root_cause",
        "finished_at"
      ]
    },
    "diagnostic_message": {
      "description": "Fixed public message selected from an allowlisted persisted error class, never error prose, prompts or tool output. Null when unknown.",
      "type": [
        "string",
        "null"
      ],
      "maxLength": 160
    },
    "duration_ms": {
      "description": "Execution time in milliseconds; null when not recorded.",
      "type": [
        "integer",
        "null"
      ]
    },
    "cost_usd": {
      "description": "Total model spend in USD across the session's turns. Null when usage was never reported.",
      "type": [
        "number",
        "null"
      ]
    },
    "usage": {
      "type": "object",
      "properties": {
        "input_tokens": {
          "description": "Model input tokens across the Session's turns.",
          "type": [
            "integer",
            "null"
          ]
        },
        "output_tokens": {
          "description": "Model output tokens across the Session's turns.",
          "type": [
            "integer",
            "null"
          ]
        },
        "total_tokens": {
          "description": "input_tokens plus output_tokens; null unless both are known.",
          "type": [
            "integer",
            "null"
          ]
        }
      },
      "required": [
        "input_tokens",
        "output_tokens",
        "total_tokens"
      ],
      "description": "Token usage totals for the session. Fields are null for runs that predate usage persistence."
    },
    "context": {
      "type": "object",
      "properties": {
        "tokens": {
          "description": "Tokens in the model's context window after the latest turn.",
          "type": [
            "integer",
            "null"
          ]
        },
        "window": {
          "description": "The model's context window size.",
          "type": [
            "integer",
            "null"
          ]
        },
        "percent": {
          "description": "Context occupancy 0-100, rounded.",
          "type": [
            "integer",
            "null"
          ]
        },
        "compaction_threshold_tokens": {
          "description": "The context size at which the latest turn folded earlier turns into a summary, for the model it ran on: the Session's or workspace's `compaction.threshold_tokens` (at most what the model can hold), else Reason's recommendation. Recorded when a turn ends; absent before the first turn ends and for turns that predate it.",
          "type": [
            "integer",
            "null"
          ]
        },
        "compaction_threshold_source": {
          "description": "What set `compaction_threshold_tokens`: `session` (this Session's `compaction`), `workspace` (the workspace's `compaction` setting) or `recommended` (Reason's own threshold). Present with `compaction_threshold_tokens`.",
          "oneOf": [
            {
              "type": "string",
              "enum": [
                "recommended",
                "workspace",
                "session"
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "tokens",
        "window",
        "percent"
      ],
      "description": "Live context occupancy after the latest turn (not billing throughput)."
    },
    "is_archived": {
      "type":

# --- truncated at 32 KB (57 KB total) ---
# Full source: https://artifacts.apis.io/reasonmachines-com/json-schema/reasonmachines-com-session-schema.json

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/reasonmachines-com-session"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.