{"at":"2026-11-23T05:01:12.910Z","dir":"sent","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/clientInfo":{"name":"didrun-lab","version":"0.1.0"},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T05:01:14.778Z","dir":"received","era":"server_discover","message":{"id":1,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"claudexor","version":"4.8.1"}},"cacheScope":"private","capabilities":{"tools":{"listChanged":true}},"resultType":"complete","supportedVersions":["2026-07-28"],"ttlMs":0}}}
{"at":"2026-11-23T05:01:14.778Z","dir":"sent","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{"_meta":{"io.modelcontextprotocol/clientCapabilities":{},"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}}
{"at":"2026-11-23T05:01:14.788Z","dir":"received","era":"server_discover","message":{"id":2,"jsonrpc":"2.0","result":{"_meta":{"io.modelcontextprotocol/serverInfo":{"name":"claudexor","version":"4.8.1"}},"cacheScope":"private","resultType":"complete","tools":[{"annotations":{"readOnlyHint":true},"description":"Enqueue a read-only Claudexor answer; pass deepScan:true for a bounded multi-scout research sweep with synthesis. Returns a durable run handle, not terminal output; use claudexor_run_status/result for the final answer.","inputSchema":{"additionalProperties":false,"properties":{"access":{"description":"Optional access profile for this run.","enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"attachments":{"description":"Immutable resource references from upload finalize. Paths, base64 and internal resolved attachments are rejected; ordinary lane admission still applies.","items":{"additionalProperties":false,"description":"Reference to an immutable daemon-owned uploaded resource.","properties":{"resourceId":{"description":"Immutable daemon resource id returned by upload finalize.","minLength":1,"type":"string"}},"required":["resourceId"],"type":"object"},"type":"array"},"credentialProfileId":{"description":"Strict credential profile for this run; never falls back to another account.","minLength":1,"pattern":"\\S","type":"string"},"deepScan":{"description":"Widen the answer into a bounded multi-scout research sweep with synthesis.","type":"boolean"},"effort":{"description":"Optional effort override for the primary harness. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"execution":{"additionalProperties":false,"properties":{"auxiliaryWritableRoots":{"description":"Exact existing absolute directories, created by the caller, that an Agent run with effective workspace_write may also write (service caches or scratch outside the execution tree). [] grants nothing extra; so does omission, except that a continueFrom successor omitting execution inherits its predecessor's whole execution group. Requires a lane whose capability_profile.access_control.auxiliary_writable_roots is true; the files are never part of the project result.","items":{"minLength":1,"type":"string"},"type":"array"},"delegated":{"type":"boolean"},"isolation":{"enum":["envelope","live"],"type":"string"},"scopePaths":{"description":"Selected relative files/directories; '.' selects the whole folder. No implicit whole-folder claim.","items":{"minLength":1,"type":"string"},"type":"array"},"workspaceKind":{"description":"directory needs no Git initialization.","enum":["git","directory"],"type":"string"},"workspaceRoot":{"description":"Actual existing delegated execution directory; stable project identity remains repoPath.","type":"string"}},"type":"object"},"externalContextPolicy":{"description":"Alias of web for control-api parity.","enum":["off","auto","cached","live"],"type":"string"},"harness":{"description":"Optional harness id to force for this one-shot run.","minLength":1,"type":"string"},"idempotencyKey":{"description":"Caller-owned key for this exact launch; requires an explicit repoPath. After an unknown response, repeat the same key and arguments to recover the accepted job or run (a queued job returns its jobId); a different request with the same key conflicts. Recovery assumes the same registered project root still exists: a missing or moved root is refused (project_root_missing) and nothing is replayed or started. Omit for an intentional new launch.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"maxSeconds":{"description":"Initial run time limit in seconds. Explicit limits default to hard unless timeLimitMode is soft.","maximum":604800,"minimum":1,"type":"integer"},"model":{"description":"Optional model override for the primary harness.","minLength":1,"type":"string"},"n":{"description":"Optional best-of-N width for candidate races (or deep-scan scout width).","minimum":1,"type":"integer"},"paidBudget":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"unlimited","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"finite","type":"string"},"maxUsd":{"minimum":0,"type":"number"}},"required":["kind","maxUsd"],"type":"object"}],"description":"Incremental-cash budget: explicitly unlimited or a finite non-negative USD cap."},"primaryHarness":{"description":"Optional primary harness id for this run.","minLength":1,"type":"string"},"processingPreference":{"description":"Advisory service preference; omission inherits captured settings and explicit Standard requests ordinary service.","enum":["standard","fast","economy"],"type":"string"},"prompt":{"description":"The user task or question to run through Claudexor.","minLength":1,"pattern":"\\S","type":"string"},"repoPath":{"description":"Absolute path of the target project. Defaults to the MCP server cwd; required with idempotencyKey.","type":"string"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"},"timeLimitMode":{"description":"With maxSeconds: soft warns and continues; hard cancels on expiry.","enum":["soft","hard"],"type":"string"},"web":{"description":"External context policy for this run.","enum":["off","auto","cached","live"],"type":"string"}},"required":["prompt"],"type":"object"},"name":"claudexor_ask","outputSchema":{"additionalProperties":false,"description":"Structured MCP tool result for Claudexor run tools.","properties":{"applyEligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"description":"Apply-gate verdict for mutating runs; null for read-only routes or when no patch exists."},"attemptExecution":{"items":{"additionalProperties":false,"description":"Compact projection of existing attempt execution and amount evidence.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"harnessId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"processing":{"additionalProperties":false,"description":"Requested intent, submitted native control, and observed execution are independent facts. A submitted flag never proves observed service; mixed or missing session observations remain explicit.","properties":{"observed":{"enum":["standard","fast","economy","mixed","unknown"],"type":"string"},"observedNative":{"items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"reason":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"requested":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"submitted":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"submittedNative":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."}},"required":["requested","submitted","submittedNative","observed","observedNative","reason","source"],"type":"object"},"processingCostBasis":{"additionalProperties":false,"description":"Mode-qualified billing evidence for an existing cost record. Authentication alone does not establish included premium service; credits, cash, and token valuation stay distinct.","properties":{"debit":{"const":"unobserved","description":"The route reports no actual cash or purchased-credit debit. Included service still admits the work, but its cash stays unknown instead of zero and is outside the finite cap; absence keeps proven ordinary inclusion as zero cash.","type":"string"},"kind":{"enum":["included","paid_credits","cash","valuation","unknown"],"type":"string"},"nativeMode":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"}},"required":["nativeMode","kind","source"],"type":"object"},"usageCost":{"additionalProperties":false,"description":"Observed usage components. An amount of unknown meaning is not charged cash; separately proven included service can still establish exact zero incremental cash unless its route reports no actual debit.","properties":{"cashKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"cashUsd":{"minimum":0,"type":"number"},"unknownUsd":{"minimum":0,"type":"number"},"valuationKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"minimum":0,"type":"number"}},"required":["cashUsd","valuationUsd","unknownUsd","cashKnowledge","valuationKnowledge"],"type":"object"}},"required":["attemptId","harnessId"],"type":"object"},"type":"array"},"council":{"anyOf":[{"additionalProperties":false,"description":"Council membership + merge disclosure for a --council plan run.","properties":{"degraded":{"default":false,"description":"True when fewer contract-accepted drafts than requested, including any retained unverified contribution; failures remain disclosed per member.","type":"boolean"},"drafted":{"description":"Members with contract-accepted drafts; excludes retained unverified inputs and is not a work-completion or verification count.","minimum":0,"type":"integer"},"members":{"default":[],"description":"Per-member role and outcome.","items":{"additionalProperties":false,"description":"One council member's role and draft/merge outcome.","properties":{"error":{"default":null,"description":"First redacted draft error; null unless the member failed.","type":["string","null"]},"harnessId":{"description":"Harness that drafted (or merged) this member's plan.","minLength":1,"type":"string"},"role":{"description":"primary = the merger that synthesizes the unified plan; member = draft only.","enum":["primary","member"],"type":"string"},"status":{"description":"Draft outcome: drafted = contract-accepted input; merged = accepted draft and successful merge; failed stays failed even when its unverified text helped the merger.","enum":["drafted","failed","merged"],"type":"string"}},"required":["harnessId","role","status"],"type":"object"},"type":"array"},"mergedBy":{"default":null,"description":"Harness that produced the unified plan (the primary); null if the merge failed.","type":["string","null"]},"requested":{"description":"Requested member count (n; at least 2, up to the configured Council cap).","exclusiveMinimum":0,"type":"integer"}},"required":["requested","drafted"],"type":"object"},{"type":"null"}],"default":null,"description":"Council membership + merge disclosure (QA-023b); null for solo/non-plan tools or deferred handles."},"deferredMessage":{"anyOf":[{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"},{"type":"null"}],"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved."},"delegatedFromRunId":{"default":null,"type":["string","null"]},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.","properties":{"effective":{"default":false,"type":"boolean"},"reason":{"default":"not_requested","enum":["pending","not_requested","injected_unused","used","runtime_unavailable","manifest_unsupported","access_profile_incompatible","partially_degraded","startup_failed"],"type":"string"},"remediation":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null},"requested":{"default":false,"type":"boolean"},"used":{"default":false,"type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output."},"detailProblem":{"anyOf":[{"additionalProperties":false,"description":"Typed failure of a post-run detail read whose durable run result still survives.","properties":{"code":{"description":"Stable machine code of the detail problem, if any.","type":["string","null"]},"message":{"description":"Human-readable description of the detail problem.","type":"string"},"retryable":{"description":"Whether retrying the detail read may help.","type":["boolean","null"]}},"required":["code","message","retryable"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed post-terminal detail-read problem (the run result survives; its detail projections are absent for this reason); null when the detail read succeeded."},"failure":{"anyOf":[{"additionalProperties":false,"description":"Typed failure record for a run: phase, category, evidence references, and suggested next actions.","properties":{"attemptId":{"default":null,"description":"Attempt involved in the failure, when known.","type":["string","null"]},"captureFailure":{"additionalProperties":false,"properties":{"bufferBudgetBytes":{"minimum":0,"type":"integer"},"causeCode":{"type":"string"},"cleanup":{"additionalProperties":false,"properties":{"code":{"type":["string","null"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"code":{"enum":["capture_output_exceeded","capture_output_incomplete","capture_preview_truncated","capture_failed"],"type":"string"},"drain":{"const":"truncated","type":"string"},"message":{"type":"string"},"stream":{"enum":["stdout","stderr"],"type":"string"}},"required":["code","message"],"type":"object"},"category":{"default":"unknown","description":"Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness.","enum":["validation","project","auth","harness_unavailable","harness_error","config_error","budget","policy","cancelled","internal","unknown"],"type":"string"},"code":{"anyOf":[{"description":"Machine-readable failure sub-code within a RunFailure category, including historical delegated-run failures and active access-profile refusals.","enum":["finite_zero","hard_cap","estimate_headroom","unknown_paid_in_flight","budget_overshoot","cost_unverifiable","delegation_child_drain_timeout","subscription_window_exhausted","credential_pool_exhausted","input_too_large","vendor_cli_too_old","credential_source_unconfirmed","delegated_home_unavailable","delegated_confinement_unavailable","delegated_evidence_incomplete","access_profile_incompatible","auxiliary_writable_roots_unsupported","retired_access_profile"],"type":"string"},{"type":"null"}],"default":null,"description":"Machine-readable failure sub-code within the category; null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage."},"eventRefs":{"default":[],"description":"Event references relevant to the failure.","items":{"type":"string"},"type":"array"},"harnessId":{"default":null,"description":"Harness involved in the failure, when known.","type":["string","null"]},"logRefs":{"default":[],"description":"Log artifact paths relevant to the failure.","items":{"type":"string"},"type":"array"},"nextActions":{"default":[],"description":"Suggested operator next actions.","items":{"type":"string"},"type":"array"},"phase":{"default":"unknown","description":"Pipeline phase where the failure happened.","type":"string"},"poolAttempts":{"default":[],"description":"Every failed execution try in order, each with its own account and error text; empty when no try failed (and for records written before this field existed).","items":{"additionalProperties":false,"description":"Per-try account attribution of a failed execution try (diagnostic evidence only).","properties":{"attemptId":{"description":"Attempt the try belongs to.","minLength":1,"type":"string"},"category":{"description":"Typed failure category of the try; untyped errors are unknown_harness_error.","enum":["timeout","rate_limited","auth_failed","capability_refused","process_crash","config_error","unknown_harness_error"],"type":"string"},"error":{"description":"The try's own error text with its original wording and whitespace, redacted.","type":"string"},"harnessId":{"description":"Harness the try ran on.","minLength":1,"type":"string"},"observedAt":{"description":"When the try's first error was observed.","format":"date-time","type":"string"},"phase":{"description":"How far the try got: before a typed session start, after start but before agent progress, or after progress.","enum":["pre_start","pre_progress","after_progress"],"type":"string"},"profileDisplayName":{"description":"The row's display name at try time (redacted); null for the default route.","type":["string","null"]},"profileId":{"description":"Account row the try ran on; null = the harness default route.","type":["string","null"]},"requestedModel":{"description":"Model the try asked for; null = the harness default model.","type":["string","null"]},"tryIndex":{"description":"Zero-based try index within the attempt.","minimum":0,"type":"integer"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"description":"The vendor's own typed failure for this try, when the adapter attached one."}},"required":["harnessId","profileId","profileDisplayName","requestedModel","attemptId","tryIndex","observedAt","phase","category","error","vendorFailure"],"type":"object"},"type":"array"},"rawDetailRef":{"default":null,"description":"Artifact path holding the raw (redacted) failure detail.","type":["string","null"]},"requestRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"actual":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"kind":{"const":"input_too_large","type":"string"},"limit":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"native_code":{"minLength":1,"type":"string"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"}},"required":["scope","unit","limit","source","kind","actual","native_code"],"type":"object"},{"additionalProperties":false,"properties":{"binary_path":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"installed_version":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"kind":{"const":"vendor_cli_too_old","type":"string"},"native_code":{"const":"claude_code_version_too_old","type":"string"},"source":{"const":"claude_stdout","type":"string"}},"required":["kind","native_code","source","binary_path","installed_version"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"credential_source_unconfirmed","type":"string"},"native_code":{"const":"grok_credential_source_unconfirmed","type":"string"},"reported_source":{"description":"Redacted credential source the vendor's startup frame reported.","maxLength":80,"type":"string"},"source":{"const":"grok_init","type":"string"}},"required":["kind","native_code","source","reported_source"],"type":"object"}],"description":"Vendor-attested request refusal that stops retries and account rotation on its harness; input, executable and credential-source causes carry their own evidence."},"resetsAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the refused window reopens (a spent subscription quota window), or null when the failure has no such time. Callers schedule a retry off this field, never off safeMessage."},"runDir":{"default":null,"description":"Run artifact directory.","type":["string","null"]},"safeMessage":{"description":"Redacted human-readable failure message.","type":"string"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"default":null,"description":"The vendor's own typed failure for the attempt this record speaks for, or null when no vendor-typed evidence exists (every harness without such a channel, and any unreadable record). Facts only: carries no remedy."}},"required":["safeMessage"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed terminal failure detail and recovery actions; null for non-failed runs."},"jobId":{"default":null,"description":"Daemon job id of the accepted launch. While runId is null, pass it as runId to the status, wait and result tools; they report the canonical runId once the run binds.","type":["string","null"]},"outcomeBanner":{"default":null,"description":"Server-owned outcome headline (D18); the single honest one-line verdict, null while non-terminal or unavailable.","type":["string","null"]},"outcomeFacts":{"anyOf":[{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},{"type":"null"}],"default":null,"description":"The D8 terminal outcome axes (checks/review/reason/noChanges); null for non-terminal or read-only routes."},"parentRunId":{"default":null,"type":["string","null"]},"planReadiness":{"anyOf":[{"additionalProperties":false,"description":"Server-derived readiness of a plan run (one derivation owner; D17).","properties":{"questionCount":{"default":0,"minimum":0,"type":"integer"},"state":{"description":"Derived plan readiness: ready (block parsed, zero open questions), needs_answers (open questions remain), unverified (no parseable block — the planner ignored the format).","enum":["ready","needs_answers","unverified"],"type":"string"}},"required":["state"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived plan readiness for plan tools (D17); null for non-plan tools."},"runDir":{"description":"Artifact directory of the run; null when not persisted.","type":["string","null"]},"runFacts":{"anyOf":[{"additionalProperties":false,"description":"Validated immutable terminal facts for one run.","properties":{"apply":{"additionalProperties":false,"description":"Terminal apply eligibility and operator-decision state.","properties":{"eligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Delivery-gate eligibility at terminalization; null when nothing is applyable."},"operator_decision_present":{"default":false,"description":"Whether a valid operator decision was present when the receipt was finalized.","type":"boolean"}},"type":"object"},"deliverable":{"additionalProperties":false,"description":"Canonical primary-output presence and identity for a terminal run.","properties":{"kind":{"anyOf":[{"enum":["answer","report","plan","patch","files","structured_output"],"type":"string"},{"type":"null"}],"description":"Kind of canonical primary deliverable; null when none exists."},"path":{"description":"Run-relative path of the canonical primary deliverable; null when absent.","type":["string","null"]},"present":{"description":"Whether the canonical primary deliverable exists.","type":"boolean"},"producer_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt that produced the deliverable, when known."}},"required":["present","kind","path"],"type":"object"},"gates":{"additionalProperties":false,"description":"Canonical gate configuration and terminal receipt projection.","properties":{"configured":{"description":"Whether the frozen task configured deterministic gates.","type":"boolean"},"executed":{"description":"Whether the terminal attempt executed the gate set.","type":"boolean"},"receipt_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt whose gate receipt decides this projection; null when no gates executed."},"required":{"description":"Number of configured required gates.","minimum":0,"type":"integer"},"state":{"description":"Terminal state of the configured deterministic gate set.","enum":["not_configured","passed","failed","skipped"],"type":"string"},"total":{"description":"Total configured deterministic gates.","minimum":0,"type":"integer"}},"required":["configured","required","total","executed","state"],"type":"object"},"generated_at":{"description":"When this immutable terminal receipt was finalized.","minLength":1,"type":"string"},"mode":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"outcome":{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},"participants":{"additionalProperties":false,"description":"Terminal participant graph plus its planner-lane count.","properties":{"attempts":{"default":[],"description":"Role-labelled participant roster.","items":{"additionalProperties":false,"description":"One role-labelled participant in the terminal run graph.","properties":{"attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Attempt id when the participant owns an orchestrator attempt; null for reviewer-panel members."},"deliverable_present":{"default":false,"description":"Whether this participant produced the deliverable its role requested.","type":"boolean"},"harness_id":{"description":"Harness that served this participant role.","minLength":1,"type":"string"},"role":{"description":"Canonical role of one participant in the terminal run graph.","enum":["planner","merge","candidate","scout","reducer","reviewer"],"type":"string"},"status":{"anyOf":[{"description":"Terminal outcome recorded for one run participant.","enum":["success","success_with_warnings","blocked","failed"],"type":"string"},{"type":"null"}],"default":null,"description":"Participant outcome when recorded; null for artifact-only reviewer membership."}},"required":["attempt_id","harness_id","role"],"type":"object"},"type":"array"},"planners":{"description":"Number of participants whose canonical role is planner.","minimum":0,"type":"integer"}},"required":["planners"],"type":"object"},"presentation":{"additionalProperties":false,"description":"Immutable terminal output state and primary artifact. Absent only on legacy RunFacts receipts.","properties":{"primary":{"anyOf":[{"additionalProperties":false,"description":"Primary user-facing artifact selected once during terminal preparation.","properties":{"kind":{"description":"Presentation kind of the terminal primary artifact.","enum":["answer","report","plan","patch","files","structured_output","diagnostic"],"type":"string"},"path":{"description":"Normalized run-relative path of the terminal primary artifact.","minLength":1,"type":"string"}},"required":["kind","path"],"type":"object"},{"type":"null"}],"description":"Selected terminal primary artifact, or null when the receipt announces readiness without a primary deliverable."},"state":{"description":"Terminal output readiness decided by the last valid output.ready receipt.","enum":["ready","diagnostic"],"type":"string"}},"required":["state","primary"],"type":"object"},"required_actions":{"default":[],"description":"Typed actions required to unblock this terminal outcome.","items":{"additionalProperties":false,"description":"One typed required operator action derived from a run's terminal outcome facts.","properties":{"detail":{"description":"Human-readable guidance for this action (English-only, INV-141).","type":"string"},"id":{"description":"Stable machine id for a required operator action on a blocked terminal run.","enum":["provide_required_input","complete_incomplete_work","resolve_review_block","fix_failed_checks","record_operator_decision"],"type":"string"}},"required":["id","detail"],"type":"object"},"type":"array"},"review":{"additionalProperties":false,"description":"Canonical terminal review verdict and blocking-finding identity.","properties":{"blocker_ids":{"default":[],"description":"Stable ids of accepted evidence-backed blocking findings.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"blockers":{"description":"Number of blocking findings.","minimum":0,"type":"integer"},"state":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"}},"required":["state","blockers"],"type":"object"},"run_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"schema_version":{"const":2,"description":"Schema version of the artifact; bumped on breaking ABI changes.","type":"number"},"task_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["schema_version","run_id","task_id","mode","outcome","deliverable","participants","gates","review","apply","generated_at"],"type":"object"},{"type":"null"}],"default":null,"description":"Validated canonical terminal RunFacts receipt; null while active, unavailable, or for legacy runs."},"runId":{"description":"Daemon run id once the accepted job started a run (recovery handle for inspect/follow/apply/decision); null while the job is still queued or after it failed before a run started.","type":["string","null"]},"status":{"description":"Run lifecycle state (queued | running | succeeded | failed | cancelled | interrupted); null when an accepted job's state could not be read.","type":["string","null"]},"storeId":{"description":"Identity of the durable engine store that accepted this group member, stable across restarts.","minLength":1,"type":"string"},"summary":{"description":"Human-readable outcome summary (same text as the tool's text content).","type":"string"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"}},"required":["summary","runId","runDir","status","applyEligibility"],"type":"object"}},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Enqueue an Agent-mode Claudexor run. Internal model review is off by default; review:true selects a panel automatically, and an explicit reviewerPanel enables review. Returns a durable run handle plus any immediate start facts; use claudexor_run_status/result for the terminal WorkProduct.","inputSchema":{"additionalProperties":false,"properties":{"access":{"description":"Optional access profile for this run.","enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"attachments":{"description":"Immutable resource references from upload finalize. Paths, base64 and internal resolved attachments are rejected; ordinary lane admission still applies.","items":{"additionalProperties":false,"description":"Reference to an immutable daemon-owned uploaded resource.","properties":{"resourceId":{"description":"Immutable daemon resource id returned by upload finalize.","minLength":1,"type":"string"}},"required":["resourceId"],"type":"object"},"type":"array"},"credentialProfileId":{"description":"Strict credential profile for this run; never falls back to another account.","minLength":1,"pattern":"\\S","type":"string"},"effort":{"description":"Optional effort override for the primary harness. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"execution":{"additionalProperties":false,"properties":{"auxiliaryWritableRoots":{"description":"Exact existing absolute directories, created by the caller, that an Agent run with effective workspace_write may also write (service caches or scratch outside the execution tree). [] grants nothing extra; so does omission, except that a continueFrom successor omitting execution inherits its predecessor's whole execution group. Requires a lane whose capability_profile.access_control.auxiliary_writable_roots is true; the files are never part of the project result.","items":{"minLength":1,"type":"string"},"type":"array"},"delegated":{"type":"boolean"},"isolation":{"enum":["envelope","live"],"type":"string"},"scopePaths":{"description":"Selected relative files/directories; '.' selects the whole folder. No implicit whole-folder claim.","items":{"minLength":1,"type":"string"},"type":"array"},"workspaceKind":{"description":"directory needs no Git initialization.","enum":["git","directory"],"type":"string"},"workspaceRoot":{"description":"Actual existing delegated execution directory; stable project identity remains repoPath.","type":"string"}},"type":"object"},"externalContextPolicy":{"description":"Alias of web for control-api parity.","enum":["off","auto","cached","live"],"type":"string"},"harness":{"description":"Optional harness id to force for this one-shot run.","minLength":1,"type":"string"},"idempotencyKey":{"description":"Caller-owned key for this exact launch; requires an explicit repoPath. After an unknown response, repeat the same key and arguments to recover the accepted job or run (a queued job returns its jobId); a different request with the same key conflicts. Recovery assumes the same registered project root still exists: a missing or moved root is refused (project_root_missing) and nothing is replayed or started. Omit for an intentional new launch.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"maxSeconds":{"description":"Initial run time limit in seconds. Explicit limits default to hard unless timeLimitMode is soft.","maximum":604800,"minimum":1,"type":"integer"},"model":{"description":"Optional model override for the primary harness.","minLength":1,"type":"string"},"n":{"description":"Optional best-of-N width for candidate races (or deep-scan scout width).","minimum":1,"type":"integer"},"paidBudget":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"unlimited","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"finite","type":"string"},"maxUsd":{"minimum":0,"type":"number"}},"required":["kind","maxUsd"],"type":"object"}],"description":"Incremental-cash budget: explicitly unlimited or a finite non-negative USD cap."},"primaryHarness":{"description":"Optional primary harness id for this run.","minLength":1,"type":"string"},"processingPreference":{"description":"Advisory service preference; omission inherits captured settings and explicit Standard requests ordinary service.","enum":["standard","fast","economy"],"type":"string"},"prompt":{"description":"The user task or question to run through Claudexor.","minLength":1,"pattern":"\\S","type":"string"},"protectedPathApprovals":{"description":"Typed approvals for existing protected path edits.","items":{"additionalProperties":false,"properties":{"path":{"minLength":1,"type":"string"},"reason":{"minLength":1,"type":"string"}},"required":["path"],"type":"object"},"type":"array"},"repoPath":{"description":"Absolute path of the target project. Defaults to the MCP server cwd; required with idempotencyKey.","type":"string"},"review":{"description":"Enable internal model review. Ordinary Agent defaults to false; true selects reviewers automatically. An explicit reviewer panel or reviewer overrides also enable review. Best-of and until-clean retain review.","type":"boolean"},"reviewerEfforts":{"additionalProperties":false,"description":"Enable review with per-provider reviewer effort overrides.","properties":{"anthropic":{"description":"Reviewer effort for the anthropic family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"cursor":{"description":"Reviewer effort for the cursor family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"google":{"description":"Reviewer effort for the google family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"local":{"description":"Reviewer effort for the local family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"openai":{"description":"Reviewer effort for the openai family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"opencode":{"description":"Reviewer effort for the opencode family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"unknown":{"description":"Reviewer effort for the unknown family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"xai":{"description":"Reviewer effort for the xai family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"}},"type":"object"},"reviewerModels":{"additionalProperties":false,"description":"Enable review with per-provider reviewer model overrides.","properties":{"anthropic":{"minLength":1,"type":"string"},"cursor":{"minLength":1,"type":"string"},"google":{"minLength":1,"type":"string"},"local":{"minLength":1,"type":"string"},"openai":{"minLength":1,"type":"string"},"opencode":{"minLength":1,"type":"string"},"unknown":{"minLength":1,"type":"string"},"xai":{"minLength":1,"type":"string"}},"type":"object"},"reviewerPanel":{"description":"Enable review with explicit panel entries, preserving order and duplicates; no additional review flag is needed.","items":{"additionalProperties":false,"properties":{"credentialProfileId":{"description":"Optional strict credential profile id; absent uses the canonical account pool.","minLength":1,"type":"string"},"effort":{"description":"Effort for this reviewer entry. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"harness":{"minLength":1,"type":"string"},"model":{"minLength":1,"type":"string"},"processingPreference":{"description":"Advisory service preference; omission inherits captured settings and explicit Standard requests ordinary service.","enum":["standard","fast","economy"],"type":"string"}},"required":["harness"],"type":"object"},"minItems":1,"type":"array"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"},"tests":{"description":"Typed-argv deterministic gate commands for this run.","items":{"additionalProperties":false,"description":"Canonical deterministic command invocation; no implicit shell parsing.","properties":{"args":{"default":[],"description":"Exact argv passed to the executable.","items":{"type":"string"},"type":"array"},"cwd":{"description":"Optional project-relative working directory for the command.","type":"string"},"envAllowlist":{"default":[],"description":"Non-secret parent environment names explicitly forwarded to the command.","items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"program":{"description":"Executable invoked directly without an implicit shell.","minLength":1,"pattern":"\\S","type":"string"}},"required":["program"],"type":"object"},"type":"array"},"timeLimitMode":{"description":"With maxSeconds: soft warns and continues; hard cancels on expiry.","enum":["soft","hard"],"type":"string"},"web":{"description":"External context policy for this run.","enum":["off","auto","cached","live"],"type":"string"}},"required":["prompt"],"type":"object"},"name":"claudexor_run","outputSchema":{"additionalProperties":false,"description":"Structured MCP tool result for Claudexor run tools.","properties":{"applyEligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"description":"Apply-gate verdict for mutating runs; null for read-only routes or when no patch exists."},"attemptExecution":{"items":{"additionalProperties":false,"description":"Compact projection of existing attempt execution and amount evidence.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"harnessId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"processing":{"additionalProperties":false,"description":"Requested intent, submitted native control, and observed execution are independent facts. A submitted flag never proves observed service; mixed or missing session observations remain explicit.","properties":{"observed":{"enum":["standard","fast","economy","mixed","unknown"],"type":"string"},"observedNative":{"items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"reason":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"requested":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"submitted":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"submittedNative":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."}},"required":["requested","submitted","submittedNative","observed","observedNative","reason","source"],"type":"object"},"processingCostBasis":{"additionalProperties":false,"description":"Mode-qualified billing evidence for an existing cost record. Authentication alone does not establish included premium service; credits, cash, and token valuation stay distinct.","properties":{"debit":{"const":"unobserved","description":"The route reports no actual cash or purchased-credit debit. Included service still admits the work, but its cash stays unknown instead of zero and is outside the finite cap; absence keeps proven ordinary inclusion as zero cash.","type":"string"},"kind":{"enum":["included","paid_credits","cash","valuation","unknown"],"type":"string"},"nativeMode":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"}},"required":["nativeMode","kind","source"],"type":"object"},"usageCost":{"additionalProperties":false,"description":"Observed usage components. An amount of unknown meaning is not charged cash; separately proven included service can still establish exact zero incremental cash unless its route reports no actual debit.","properties":{"cashKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"cashUsd":{"minimum":0,"type":"number"},"unknownUsd":{"minimum":0,"type":"number"},"valuationKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"minimum":0,"type":"number"}},"required":["cashUsd","valuationUsd","unknownUsd","cashKnowledge","valuationKnowledge"],"type":"object"}},"required":["attemptId","harnessId"],"type":"object"},"type":"array"},"council":{"anyOf":[{"additionalProperties":false,"description":"Council membership + merge disclosure for a --council plan run.","properties":{"degraded":{"default":false,"description":"True when fewer contract-accepted drafts than requested, including any retained unverified contribution; failures remain disclosed per member.","type":"boolean"},"drafted":{"description":"Members with contract-accepted drafts; excludes retained unverified inputs and is not a work-completion or verification count.","minimum":0,"type":"integer"},"members":{"default":[],"description":"Per-member role and outcome.","items":{"additionalProperties":false,"description":"One council member's role and draft/merge outcome.","properties":{"error":{"default":null,"description":"First redacted draft error; null unless the member failed.","type":["string","null"]},"harnessId":{"description":"Harness that drafted (or merged) this member's plan.","minLength":1,"type":"string"},"role":{"description":"primary = the merger that synthesizes the unified plan; member = draft only.","enum":["primary","member"],"type":"string"},"status":{"description":"Draft outcome: drafted = contract-accepted input; merged = accepted draft and successful merge; failed stays failed even when its unverified text helped the merger.","enum":["drafted","failed","merged"],"type":"string"}},"required":["harnessId","role","status"],"type":"object"},"type":"array"},"mergedBy":{"default":null,"description":"Harness that produced the unified plan (the primary); null if the merge failed.","type":["string","null"]},"requested":{"description":"Requested member count (n; at least 2, up to the configured Council cap).","exclusiveMinimum":0,"type":"integer"}},"required":["requested","drafted"],"type":"object"},{"type":"null"}],"default":null,"description":"Council membership + merge disclosure (QA-023b); null for solo/non-plan tools or deferred handles."},"deferredMessage":{"anyOf":[{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"},{"type":"null"}],"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved."},"delegatedFromRunId":{"default":null,"type":["string","null"]},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.","properties":{"effective":{"default":false,"type":"boolean"},"reason":{"default":"not_requested","enum":["pending","not_requested","injected_unused","used","runtime_unavailable","manifest_unsupported","access_profile_incompatible","partially_degraded","startup_failed"],"type":"string"},"remediation":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null},"requested":{"default":false,"type":"boolean"},"used":{"default":false,"type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output."},"detailProblem":{"anyOf":[{"additionalProperties":false,"description":"Typed failure of a post-run detail read whose durable run result still survives.","properties":{"code":{"description":"Stable machine code of the detail problem, if any.","type":["string","null"]},"message":{"description":"Human-readable description of the detail problem.","type":"string"},"retryable":{"description":"Whether retrying the detail read may help.","type":["boolean","null"]}},"required":["code","message","retryable"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed post-terminal detail-read problem (the run result survives; its detail projections are absent for this reason); null when the detail read succeeded."},"failure":{"anyOf":[{"additionalProperties":false,"description":"Typed failure record for a run: phase, category, evidence references, and suggested next actions.","properties":{"attemptId":{"default":null,"description":"Attempt involved in the failure, when known.","type":["string","null"]},"captureFailure":{"additionalProperties":false,"properties":{"bufferBudgetBytes":{"minimum":0,"type":"integer"},"causeCode":{"type":"string"},"cleanup":{"additionalProperties":false,"properties":{"code":{"type":["string","null"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"code":{"enum":["capture_output_exceeded","capture_output_incomplete","capture_preview_truncated","capture_failed"],"type":"string"},"drain":{"const":"truncated","type":"string"},"message":{"type":"string"},"stream":{"enum":["stdout","stderr"],"type":"string"}},"required":["code","message"],"type":"object"},"category":{"default":"unknown","description":"Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness.","enum":["validation","project","auth","harness_unavailable","harness_error","config_error","budget","policy","cancelled","internal","unknown"],"type":"string"},"code":{"anyOf":[{"description":"Machine-readable failure sub-code within a RunFailure category, including historical delegated-run failures and active access-profile refusals.","enum":["finite_zero","hard_cap","estimate_headroom","unknown_paid_in_flight","budget_overshoot","cost_unverifiable","delegation_child_drain_timeout","subscription_window_exhausted","credential_pool_exhausted","input_too_large","vendor_cli_too_old","credential_source_unconfirmed","delegated_home_unavailable","delegated_confinement_unavailable","delegated_evidence_incomplete","access_profile_incompatible","auxiliary_writable_roots_unsupported","retired_access_profile"],"type":"string"},{"type":"null"}],"default":null,"description":"Machine-readable failure sub-code within the category; null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage."},"eventRefs":{"default":[],"description":"Event references relevant to the failure.","items":{"type":"string"},"type":"array"},"harnessId":{"default":null,"description":"Harness involved in the failure, when known.","type":["string","null"]},"logRefs":{"default":[],"description":"Log artifact paths relevant to the failure.","items":{"type":"string"},"type":"array"},"nextActions":{"default":[],"description":"Suggested operator next actions.","items":{"type":"string"},"type":"array"},"phase":{"default":"unknown","description":"Pipeline phase where the failure happened.","type":"string"},"poolAttempts":{"default":[],"description":"Every failed execution try in order, each with its own account and error text; empty when no try failed (and for records written before this field existed).","items":{"additionalProperties":false,"description":"Per-try account attribution of a failed execution try (diagnostic evidence only).","properties":{"attemptId":{"description":"Attempt the try belongs to.","minLength":1,"type":"string"},"category":{"description":"Typed failure category of the try; untyped errors are unknown_harness_error.","enum":["timeout","rate_limited","auth_failed","capability_refused","process_crash","config_error","unknown_harness_error"],"type":"string"},"error":{"description":"The try's own error text with its original wording and whitespace, redacted.","type":"string"},"harnessId":{"description":"Harness the try ran on.","minLength":1,"type":"string"},"observedAt":{"description":"When the try's first error was observed.","format":"date-time","type":"string"},"phase":{"description":"How far the try got: before a typed session start, after start but before agent progress, or after progress.","enum":["pre_start","pre_progress","after_progress"],"type":"string"},"profileDisplayName":{"description":"The row's display name at try time (redacted); null for the default route.","type":["string","null"]},"profileId":{"description":"Account row the try ran on; null = the harness default route.","type":["string","null"]},"requestedModel":{"description":"Model the try asked for; null = the harness default model.","type":["string","null"]},"tryIndex":{"description":"Zero-based try index within the attempt.","minimum":0,"type":"integer"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"description":"The vendor's own typed failure for this try, when the adapter attached one."}},"required":["harnessId","profileId","profileDisplayName","requestedModel","attemptId","tryIndex","observedAt","phase","category","error","vendorFailure"],"type":"object"},"type":"array"},"rawDetailRef":{"default":null,"description":"Artifact path holding the raw (redacted) failure detail.","type":["string","null"]},"requestRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"actual":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"kind":{"const":"input_too_large","type":"string"},"limit":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"native_code":{"minLength":1,"type":"string"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"}},"required":["scope","unit","limit","source","kind","actual","native_code"],"type":"object"},{"additionalProperties":false,"properties":{"binary_path":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"installed_version":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"kind":{"const":"vendor_cli_too_old","type":"string"},"native_code":{"const":"claude_code_version_too_old","type":"string"},"source":{"const":"claude_stdout","type":"string"}},"required":["kind","native_code","source","binary_path","installed_version"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"credential_source_unconfirmed","type":"string"},"native_code":{"const":"grok_credential_source_unconfirmed","type":"string"},"reported_source":{"description":"Redacted credential source the vendor's startup frame reported.","maxLength":80,"type":"string"},"source":{"const":"grok_init","type":"string"}},"required":["kind","native_code","source","reported_source"],"type":"object"}],"description":"Vendor-attested request refusal that stops retries and account rotation on its harness; input, executable and credential-source causes carry their own evidence."},"resetsAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the refused window reopens (a spent subscription quota window), or null when the failure has no such time. Callers schedule a retry off this field, never off safeMessage."},"runDir":{"default":null,"description":"Run artifact directory.","type":["string","null"]},"safeMessage":{"description":"Redacted human-readable failure message.","type":"string"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"default":null,"description":"The vendor's own typed failure for the attempt this record speaks for, or null when no vendor-typed evidence exists (every harness without such a channel, and any unreadable record). Facts only: carries no remedy."}},"required":["safeMessage"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed terminal failure detail and recovery actions; null for non-failed runs."},"jobId":{"default":null,"description":"Daemon job id of the accepted launch. While runId is null, pass it as runId to the status, wait and result tools; they report the canonical runId once the run binds.","type":["string","null"]},"outcomeBanner":{"default":null,"description":"Server-owned outcome headline (D18); the single honest one-line verdict, null while non-terminal or unavailable.","type":["string","null"]},"outcomeFacts":{"anyOf":[{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},{"type":"null"}],"default":null,"description":"The D8 terminal outcome axes (checks/review/reason/noChanges); null for non-terminal or read-only routes."},"parentRunId":{"default":null,"type":["string","null"]},"planReadiness":{"anyOf":[{"additionalProperties":false,"description":"Server-derived readiness of a plan run (one derivation owner; D17).","properties":{"questionCount":{"default":0,"minimum":0,"type":"integer"},"state":{"description":"Derived plan readiness: ready (block parsed, zero open questions), needs_answers (open questions remain), unverified (no parseable block — the planner ignored the format).","enum":["ready","needs_answers","unverified"],"type":"string"}},"required":["state"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived plan readiness for plan tools (D17); null for non-plan tools."},"runDir":{"description":"Artifact directory of the run; null when not persisted.","type":["string","null"]},"runFacts":{"anyOf":[{"additionalProperties":false,"description":"Validated immutable terminal facts for one run.","properties":{"apply":{"additionalProperties":false,"description":"Terminal apply eligibility and operator-decision state.","properties":{"eligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Delivery-gate eligibility at terminalization; null when nothing is applyable."},"operator_decision_present":{"default":false,"description":"Whether a valid operator decision was present when the receipt was finalized.","type":"boolean"}},"type":"object"},"deliverable":{"additionalProperties":false,"description":"Canonical primary-output presence and identity for a terminal run.","properties":{"kind":{"anyOf":[{"enum":["answer","report","plan","patch","files","structured_output"],"type":"string"},{"type":"null"}],"description":"Kind of canonical primary deliverable; null when none exists."},"path":{"description":"Run-relative path of the canonical primary deliverable; null when absent.","type":["string","null"]},"present":{"description":"Whether the canonical primary deliverable exists.","type":"boolean"},"producer_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt that produced the deliverable, when known."}},"required":["present","kind","path"],"type":"object"},"gates":{"additionalProperties":false,"description":"Canonical gate configuration and terminal receipt projection.","properties":{"configured":{"description":"Whether the frozen task configured deterministic gates.","type":"boolean"},"executed":{"description":"Whether the terminal attempt executed the gate set.","type":"boolean"},"receipt_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt whose gate receipt decides this projection; null when no gates executed."},"required":{"description":"Number of configured required gates.","minimum":0,"type":"integer"},"state":{"description":"Terminal state of the configured deterministic gate set.","enum":["not_configured","passed","failed","skipped"],"type":"string"},"total":{"description":"Total configured deterministic gates.","minimum":0,"type":"integer"}},"required":["configured","required","total","executed","state"],"type":"object"},"generated_at":{"description":"When this immutable terminal receipt was finalized.","minLength":1,"type":"string"},"mode":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"outcome":{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},"participants":{"additionalProperties":false,"description":"Terminal participant graph plus its planner-lane count.","properties":{"attempts":{"default":[],"description":"Role-labelled participant roster.","items":{"additionalProperties":false,"description":"One role-labelled participant in the terminal run graph.","properties":{"attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Attempt id when the participant owns an orchestrator attempt; null for reviewer-panel members."},"deliverable_present":{"default":false,"description":"Whether this participant produced the deliverable its role requested.","type":"boolean"},"harness_id":{"description":"Harness that served this participant role.","minLength":1,"type":"string"},"role":{"description":"Canonical role of one participant in the terminal run graph.","enum":["planner","merge","candidate","scout","reducer","reviewer"],"type":"string"},"status":{"anyOf":[{"description":"Terminal outcome recorded for one run participant.","enum":["success","success_with_warnings","blocked","failed"],"type":"string"},{"type":"null"}],"default":null,"description":"Participant outcome when recorded; null for artifact-only reviewer membership."}},"required":["attempt_id","harness_id","role"],"type":"object"},"type":"array"},"planners":{"description":"Number of participants whose canonical role is planner.","minimum":0,"type":"integer"}},"required":["planners"],"type":"object"},"presentation":{"additionalProperties":false,"description":"Immutable terminal output state and primary artifact. Absent only on legacy RunFacts receipts.","properties":{"primary":{"anyOf":[{"additionalProperties":false,"description":"Primary user-facing artifact selected once during terminal preparation.","properties":{"kind":{"description":"Presentation kind of the terminal primary artifact.","enum":["answer","report","plan","patch","files","structured_output","diagnostic"],"type":"string"},"path":{"description":"Normalized run-relative path of the terminal primary artifact.","minLength":1,"type":"string"}},"required":["kind","path"],"type":"object"},{"type":"null"}],"description":"Selected terminal primary artifact, or null when the receipt announces readiness without a primary deliverable."},"state":{"description":"Terminal output readiness decided by the last valid output.ready receipt.","enum":["ready","diagnostic"],"type":"string"}},"required":["state","primary"],"type":"object"},"required_actions":{"default":[],"description":"Typed actions required to unblock this terminal outcome.","items":{"additionalProperties":false,"description":"One typed required operator action derived from a run's terminal outcome facts.","properties":{"detail":{"description":"Human-readable guidance for this action (English-only, INV-141).","type":"string"},"id":{"description":"Stable machine id for a required operator action on a blocked terminal run.","enum":["provide_required_input","complete_incomplete_work","resolve_review_block","fix_failed_checks","record_operator_decision"],"type":"string"}},"required":["id","detail"],"type":"object"},"type":"array"},"review":{"additionalProperties":false,"description":"Canonical terminal review verdict and blocking-finding identity.","properties":{"blocker_ids":{"default":[],"description":"Stable ids of accepted evidence-backed blocking findings.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"blockers":{"description":"Number of blocking findings.","minimum":0,"type":"integer"},"state":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"}},"required":["state","blockers"],"type":"object"},"run_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"schema_version":{"const":2,"description":"Schema version of the artifact; bumped on breaking ABI changes.","type":"number"},"task_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["schema_version","run_id","task_id","mode","outcome","deliverable","participants","gates","review","apply","generated_at"],"type":"object"},{"type":"null"}],"default":null,"description":"Validated canonical terminal RunFacts receipt; null while active, unavailable, or for legacy runs."},"runId":{"description":"Daemon run id once the accepted job started a run (recovery handle for inspect/follow/apply/decision); null while the job is still queued or after it failed before a run started.","type":["string","null"]},"status":{"description":"Run lifecycle state (queued | running | succeeded | failed | cancelled | interrupted); null when an accepted job's state could not be read.","type":["string","null"]},"storeId":{"description":"Identity of the durable engine store that accepted this group member, stable across restarts.","minLength":1,"type":"string"},"summary":{"description":"Human-readable outcome summary (same text as the tool's text content).","type":"string"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"}},"required":["summary","runId","runDir","status","applyEligibility"],"type":"object"}},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Enqueue a best-of-N Claudexor run with cross-family review. Returns a durable run handle; use claudexor_run_status/result for terminal output.","inputSchema":{"additionalProperties":false,"properties":{"access":{"description":"Optional access profile for this run.","enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"attachments":{"description":"Immutable resource references from upload finalize. Paths, base64 and internal resolved attachments are rejected; ordinary lane admission still applies.","items":{"additionalProperties":false,"description":"Reference to an immutable daemon-owned uploaded resource.","properties":{"resourceId":{"description":"Immutable daemon resource id returned by upload finalize.","minLength":1,"type":"string"}},"required":["resourceId"],"type":"object"},"type":"array"},"credentialProfileId":{"description":"Strict credential profile for this run; never falls back to another account.","minLength":1,"pattern":"\\S","type":"string"},"effort":{"description":"Optional effort override for the primary harness. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"execution":{"additionalProperties":false,"properties":{"auxiliaryWritableRoots":{"description":"Exact existing absolute directories, created by the caller, that an Agent run with effective workspace_write may also write (service caches or scratch outside the execution tree). [] grants nothing extra; so does omission, except that a continueFrom successor omitting execution inherits its predecessor's whole execution group. Requires a lane whose capability_profile.access_control.auxiliary_writable_roots is true; the files are never part of the project result.","items":{"minLength":1,"type":"string"},"type":"array"},"delegated":{"type":"boolean"},"isolation":{"enum":["envelope","live"],"type":"string"},"scopePaths":{"description":"Selected relative files/directories; '.' selects the whole folder. No implicit whole-folder claim.","items":{"minLength":1,"type":"string"},"type":"array"},"workspaceKind":{"description":"directory needs no Git initialization.","enum":["git","directory"],"type":"string"},"workspaceRoot":{"description":"Actual existing delegated execution directory; stable project identity remains repoPath.","type":"string"}},"type":"object"},"externalContextPolicy":{"description":"Alias of web for control-api parity.","enum":["off","auto","cached","live"],"type":"string"},"harness":{"description":"Optional harness id to force for this one-shot run.","minLength":1,"type":"string"},"idempotencyKey":{"description":"Caller-owned key for this exact launch; requires an explicit repoPath. After an unknown response, repeat the same key and arguments to recover the accepted job or run (a queued job returns its jobId); a different request with the same key conflicts. Recovery assumes the same registered project root still exists: a missing or moved root is refused (project_root_missing) and nothing is replayed or started. Omit for an intentional new launch.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"maxSeconds":{"description":"Initial run time limit in seconds. Explicit limits default to hard unless timeLimitMode is soft.","maximum":604800,"minimum":1,"type":"integer"},"model":{"description":"Optional model override for the primary harness.","minLength":1,"type":"string"},"n":{"description":"Optional best-of-N width for candidate races (or deep-scan scout width).","minimum":2,"type":"integer"},"paidBudget":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"unlimited","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"finite","type":"string"},"maxUsd":{"minimum":0,"type":"number"}},"required":["kind","maxUsd"],"type":"object"}],"description":"Incremental-cash budget: explicitly unlimited or a finite non-negative USD cap."},"primaryHarness":{"description":"Optional primary harness id for this run.","minLength":1,"type":"string"},"processingPreference":{"description":"Advisory service preference; omission inherits captured settings and explicit Standard requests ordinary service.","enum":["standard","fast","economy"],"type":"string"},"prompt":{"description":"The user task or question to run through Claudexor.","minLength":1,"pattern":"\\S","type":"string"},"protectedPathApprovals":{"description":"Typed approvals for existing protected path edits.","items":{"additionalProperties":false,"properties":{"path":{"minLength":1,"type":"string"},"reason":{"minLength":1,"type":"string"}},"required":["path"],"type":"object"},"type":"array"},"repoPath":{"description":"Absolute path of the target project. Defaults to the MCP server cwd; required with idempotencyKey.","type":"string"},"review":{"description":"Enable internal model review. Ordinary Agent defaults to false; true selects reviewers automatically. An explicit reviewer panel or reviewer overrides also enable review. Best-of and until-clean retain review.","type":"boolean"},"reviewerEfforts":{"additionalProperties":false,"description":"Enable review with per-provider reviewer effort overrides.","properties":{"anthropic":{"description":"Reviewer effort for the anthropic family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"cursor":{"description":"Reviewer effort for the cursor family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"google":{"description":"Reviewer effort for the google family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"local":{"description":"Reviewer effort for the local family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"openai":{"description":"Reviewer effort for the openai family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"opencode":{"description":"Reviewer effort for the opencode family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"unknown":{"description":"Reviewer effort for the unknown family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"xai":{"description":"Reviewer effort for the xai family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"}},"type":"object"},"reviewerModels":{"additionalProperties":false,"description":"Enable review with per-provider reviewer model overrides.","properties":{"anthropic":{"minLength":1,"type":"string"},"cursor":{"minLength":1,"type":"string"},"google":{"minLength":1,"type":"string"},"local":{"minLength":1,"type":"string"},"openai":{"minLength":1,"type":"string"},"opencode":{"minLength":1,"type":"string"},"unknown":{"minLength":1,"type":"string"},"xai":{"minLength":1,"type":"string"}},"type":"object"},"reviewerPanel":{"description":"Enable review with explicit panel entries, preserving order and duplicates; no additional review flag is needed.","items":{"additionalProperties":false,"properties":{"credentialProfileId":{"description":"Optional strict credential profile id; absent uses the canonical account pool.","minLength":1,"type":"string"},"effort":{"description":"Effort for this reviewer entry. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"harness":{"minLength":1,"type":"string"},"model":{"minLength":1,"type":"string"},"processingPreference":{"description":"Advisory service preference; omission inherits captured settings and explicit Standard requests ordinary service.","enum":["standard","fast","economy"],"type":"string"}},"required":["harness"],"type":"object"},"minItems":1,"type":"array"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"},"tests":{"description":"Typed-argv deterministic gate commands for this run.","items":{"additionalProperties":false,"description":"Canonical deterministic command invocation; no implicit shell parsing.","properties":{"args":{"default":[],"description":"Exact argv passed to the executable.","items":{"type":"string"},"type":"array"},"cwd":{"description":"Optional project-relative working directory for the command.","type":"string"},"envAllowlist":{"default":[],"description":"Non-secret parent environment names explicitly forwarded to the command.","items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"program":{"description":"Executable invoked directly without an implicit shell.","minLength":1,"pattern":"\\S","type":"string"}},"required":["program"],"type":"object"},"type":"array"},"timeLimitMode":{"description":"With maxSeconds: soft warns and continues; hard cancels on expiry.","enum":["soft","hard"],"type":"string"},"web":{"description":"External context policy for this run.","enum":["off","auto","cached","live"],"type":"string"}},"required":["prompt"],"type":"object"},"name":"claudexor_best_of","outputSchema":{"additionalProperties":false,"description":"Structured MCP tool result for Claudexor run tools.","properties":{"applyEligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"description":"Apply-gate verdict for mutating runs; null for read-only routes or when no patch exists."},"attemptExecution":{"items":{"additionalProperties":false,"description":"Compact projection of existing attempt execution and amount evidence.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"harnessId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"processing":{"additionalProperties":false,"description":"Requested intent, submitted native control, and observed execution are independent facts. A submitted flag never proves observed service; mixed or missing session observations remain explicit.","properties":{"observed":{"enum":["standard","fast","economy","mixed","unknown"],"type":"string"},"observedNative":{"items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"reason":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"requested":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"submitted":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"submittedNative":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."}},"required":["requested","submitted","submittedNative","observed","observedNative","reason","source"],"type":"object"},"processingCostBasis":{"additionalProperties":false,"description":"Mode-qualified billing evidence for an existing cost record. Authentication alone does not establish included premium service; credits, cash, and token valuation stay distinct.","properties":{"debit":{"const":"unobserved","description":"The route reports no actual cash or purchased-credit debit. Included service still admits the work, but its cash stays unknown instead of zero and is outside the finite cap; absence keeps proven ordinary inclusion as zero cash.","type":"string"},"kind":{"enum":["included","paid_credits","cash","valuation","unknown"],"type":"string"},"nativeMode":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"}},"required":["nativeMode","kind","source"],"type":"object"},"usageCost":{"additionalProperties":false,"description":"Observed usage components. An amount of unknown meaning is not charged cash; separately proven included service can still establish exact zero incremental cash unless its route reports no actual debit.","properties":{"cashKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"cashUsd":{"minimum":0,"type":"number"},"unknownUsd":{"minimum":0,"type":"number"},"valuationKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"minimum":0,"type":"number"}},"required":["cashUsd","valuationUsd","unknownUsd","cashKnowledge","valuationKnowledge"],"type":"object"}},"required":["attemptId","harnessId"],"type":"object"},"type":"array"},"council":{"anyOf":[{"additionalProperties":false,"description":"Council membership + merge disclosure for a --council plan run.","properties":{"degraded":{"default":false,"description":"True when fewer contract-accepted drafts than requested, including any retained unverified contribution; failures remain disclosed per member.","type":"boolean"},"drafted":{"description":"Members with contract-accepted drafts; excludes retained unverified inputs and is not a work-completion or verification count.","minimum":0,"type":"integer"},"members":{"default":[],"description":"Per-member role and outcome.","items":{"additionalProperties":false,"description":"One council member's role and draft/merge outcome.","properties":{"error":{"default":null,"description":"First redacted draft error; null unless the member failed.","type":["string","null"]},"harnessId":{"description":"Harness that drafted (or merged) this member's plan.","minLength":1,"type":"string"},"role":{"description":"primary = the merger that synthesizes the unified plan; member = draft only.","enum":["primary","member"],"type":"string"},"status":{"description":"Draft outcome: drafted = contract-accepted input; merged = accepted draft and successful merge; failed stays failed even when its unverified text helped the merger.","enum":["drafted","failed","merged"],"type":"string"}},"required":["harnessId","role","status"],"type":"object"},"type":"array"},"mergedBy":{"default":null,"description":"Harness that produced the unified plan (the primary); null if the merge failed.","type":["string","null"]},"requested":{"description":"Requested member count (n; at least 2, up to the configured Council cap).","exclusiveMinimum":0,"type":"integer"}},"required":["requested","drafted"],"type":"object"},{"type":"null"}],"default":null,"description":"Council membership + merge disclosure (QA-023b); null for solo/non-plan tools or deferred handles."},"deferredMessage":{"anyOf":[{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"},{"type":"null"}],"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved."},"delegatedFromRunId":{"default":null,"type":["string","null"]},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.","properties":{"effective":{"default":false,"type":"boolean"},"reason":{"default":"not_requested","enum":["pending","not_requested","injected_unused","used","runtime_unavailable","manifest_unsupported","access_profile_incompatible","partially_degraded","startup_failed"],"type":"string"},"remediation":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null},"requested":{"default":false,"type":"boolean"},"used":{"default":false,"type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output."},"detailProblem":{"anyOf":[{"additionalProperties":false,"description":"Typed failure of a post-run detail read whose durable run result still survives.","properties":{"code":{"description":"Stable machine code of the detail problem, if any.","type":["string","null"]},"message":{"description":"Human-readable description of the detail problem.","type":"string"},"retryable":{"description":"Whether retrying the detail read may help.","type":["boolean","null"]}},"required":["code","message","retryable"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed post-terminal detail-read problem (the run result survives; its detail projections are absent for this reason); null when the detail read succeeded."},"failure":{"anyOf":[{"additionalProperties":false,"description":"Typed failure record for a run: phase, category, evidence references, and suggested next actions.","properties":{"attemptId":{"default":null,"description":"Attempt involved in the failure, when known.","type":["string","null"]},"captureFailure":{"additionalProperties":false,"properties":{"bufferBudgetBytes":{"minimum":0,"type":"integer"},"causeCode":{"type":"string"},"cleanup":{"additionalProperties":false,"properties":{"code":{"type":["string","null"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"code":{"enum":["capture_output_exceeded","capture_output_incomplete","capture_preview_truncated","capture_failed"],"type":"string"},"drain":{"const":"truncated","type":"string"},"message":{"type":"string"},"stream":{"enum":["stdout","stderr"],"type":"string"}},"required":["code","message"],"type":"object"},"category":{"default":"unknown","description":"Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness.","enum":["validation","project","auth","harness_unavailable","harness_error","config_error","budget","policy","cancelled","internal","unknown"],"type":"string"},"code":{"anyOf":[{"description":"Machine-readable failure sub-code within a RunFailure category, including historical delegated-run failures and active access-profile refusals.","enum":["finite_zero","hard_cap","estimate_headroom","unknown_paid_in_flight","budget_overshoot","cost_unverifiable","delegation_child_drain_timeout","subscription_window_exhausted","credential_pool_exhausted","input_too_large","vendor_cli_too_old","credential_source_unconfirmed","delegated_home_unavailable","delegated_confinement_unavailable","delegated_evidence_incomplete","access_profile_incompatible","auxiliary_writable_roots_unsupported","retired_access_profile"],"type":"string"},{"type":"null"}],"default":null,"description":"Machine-readable failure sub-code within the category; null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage."},"eventRefs":{"default":[],"description":"Event references relevant to the failure.","items":{"type":"string"},"type":"array"},"harnessId":{"default":null,"description":"Harness involved in the failure, when known.","type":["string","null"]},"logRefs":{"default":[],"description":"Log artifact paths relevant to the failure.","items":{"type":"string"},"type":"array"},"nextActions":{"default":[],"description":"Suggested operator next actions.","items":{"type":"string"},"type":"array"},"phase":{"default":"unknown","description":"Pipeline phase where the failure happened.","type":"string"},"poolAttempts":{"default":[],"description":"Every failed execution try in order, each with its own account and error text; empty when no try failed (and for records written before this field existed).","items":{"additionalProperties":false,"description":"Per-try account attribution of a failed execution try (diagnostic evidence only).","properties":{"attemptId":{"description":"Attempt the try belongs to.","minLength":1,"type":"string"},"category":{"description":"Typed failure category of the try; untyped errors are unknown_harness_error.","enum":["timeout","rate_limited","auth_failed","capability_refused","process_crash","config_error","unknown_harness_error"],"type":"string"},"error":{"description":"The try's own error text with its original wording and whitespace, redacted.","type":"string"},"harnessId":{"description":"Harness the try ran on.","minLength":1,"type":"string"},"observedAt":{"description":"When the try's first error was observed.","format":"date-time","type":"string"},"phase":{"description":"How far the try got: before a typed session start, after start but before agent progress, or after progress.","enum":["pre_start","pre_progress","after_progress"],"type":"string"},"profileDisplayName":{"description":"The row's display name at try time (redacted); null for the default route.","type":["string","null"]},"profileId":{"description":"Account row the try ran on; null = the harness default route.","type":["string","null"]},"requestedModel":{"description":"Model the try asked for; null = the harness default model.","type":["string","null"]},"tryIndex":{"description":"Zero-based try index within the attempt.","minimum":0,"type":"integer"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"description":"The vendor's own typed failure for this try, when the adapter attached one."}},"required":["harnessId","profileId","profileDisplayName","requestedModel","attemptId","tryIndex","observedAt","phase","category","error","vendorFailure"],"type":"object"},"type":"array"},"rawDetailRef":{"default":null,"description":"Artifact path holding the raw (redacted) failure detail.","type":["string","null"]},"requestRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"actual":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"kind":{"const":"input_too_large","type":"string"},"limit":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"native_code":{"minLength":1,"type":"string"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"}},"required":["scope","unit","limit","source","kind","actual","native_code"],"type":"object"},{"additionalProperties":false,"properties":{"binary_path":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"installed_version":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"kind":{"const":"vendor_cli_too_old","type":"string"},"native_code":{"const":"claude_code_version_too_old","type":"string"},"source":{"const":"claude_stdout","type":"string"}},"required":["kind","native_code","source","binary_path","installed_version"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"credential_source_unconfirmed","type":"string"},"native_code":{"const":"grok_credential_source_unconfirmed","type":"string"},"reported_source":{"description":"Redacted credential source the vendor's startup frame reported.","maxLength":80,"type":"string"},"source":{"const":"grok_init","type":"string"}},"required":["kind","native_code","source","reported_source"],"type":"object"}],"description":"Vendor-attested request refusal that stops retries and account rotation on its harness; input, executable and credential-source causes carry their own evidence."},"resetsAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the refused window reopens (a spent subscription quota window), or null when the failure has no such time. Callers schedule a retry off this field, never off safeMessage."},"runDir":{"default":null,"description":"Run artifact directory.","type":["string","null"]},"safeMessage":{"description":"Redacted human-readable failure message.","type":"string"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"default":null,"description":"The vendor's own typed failure for the attempt this record speaks for, or null when no vendor-typed evidence exists (every harness without such a channel, and any unreadable record). Facts only: carries no remedy."}},"required":["safeMessage"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed terminal failure detail and recovery actions; null for non-failed runs."},"jobId":{"default":null,"description":"Daemon job id of the accepted launch. While runId is null, pass it as runId to the status, wait and result tools; they report the canonical runId once the run binds.","type":["string","null"]},"outcomeBanner":{"default":null,"description":"Server-owned outcome headline (D18); the single honest one-line verdict, null while non-terminal or unavailable.","type":["string","null"]},"outcomeFacts":{"anyOf":[{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},{"type":"null"}],"default":null,"description":"The D8 terminal outcome axes (checks/review/reason/noChanges); null for non-terminal or read-only routes."},"parentRunId":{"default":null,"type":["string","null"]},"planReadiness":{"anyOf":[{"additionalProperties":false,"description":"Server-derived readiness of a plan run (one derivation owner; D17).","properties":{"questionCount":{"default":0,"minimum":0,"type":"integer"},"state":{"description":"Derived plan readiness: ready (block parsed, zero open questions), needs_answers (open questions remain), unverified (no parseable block — the planner ignored the format).","enum":["ready","needs_answers","unverified"],"type":"string"}},"required":["state"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived plan readiness for plan tools (D17); null for non-plan tools."},"runDir":{"description":"Artifact directory of the run; null when not persisted.","type":["string","null"]},"runFacts":{"anyOf":[{"additionalProperties":false,"description":"Validated immutable terminal facts for one run.","properties":{"apply":{"additionalProperties":false,"description":"Terminal apply eligibility and operator-decision state.","properties":{"eligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Delivery-gate eligibility at terminalization; null when nothing is applyable."},"operator_decision_present":{"default":false,"description":"Whether a valid operator decision was present when the receipt was finalized.","type":"boolean"}},"type":"object"},"deliverable":{"additionalProperties":false,"description":"Canonical primary-output presence and identity for a terminal run.","properties":{"kind":{"anyOf":[{"enum":["answer","report","plan","patch","files","structured_output"],"type":"string"},{"type":"null"}],"description":"Kind of canonical primary deliverable; null when none exists."},"path":{"description":"Run-relative path of the canonical primary deliverable; null when absent.","type":["string","null"]},"present":{"description":"Whether the canonical primary deliverable exists.","type":"boolean"},"producer_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt that produced the deliverable, when known."}},"required":["present","kind","path"],"type":"object"},"gates":{"additionalProperties":false,"description":"Canonical gate configuration and terminal receipt projection.","properties":{"configured":{"description":"Whether the frozen task configured deterministic gates.","type":"boolean"},"executed":{"description":"Whether the terminal attempt executed the gate set.","type":"boolean"},"receipt_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt whose gate receipt decides this projection; null when no gates executed."},"required":{"description":"Number of configured required gates.","minimum":0,"type":"integer"},"state":{"description":"Terminal state of the configured deterministic gate set.","enum":["not_configured","passed","failed","skipped"],"type":"string"},"total":{"description":"Total configured deterministic gates.","minimum":0,"type":"integer"}},"required":["configured","required","total","executed","state"],"type":"object"},"generated_at":{"description":"When this immutable terminal receipt was finalized.","minLength":1,"type":"string"},"mode":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"outcome":{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},"participants":{"additionalProperties":false,"description":"Terminal participant graph plus its planner-lane count.","properties":{"attempts":{"default":[],"description":"Role-labelled participant roster.","items":{"additionalProperties":false,"description":"One role-labelled participant in the terminal run graph.","properties":{"attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Attempt id when the participant owns an orchestrator attempt; null for reviewer-panel members."},"deliverable_present":{"default":false,"description":"Whether this participant produced the deliverable its role requested.","type":"boolean"},"harness_id":{"description":"Harness that served this participant role.","minLength":1,"type":"string"},"role":{"description":"Canonical role of one participant in the terminal run graph.","enum":["planner","merge","candidate","scout","reducer","reviewer"],"type":"string"},"status":{"anyOf":[{"description":"Terminal outcome recorded for one run participant.","enum":["success","success_with_warnings","blocked","failed"],"type":"string"},{"type":"null"}],"default":null,"description":"Participant outcome when recorded; null for artifact-only reviewer membership."}},"required":["attempt_id","harness_id","role"],"type":"object"},"type":"array"},"planners":{"description":"Number of participants whose canonical role is planner.","minimum":0,"type":"integer"}},"required":["planners"],"type":"object"},"presentation":{"additionalProperties":false,"description":"Immutable terminal output state and primary artifact. Absent only on legacy RunFacts receipts.","properties":{"primary":{"anyOf":[{"additionalProperties":false,"description":"Primary user-facing artifact selected once during terminal preparation.","properties":{"kind":{"description":"Presentation kind of the terminal primary artifact.","enum":["answer","report","plan","patch","files","structured_output","diagnostic"],"type":"string"},"path":{"description":"Normalized run-relative path of the terminal primary artifact.","minLength":1,"type":"string"}},"required":["kind","path"],"type":"object"},{"type":"null"}],"description":"Selected terminal primary artifact, or null when the receipt announces readiness without a primary deliverable."},"state":{"description":"Terminal output readiness decided by the last valid output.ready receipt.","enum":["ready","diagnostic"],"type":"string"}},"required":["state","primary"],"type":"object"},"required_actions":{"default":[],"description":"Typed actions required to unblock this terminal outcome.","items":{"additionalProperties":false,"description":"One typed required operator action derived from a run's terminal outcome facts.","properties":{"detail":{"description":"Human-readable guidance for this action (English-only, INV-141).","type":"string"},"id":{"description":"Stable machine id for a required operator action on a blocked terminal run.","enum":["provide_required_input","complete_incomplete_work","resolve_review_block","fix_failed_checks","record_operator_decision"],"type":"string"}},"required":["id","detail"],"type":"object"},"type":"array"},"review":{"additionalProperties":false,"description":"Canonical terminal review verdict and blocking-finding identity.","properties":{"blocker_ids":{"default":[],"description":"Stable ids of accepted evidence-backed blocking findings.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"blockers":{"description":"Number of blocking findings.","minimum":0,"type":"integer"},"state":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"}},"required":["state","blockers"],"type":"object"},"run_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"schema_version":{"const":2,"description":"Schema version of the artifact; bumped on breaking ABI changes.","type":"number"},"task_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["schema_version","run_id","task_id","mode","outcome","deliverable","participants","gates","review","apply","generated_at"],"type":"object"},{"type":"null"}],"default":null,"description":"Validated canonical terminal RunFacts receipt; null while active, unavailable, or for legacy runs."},"runId":{"description":"Daemon run id once the accepted job started a run (recovery handle for inspect/follow/apply/decision); null while the job is still queued or after it failed before a run started.","type":["string","null"]},"status":{"description":"Run lifecycle state (queued | running | succeeded | failed | cancelled | interrupted); null when an accepted job's state could not be read.","type":["string","null"]},"storeId":{"description":"Identity of the durable engine store that accepted this group member, stable across restarts.","minLength":1,"type":"string"},"summary":{"description":"Human-readable outcome summary (same text as the tool's text content).","type":"string"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"}},"required":["summary","runId","runDir","status","applyEligibility"],"type":"object"}},{"annotations":{"readOnlyHint":true},"description":"Enqueue a read-only Claudexor implementation plan. Returns a durable run handle; use claudexor_run_status/result for the final plan.","inputSchema":{"additionalProperties":false,"properties":{"access":{"description":"Optional access profile for this run.","enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"attachments":{"description":"Immutable resource references from upload finalize. Paths, base64 and internal resolved attachments are rejected; ordinary lane admission still applies.","items":{"additionalProperties":false,"description":"Reference to an immutable daemon-owned uploaded resource.","properties":{"resourceId":{"description":"Immutable daemon resource id returned by upload finalize.","minLength":1,"type":"string"}},"required":["resourceId"],"type":"object"},"type":"array"},"council":{"description":"Draft n plans (2 to the configured cap), then merge one plan and question set.","type":"boolean"},"credentialProfileId":{"description":"Strict credential profile for this run; never falls back to another account.","minLength":1,"pattern":"\\S","type":"string"},"effort":{"description":"Optional effort override for the primary harness. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"execution":{"additionalProperties":false,"properties":{"auxiliaryWritableRoots":{"description":"Exact existing absolute directories, created by the caller, that an Agent run with effective workspace_write may also write (service caches or scratch outside the execution tree). [] grants nothing extra; so does omission, except that a continueFrom successor omitting execution inherits its predecessor's whole execution group. Requires a lane whose capability_profile.access_control.auxiliary_writable_roots is true; the files are never part of the project result.","items":{"minLength":1,"type":"string"},"type":"array"},"delegated":{"type":"boolean"},"isolation":{"enum":["envelope","live"],"type":"string"},"scopePaths":{"description":"Selected relative files/directories; '.' selects the whole folder. No implicit whole-folder claim.","items":{"minLength":1,"type":"string"},"type":"array"},"workspaceKind":{"description":"directory needs no Git initialization.","enum":["git","directory"],"type":"string"},"workspaceRoot":{"description":"Actual existing delegated execution directory; stable project identity remains repoPath.","type":"string"}},"type":"object"},"externalContextPolicy":{"description":"Alias of web for control-api parity.","enum":["off","auto","cached","live"],"type":"string"},"harness":{"description":"Optional harness id to force for this one-shot run.","minLength":1,"type":"string"},"idempotencyKey":{"description":"Caller-owned key for this exact launch; requires an explicit repoPath. After an unknown response, repeat the same key and arguments to recover the accepted job or run (a queued job returns its jobId); a different request with the same key conflicts. Recovery assumes the same registered project root still exists: a missing or moved root is refused (project_root_missing) and nothing is replayed or started. Omit for an intentional new launch.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"maxSeconds":{"description":"Initial run time limit in seconds. Explicit limits default to hard unless timeLimitMode is soft.","maximum":604800,"minimum":1,"type":"integer"},"model":{"description":"Optional model override for the primary harness.","minLength":1,"type":"string"},"n":{"description":"Optional best-of-N width for candidate races (or deep-scan scout width).","minimum":1,"type":"integer"},"paidBudget":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"unlimited","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"finite","type":"string"},"maxUsd":{"minimum":0,"type":"number"}},"required":["kind","maxUsd"],"type":"object"}],"description":"Incremental-cash budget: explicitly unlimited or a finite non-negative USD cap."},"primaryHarness":{"description":"Optional primary harness id for this run.","minLength":1,"type":"string"},"processingPreference":{"description":"Advisory service preference; omission inherits captured settings and explicit Standard requests ordinary service.","enum":["standard","fast","economy"],"type":"string"},"prompt":{"description":"The user task or question to run through Claudexor.","minLength":1,"pattern":"\\S","type":"string"},"repoPath":{"description":"Absolute path of the target project. Defaults to the MCP server cwd; required with idempotencyKey.","type":"string"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"},"timeLimitMode":{"description":"With maxSeconds: soft warns and continues; hard cancels on expiry.","enum":["soft","hard"],"type":"string"},"web":{"description":"External context policy for this run.","enum":["off","auto","cached","live"],"type":"string"}},"required":["prompt"],"type":"object"},"name":"claudexor_plan","outputSchema":{"additionalProperties":false,"description":"Structured MCP tool result for Claudexor run tools.","properties":{"applyEligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"description":"Apply-gate verdict for mutating runs; null for read-only routes or when no patch exists."},"attemptExecution":{"items":{"additionalProperties":false,"description":"Compact projection of existing attempt execution and amount evidence.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"harnessId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"processing":{"additionalProperties":false,"description":"Requested intent, submitted native control, and observed execution are independent facts. A submitted flag never proves observed service; mixed or missing session observations remain explicit.","properties":{"observed":{"enum":["standard","fast","economy","mixed","unknown"],"type":"string"},"observedNative":{"items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"reason":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"requested":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"submitted":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"submittedNative":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."}},"required":["requested","submitted","submittedNative","observed","observedNative","reason","source"],"type":"object"},"processingCostBasis":{"additionalProperties":false,"description":"Mode-qualified billing evidence for an existing cost record. Authentication alone does not establish included premium service; credits, cash, and token valuation stay distinct.","properties":{"debit":{"const":"unobserved","description":"The route reports no actual cash or purchased-credit debit. Included service still admits the work, but its cash stays unknown instead of zero and is outside the finite cap; absence keeps proven ordinary inclusion as zero cash.","type":"string"},"kind":{"enum":["included","paid_credits","cash","valuation","unknown"],"type":"string"},"nativeMode":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"}},"required":["nativeMode","kind","source"],"type":"object"},"usageCost":{"additionalProperties":false,"description":"Observed usage components. An amount of unknown meaning is not charged cash; separately proven included service can still establish exact zero incremental cash unless its route reports no actual debit.","properties":{"cashKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"cashUsd":{"minimum":0,"type":"number"},"unknownUsd":{"minimum":0,"type":"number"},"valuationKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"minimum":0,"type":"number"}},"required":["cashUsd","valuationUsd","unknownUsd","cashKnowledge","valuationKnowledge"],"type":"object"}},"required":["attemptId","harnessId"],"type":"object"},"type":"array"},"council":{"anyOf":[{"additionalProperties":false,"description":"Council membership + merge disclosure for a --council plan run.","properties":{"degraded":{"default":false,"description":"True when fewer contract-accepted drafts than requested, including any retained unverified contribution; failures remain disclosed per member.","type":"boolean"},"drafted":{"description":"Members with contract-accepted drafts; excludes retained unverified inputs and is not a work-completion or verification count.","minimum":0,"type":"integer"},"members":{"default":[],"description":"Per-member role and outcome.","items":{"additionalProperties":false,"description":"One council member's role and draft/merge outcome.","properties":{"error":{"default":null,"description":"First redacted draft error; null unless the member failed.","type":["string","null"]},"harnessId":{"description":"Harness that drafted (or merged) this member's plan.","minLength":1,"type":"string"},"role":{"description":"primary = the merger that synthesizes the unified plan; member = draft only.","enum":["primary","member"],"type":"string"},"status":{"description":"Draft outcome: drafted = contract-accepted input; merged = accepted draft and successful merge; failed stays failed even when its unverified text helped the merger.","enum":["drafted","failed","merged"],"type":"string"}},"required":["harnessId","role","status"],"type":"object"},"type":"array"},"mergedBy":{"default":null,"description":"Harness that produced the unified plan (the primary); null if the merge failed.","type":["string","null"]},"requested":{"description":"Requested member count (n; at least 2, up to the configured Council cap).","exclusiveMinimum":0,"type":"integer"}},"required":["requested","drafted"],"type":"object"},{"type":"null"}],"default":null,"description":"Council membership + merge disclosure (QA-023b); null for solo/non-plan tools or deferred handles."},"deferredMessage":{"anyOf":[{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"},{"type":"null"}],"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved."},"delegatedFromRunId":{"default":null,"type":["string","null"]},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.","properties":{"effective":{"default":false,"type":"boolean"},"reason":{"default":"not_requested","enum":["pending","not_requested","injected_unused","used","runtime_unavailable","manifest_unsupported","access_profile_incompatible","partially_degraded","startup_failed"],"type":"string"},"remediation":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null},"requested":{"default":false,"type":"boolean"},"used":{"default":false,"type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output."},"detailProblem":{"anyOf":[{"additionalProperties":false,"description":"Typed failure of a post-run detail read whose durable run result still survives.","properties":{"code":{"description":"Stable machine code of the detail problem, if any.","type":["string","null"]},"message":{"description":"Human-readable description of the detail problem.","type":"string"},"retryable":{"description":"Whether retrying the detail read may help.","type":["boolean","null"]}},"required":["code","message","retryable"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed post-terminal detail-read problem (the run result survives; its detail projections are absent for this reason); null when the detail read succeeded."},"failure":{"anyOf":[{"additionalProperties":false,"description":"Typed failure record for a run: phase, category, evidence references, and suggested next actions.","properties":{"attemptId":{"default":null,"description":"Attempt involved in the failure, when known.","type":["string","null"]},"captureFailure":{"additionalProperties":false,"properties":{"bufferBudgetBytes":{"minimum":0,"type":"integer"},"causeCode":{"type":"string"},"cleanup":{"additionalProperties":false,"properties":{"code":{"type":["string","null"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"code":{"enum":["capture_output_exceeded","capture_output_incomplete","capture_preview_truncated","capture_failed"],"type":"string"},"drain":{"const":"truncated","type":"string"},"message":{"type":"string"},"stream":{"enum":["stdout","stderr"],"type":"string"}},"required":["code","message"],"type":"object"},"category":{"default":"unknown","description":"Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness.","enum":["validation","project","auth","harness_unavailable","harness_error","config_error","budget","policy","cancelled","internal","unknown"],"type":"string"},"code":{"anyOf":[{"description":"Machine-readable failure sub-code within a RunFailure category, including historical delegated-run failures and active access-profile refusals.","enum":["finite_zero","hard_cap","estimate_headroom","unknown_paid_in_flight","budget_overshoot","cost_unverifiable","delegation_child_drain_timeout","subscription_window_exhausted","credential_pool_exhausted","input_too_large","vendor_cli_too_old","credential_source_unconfirmed","delegated_home_unavailable","delegated_confinement_unavailable","delegated_evidence_incomplete","access_profile_incompatible","auxiliary_writable_roots_unsupported","retired_access_profile"],"type":"string"},{"type":"null"}],"default":null,"description":"Machine-readable failure sub-code within the category; null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage."},"eventRefs":{"default":[],"description":"Event references relevant to the failure.","items":{"type":"string"},"type":"array"},"harnessId":{"default":null,"description":"Harness involved in the failure, when known.","type":["string","null"]},"logRefs":{"default":[],"description":"Log artifact paths relevant to the failure.","items":{"type":"string"},"type":"array"},"nextActions":{"default":[],"description":"Suggested operator next actions.","items":{"type":"string"},"type":"array"},"phase":{"default":"unknown","description":"Pipeline phase where the failure happened.","type":"string"},"poolAttempts":{"default":[],"description":"Every failed execution try in order, each with its own account and error text; empty when no try failed (and for records written before this field existed).","items":{"additionalProperties":false,"description":"Per-try account attribution of a failed execution try (diagnostic evidence only).","properties":{"attemptId":{"description":"Attempt the try belongs to.","minLength":1,"type":"string"},"category":{"description":"Typed failure category of the try; untyped errors are unknown_harness_error.","enum":["timeout","rate_limited","auth_failed","capability_refused","process_crash","config_error","unknown_harness_error"],"type":"string"},"error":{"description":"The try's own error text with its original wording and whitespace, redacted.","type":"string"},"harnessId":{"description":"Harness the try ran on.","minLength":1,"type":"string"},"observedAt":{"description":"When the try's first error was observed.","format":"date-time","type":"string"},"phase":{"description":"How far the try got: before a typed session start, after start but before agent progress, or after progress.","enum":["pre_start","pre_progress","after_progress"],"type":"string"},"profileDisplayName":{"description":"The row's display name at try time (redacted); null for the default route.","type":["string","null"]},"profileId":{"description":"Account row the try ran on; null = the harness default route.","type":["string","null"]},"requestedModel":{"description":"Model the try asked for; null = the harness default model.","type":["string","null"]},"tryIndex":{"description":"Zero-based try index within the attempt.","minimum":0,"type":"integer"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"description":"The vendor's own typed failure for this try, when the adapter attached one."}},"required":["harnessId","profileId","profileDisplayName","requestedModel","attemptId","tryIndex","observedAt","phase","category","error","vendorFailure"],"type":"object"},"type":"array"},"rawDetailRef":{"default":null,"description":"Artifact path holding the raw (redacted) failure detail.","type":["string","null"]},"requestRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"actual":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"kind":{"const":"input_too_large","type":"string"},"limit":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"native_code":{"minLength":1,"type":"string"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"}},"required":["scope","unit","limit","source","kind","actual","native_code"],"type":"object"},{"additionalProperties":false,"properties":{"binary_path":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"installed_version":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"kind":{"const":"vendor_cli_too_old","type":"string"},"native_code":{"const":"claude_code_version_too_old","type":"string"},"source":{"const":"claude_stdout","type":"string"}},"required":["kind","native_code","source","binary_path","installed_version"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"credential_source_unconfirmed","type":"string"},"native_code":{"const":"grok_credential_source_unconfirmed","type":"string"},"reported_source":{"description":"Redacted credential source the vendor's startup frame reported.","maxLength":80,"type":"string"},"source":{"const":"grok_init","type":"string"}},"required":["kind","native_code","source","reported_source"],"type":"object"}],"description":"Vendor-attested request refusal that stops retries and account rotation on its harness; input, executable and credential-source causes carry their own evidence."},"resetsAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the refused window reopens (a spent subscription quota window), or null when the failure has no such time. Callers schedule a retry off this field, never off safeMessage."},"runDir":{"default":null,"description":"Run artifact directory.","type":["string","null"]},"safeMessage":{"description":"Redacted human-readable failure message.","type":"string"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"default":null,"description":"The vendor's own typed failure for the attempt this record speaks for, or null when no vendor-typed evidence exists (every harness without such a channel, and any unreadable record). Facts only: carries no remedy."}},"required":["safeMessage"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed terminal failure detail and recovery actions; null for non-failed runs."},"jobId":{"default":null,"description":"Daemon job id of the accepted launch. While runId is null, pass it as runId to the status, wait and result tools; they report the canonical runId once the run binds.","type":["string","null"]},"outcomeBanner":{"default":null,"description":"Server-owned outcome headline (D18); the single honest one-line verdict, null while non-terminal or unavailable.","type":["string","null"]},"outcomeFacts":{"anyOf":[{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},{"type":"null"}],"default":null,"description":"The D8 terminal outcome axes (checks/review/reason/noChanges); null for non-terminal or read-only routes."},"parentRunId":{"default":null,"type":["string","null"]},"planReadiness":{"anyOf":[{"additionalProperties":false,"description":"Server-derived readiness of a plan run (one derivation owner; D17).","properties":{"questionCount":{"default":0,"minimum":0,"type":"integer"},"state":{"description":"Derived plan readiness: ready (block parsed, zero open questions), needs_answers (open questions remain), unverified (no parseable block — the planner ignored the format).","enum":["ready","needs_answers","unverified"],"type":"string"}},"required":["state"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived plan readiness for plan tools (D17); null for non-plan tools."},"runDir":{"description":"Artifact directory of the run; null when not persisted.","type":["string","null"]},"runFacts":{"anyOf":[{"additionalProperties":false,"description":"Validated immutable terminal facts for one run.","properties":{"apply":{"additionalProperties":false,"description":"Terminal apply eligibility and operator-decision state.","properties":{"eligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Delivery-gate eligibility at terminalization; null when nothing is applyable."},"operator_decision_present":{"default":false,"description":"Whether a valid operator decision was present when the receipt was finalized.","type":"boolean"}},"type":"object"},"deliverable":{"additionalProperties":false,"description":"Canonical primary-output presence and identity for a terminal run.","properties":{"kind":{"anyOf":[{"enum":["answer","report","plan","patch","files","structured_output"],"type":"string"},{"type":"null"}],"description":"Kind of canonical primary deliverable; null when none exists."},"path":{"description":"Run-relative path of the canonical primary deliverable; null when absent.","type":["string","null"]},"present":{"description":"Whether the canonical primary deliverable exists.","type":"boolean"},"producer_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt that produced the deliverable, when known."}},"required":["present","kind","path"],"type":"object"},"gates":{"additionalProperties":false,"description":"Canonical gate configuration and terminal receipt projection.","properties":{"configured":{"description":"Whether the frozen task configured deterministic gates.","type":"boolean"},"executed":{"description":"Whether the terminal attempt executed the gate set.","type":"boolean"},"receipt_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt whose gate receipt decides this projection; null when no gates executed."},"required":{"description":"Number of configured required gates.","minimum":0,"type":"integer"},"state":{"description":"Terminal state of the configured deterministic gate set.","enum":["not_configured","passed","failed","skipped"],"type":"string"},"total":{"description":"Total configured deterministic gates.","minimum":0,"type":"integer"}},"required":["configured","required","total","executed","state"],"type":"object"},"generated_at":{"description":"When this immutable terminal receipt was finalized.","minLength":1,"type":"string"},"mode":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"outcome":{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},"participants":{"additionalProperties":false,"description":"Terminal participant graph plus its planner-lane count.","properties":{"attempts":{"default":[],"description":"Role-labelled participant roster.","items":{"additionalProperties":false,"description":"One role-labelled participant in the terminal run graph.","properties":{"attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Attempt id when the participant owns an orchestrator attempt; null for reviewer-panel members."},"deliverable_present":{"default":false,"description":"Whether this participant produced the deliverable its role requested.","type":"boolean"},"harness_id":{"description":"Harness that served this participant role.","minLength":1,"type":"string"},"role":{"description":"Canonical role of one participant in the terminal run graph.","enum":["planner","merge","candidate","scout","reducer","reviewer"],"type":"string"},"status":{"anyOf":[{"description":"Terminal outcome recorded for one run participant.","enum":["success","success_with_warnings","blocked","failed"],"type":"string"},{"type":"null"}],"default":null,"description":"Participant outcome when recorded; null for artifact-only reviewer membership."}},"required":["attempt_id","harness_id","role"],"type":"object"},"type":"array"},"planners":{"description":"Number of participants whose canonical role is planner.","minimum":0,"type":"integer"}},"required":["planners"],"type":"object"},"presentation":{"additionalProperties":false,"description":"Immutable terminal output state and primary artifact. Absent only on legacy RunFacts receipts.","properties":{"primary":{"anyOf":[{"additionalProperties":false,"description":"Primary user-facing artifact selected once during terminal preparation.","properties":{"kind":{"description":"Presentation kind of the terminal primary artifact.","enum":["answer","report","plan","patch","files","structured_output","diagnostic"],"type":"string"},"path":{"description":"Normalized run-relative path of the terminal primary artifact.","minLength":1,"type":"string"}},"required":["kind","path"],"type":"object"},{"type":"null"}],"description":"Selected terminal primary artifact, or null when the receipt announces readiness without a primary deliverable."},"state":{"description":"Terminal output readiness decided by the last valid output.ready receipt.","enum":["ready","diagnostic"],"type":"string"}},"required":["state","primary"],"type":"object"},"required_actions":{"default":[],"description":"Typed actions required to unblock this terminal outcome.","items":{"additionalProperties":false,"description":"One typed required operator action derived from a run's terminal outcome facts.","properties":{"detail":{"description":"Human-readable guidance for this action (English-only, INV-141).","type":"string"},"id":{"description":"Stable machine id for a required operator action on a blocked terminal run.","enum":["provide_required_input","complete_incomplete_work","resolve_review_block","fix_failed_checks","record_operator_decision"],"type":"string"}},"required":["id","detail"],"type":"object"},"type":"array"},"review":{"additionalProperties":false,"description":"Canonical terminal review verdict and blocking-finding identity.","properties":{"blocker_ids":{"default":[],"description":"Stable ids of accepted evidence-backed blocking findings.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"blockers":{"description":"Number of blocking findings.","minimum":0,"type":"integer"},"state":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"}},"required":["state","blockers"],"type":"object"},"run_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"schema_version":{"const":2,"description":"Schema version of the artifact; bumped on breaking ABI changes.","type":"number"},"task_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["schema_version","run_id","task_id","mode","outcome","deliverable","participants","gates","review","apply","generated_at"],"type":"object"},{"type":"null"}],"default":null,"description":"Validated canonical terminal RunFacts receipt; null while active, unavailable, or for legacy runs."},"runId":{"description":"Daemon run id once the accepted job started a run (recovery handle for inspect/follow/apply/decision); null while the job is still queued or after it failed before a run started.","type":["string","null"]},"status":{"description":"Run lifecycle state (queued | running | succeeded | failed | cancelled | interrupted); null when an accepted job's state could not be read.","type":["string","null"]},"storeId":{"description":"Identity of the durable engine store that accepted this group member, stable across restarts.","minLength":1,"type":"string"},"summary":{"description":"Human-readable outcome summary (same text as the tool's text content).","type":"string"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"}},"required":["summary","runId","runDir","status","applyEligibility"],"type":"object"}},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Enqueue a create-from-scratch Claudexor run. Returns a durable run handle; use claudexor_run_status/result for terminal output.","inputSchema":{"additionalProperties":false,"properties":{"access":{"description":"Optional access profile for this run.","enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"attachments":{"description":"Immutable resource references from upload finalize. Paths, base64 and internal resolved attachments are rejected; ordinary lane admission still applies.","items":{"additionalProperties":false,"description":"Reference to an immutable daemon-owned uploaded resource.","properties":{"resourceId":{"description":"Immutable daemon resource id returned by upload finalize.","minLength":1,"type":"string"}},"required":["resourceId"],"type":"object"},"type":"array"},"credentialProfileId":{"description":"Strict credential profile for this run; never falls back to another account.","minLength":1,"pattern":"\\S","type":"string"},"effort":{"description":"Optional effort override for the primary harness. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"execution":{"additionalProperties":false,"properties":{"auxiliaryWritableRoots":{"description":"Exact existing absolute directories, created by the caller, that an Agent run with effective workspace_write may also write (service caches or scratch outside the execution tree). [] grants nothing extra; so does omission, except that a continueFrom successor omitting execution inherits its predecessor's whole execution group. Requires a lane whose capability_profile.access_control.auxiliary_writable_roots is true; the files are never part of the project result.","items":{"minLength":1,"type":"string"},"type":"array"},"delegated":{"type":"boolean"},"isolation":{"enum":["envelope","live"],"type":"string"},"scopePaths":{"description":"Selected relative files/directories; '.' selects the whole folder. No implicit whole-folder claim.","items":{"minLength":1,"type":"string"},"type":"array"},"workspaceKind":{"description":"directory needs no Git initialization.","enum":["git","directory"],"type":"string"},"workspaceRoot":{"description":"Actual existing delegated execution directory; stable project identity remains repoPath.","type":"string"}},"type":"object"},"externalContextPolicy":{"description":"Alias of web for control-api parity.","enum":["off","auto","cached","live"],"type":"string"},"harness":{"description":"Optional harness id to force for this one-shot run.","minLength":1,"type":"string"},"idempotencyKey":{"description":"Caller-owned key for this exact launch; requires an explicit repoPath. After an unknown response, repeat the same key and arguments to recover the accepted job or run (a queued job returns its jobId); a different request with the same key conflicts. Recovery assumes the same registered project root still exists: a missing or moved root is refused (project_root_missing) and nothing is replayed or started. Omit for an intentional new launch.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"maxSeconds":{"description":"Initial run time limit in seconds. Explicit limits default to hard unless timeLimitMode is soft.","maximum":604800,"minimum":1,"type":"integer"},"model":{"description":"Optional model override for the primary harness.","minLength":1,"type":"string"},"n":{"description":"Optional best-of-N width for candidate races (or deep-scan scout width).","minimum":1,"type":"integer"},"paidBudget":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"unlimited","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"finite","type":"string"},"maxUsd":{"minimum":0,"type":"number"}},"required":["kind","maxUsd"],"type":"object"}],"description":"Incremental-cash budget: explicitly unlimited or a finite non-negative USD cap."},"primaryHarness":{"description":"Optional primary harness id for this run.","minLength":1,"type":"string"},"processingPreference":{"description":"Advisory service preference; omission inherits captured settings and explicit Standard requests ordinary service.","enum":["standard","fast","economy"],"type":"string"},"prompt":{"description":"The user task or question to run through Claudexor.","minLength":1,"pattern":"\\S","type":"string"},"protectedPathApprovals":{"description":"Typed approvals for existing protected path edits.","items":{"additionalProperties":false,"properties":{"path":{"minLength":1,"type":"string"},"reason":{"minLength":1,"type":"string"}},"required":["path"],"type":"object"},"type":"array"},"repoPath":{"description":"Absolute path of the target project. Defaults to the MCP server cwd; required with idempotencyKey.","type":"string"},"review":{"description":"Enable internal model review. Ordinary Agent defaults to false; true selects reviewers automatically. An explicit reviewer panel or reviewer overrides also enable review. Best-of and until-clean retain review.","type":"boolean"},"reviewerEfforts":{"additionalProperties":false,"description":"Enable review with per-provider reviewer effort overrides.","properties":{"anthropic":{"description":"Reviewer effort for the anthropic family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"cursor":{"description":"Reviewer effort for the cursor family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"google":{"description":"Reviewer effort for the google family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"local":{"description":"Reviewer effort for the local family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"openai":{"description":"Reviewer effort for the openai family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"opencode":{"description":"Reviewer effort for the opencode family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"unknown":{"description":"Reviewer effort for the unknown family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"xai":{"description":"Reviewer effort for the xai family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"}},"type":"object"},"reviewerModels":{"additionalProperties":false,"description":"Enable review with per-provider reviewer model overrides.","properties":{"anthropic":{"minLength":1,"type":"string"},"cursor":{"minLength":1,"type":"string"},"google":{"minLength":1,"type":"string"},"local":{"minLength":1,"type":"string"},"openai":{"minLength":1,"type":"string"},"opencode":{"minLength":1,"type":"string"},"unknown":{"minLength":1,"type":"string"},"xai":{"minLength":1,"type":"string"}},"type":"object"},"reviewerPanel":{"description":"Enable review with explicit panel entries, preserving order and duplicates; no additional review flag is needed.","items":{"additionalProperties":false,"properties":{"credentialProfileId":{"description":"Optional strict credential profile id; absent uses the canonical account pool.","minLength":1,"type":"string"},"effort":{"description":"Effort for this reviewer entry. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"harness":{"minLength":1,"type":"string"},"model":{"minLength":1,"type":"string"},"processingPreference":{"description":"Advisory service preference; omission inherits captured settings and explicit Standard requests ordinary service.","enum":["standard","fast","economy"],"type":"string"}},"required":["harness"],"type":"object"},"minItems":1,"type":"array"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"},"tests":{"description":"Typed-argv deterministic gate commands for this run.","items":{"additionalProperties":false,"description":"Canonical deterministic command invocation; no implicit shell parsing.","properties":{"args":{"default":[],"description":"Exact argv passed to the executable.","items":{"type":"string"},"type":"array"},"cwd":{"description":"Optional project-relative working directory for the command.","type":"string"},"envAllowlist":{"default":[],"description":"Non-secret parent environment names explicitly forwarded to the command.","items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"program":{"description":"Executable invoked directly without an implicit shell.","minLength":1,"pattern":"\\S","type":"string"}},"required":["program"],"type":"object"},"type":"array"},"timeLimitMode":{"description":"With maxSeconds: soft warns and continues; hard cancels on expiry.","enum":["soft","hard"],"type":"string"},"web":{"description":"External context policy for this run.","enum":["off","auto","cached","live"],"type":"string"}},"required":["prompt"],"type":"object"},"name":"claudexor_create","outputSchema":{"additionalProperties":false,"description":"Structured MCP tool result for Claudexor run tools.","properties":{"applyEligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"description":"Apply-gate verdict for mutating runs; null for read-only routes or when no patch exists."},"attemptExecution":{"items":{"additionalProperties":false,"description":"Compact projection of existing attempt execution and amount evidence.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"harnessId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"processing":{"additionalProperties":false,"description":"Requested intent, submitted native control, and observed execution are independent facts. A submitted flag never proves observed service; mixed or missing session observations remain explicit.","properties":{"observed":{"enum":["standard","fast","economy","mixed","unknown"],"type":"string"},"observedNative":{"items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"reason":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"requested":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"submitted":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"submittedNative":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."}},"required":["requested","submitted","submittedNative","observed","observedNative","reason","source"],"type":"object"},"processingCostBasis":{"additionalProperties":false,"description":"Mode-qualified billing evidence for an existing cost record. Authentication alone does not establish included premium service; credits, cash, and token valuation stay distinct.","properties":{"debit":{"const":"unobserved","description":"The route reports no actual cash or purchased-credit debit. Included service still admits the work, but its cash stays unknown instead of zero and is outside the finite cap; absence keeps proven ordinary inclusion as zero cash.","type":"string"},"kind":{"enum":["included","paid_credits","cash","valuation","unknown"],"type":"string"},"nativeMode":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"}},"required":["nativeMode","kind","source"],"type":"object"},"usageCost":{"additionalProperties":false,"description":"Observed usage components. An amount of unknown meaning is not charged cash; separately proven included service can still establish exact zero incremental cash unless its route reports no actual debit.","properties":{"cashKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"cashUsd":{"minimum":0,"type":"number"},"unknownUsd":{"minimum":0,"type":"number"},"valuationKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"minimum":0,"type":"number"}},"required":["cashUsd","valuationUsd","unknownUsd","cashKnowledge","valuationKnowledge"],"type":"object"}},"required":["attemptId","harnessId"],"type":"object"},"type":"array"},"council":{"anyOf":[{"additionalProperties":false,"description":"Council membership + merge disclosure for a --council plan run.","properties":{"degraded":{"default":false,"description":"True when fewer contract-accepted drafts than requested, including any retained unverified contribution; failures remain disclosed per member.","type":"boolean"},"drafted":{"description":"Members with contract-accepted drafts; excludes retained unverified inputs and is not a work-completion or verification count.","minimum":0,"type":"integer"},"members":{"default":[],"description":"Per-member role and outcome.","items":{"additionalProperties":false,"description":"One council member's role and draft/merge outcome.","properties":{"error":{"default":null,"description":"First redacted draft error; null unless the member failed.","type":["string","null"]},"harnessId":{"description":"Harness that drafted (or merged) this member's plan.","minLength":1,"type":"string"},"role":{"description":"primary = the merger that synthesizes the unified plan; member = draft only.","enum":["primary","member"],"type":"string"},"status":{"description":"Draft outcome: drafted = contract-accepted input; merged = accepted draft and successful merge; failed stays failed even when its unverified text helped the merger.","enum":["drafted","failed","merged"],"type":"string"}},"required":["harnessId","role","status"],"type":"object"},"type":"array"},"mergedBy":{"default":null,"description":"Harness that produced the unified plan (the primary); null if the merge failed.","type":["string","null"]},"requested":{"description":"Requested member count (n; at least 2, up to the configured Council cap).","exclusiveMinimum":0,"type":"integer"}},"required":["requested","drafted"],"type":"object"},{"type":"null"}],"default":null,"description":"Council membership + merge disclosure (QA-023b); null for solo/non-plan tools or deferred handles."},"deferredMessage":{"anyOf":[{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"},{"type":"null"}],"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved."},"delegatedFromRunId":{"default":null,"type":["string","null"]},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.","properties":{"effective":{"default":false,"type":"boolean"},"reason":{"default":"not_requested","enum":["pending","not_requested","injected_unused","used","runtime_unavailable","manifest_unsupported","access_profile_incompatible","partially_degraded","startup_failed"],"type":"string"},"remediation":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null},"requested":{"default":false,"type":"boolean"},"used":{"default":false,"type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output."},"detailProblem":{"anyOf":[{"additionalProperties":false,"description":"Typed failure of a post-run detail read whose durable run result still survives.","properties":{"code":{"description":"Stable machine code of the detail problem, if any.","type":["string","null"]},"message":{"description":"Human-readable description of the detail problem.","type":"string"},"retryable":{"description":"Whether retrying the detail read may help.","type":["boolean","null"]}},"required":["code","message","retryable"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed post-terminal detail-read problem (the run result survives; its detail projections are absent for this reason); null when the detail read succeeded."},"failure":{"anyOf":[{"additionalProperties":false,"description":"Typed failure record for a run: phase, category, evidence references, and suggested next actions.","properties":{"attemptId":{"default":null,"description":"Attempt involved in the failure, when known.","type":["string","null"]},"captureFailure":{"additionalProperties":false,"properties":{"bufferBudgetBytes":{"minimum":0,"type":"integer"},"causeCode":{"type":"string"},"cleanup":{"additionalProperties":false,"properties":{"code":{"type":["string","null"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"code":{"enum":["capture_output_exceeded","capture_output_incomplete","capture_preview_truncated","capture_failed"],"type":"string"},"drain":{"const":"truncated","type":"string"},"message":{"type":"string"},"stream":{"enum":["stdout","stderr"],"type":"string"}},"required":["code","message"],"type":"object"},"category":{"default":"unknown","description":"Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness.","enum":["validation","project","auth","harness_unavailable","harness_error","config_error","budget","policy","cancelled","internal","unknown"],"type":"string"},"code":{"anyOf":[{"description":"Machine-readable failure sub-code within a RunFailure category, including historical delegated-run failures and active access-profile refusals.","enum":["finite_zero","hard_cap","estimate_headroom","unknown_paid_in_flight","budget_overshoot","cost_unverifiable","delegation_child_drain_timeout","subscription_window_exhausted","credential_pool_exhausted","input_too_large","vendor_cli_too_old","credential_source_unconfirmed","delegated_home_unavailable","delegated_confinement_unavailable","delegated_evidence_incomplete","access_profile_incompatible","auxiliary_writable_roots_unsupported","retired_access_profile"],"type":"string"},{"type":"null"}],"default":null,"description":"Machine-readable failure sub-code within the category; null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage."},"eventRefs":{"default":[],"description":"Event references relevant to the failure.","items":{"type":"string"},"type":"array"},"harnessId":{"default":null,"description":"Harness involved in the failure, when known.","type":["string","null"]},"logRefs":{"default":[],"description":"Log artifact paths relevant to the failure.","items":{"type":"string"},"type":"array"},"nextActions":{"default":[],"description":"Suggested operator next actions.","items":{"type":"string"},"type":"array"},"phase":{"default":"unknown","description":"Pipeline phase where the failure happened.","type":"string"},"poolAttempts":{"default":[],"description":"Every failed execution try in order, each with its own account and error text; empty when no try failed (and for records written before this field existed).","items":{"additionalProperties":false,"description":"Per-try account attribution of a failed execution try (diagnostic evidence only).","properties":{"attemptId":{"description":"Attempt the try belongs to.","minLength":1,"type":"string"},"category":{"description":"Typed failure category of the try; untyped errors are unknown_harness_error.","enum":["timeout","rate_limited","auth_failed","capability_refused","process_crash","config_error","unknown_harness_error"],"type":"string"},"error":{"description":"The try's own error text with its original wording and whitespace, redacted.","type":"string"},"harnessId":{"description":"Harness the try ran on.","minLength":1,"type":"string"},"observedAt":{"description":"When the try's first error was observed.","format":"date-time","type":"string"},"phase":{"description":"How far the try got: before a typed session start, after start but before agent progress, or after progress.","enum":["pre_start","pre_progress","after_progress"],"type":"string"},"profileDisplayName":{"description":"The row's display name at try time (redacted); null for the default route.","type":["string","null"]},"profileId":{"description":"Account row the try ran on; null = the harness default route.","type":["string","null"]},"requestedModel":{"description":"Model the try asked for; null = the harness default model.","type":["string","null"]},"tryIndex":{"description":"Zero-based try index within the attempt.","minimum":0,"type":"integer"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"description":"The vendor's own typed failure for this try, when the adapter attached one."}},"required":["harnessId","profileId","profileDisplayName","requestedModel","attemptId","tryIndex","observedAt","phase","category","error","vendorFailure"],"type":"object"},"type":"array"},"rawDetailRef":{"default":null,"description":"Artifact path holding the raw (redacted) failure detail.","type":["string","null"]},"requestRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"actual":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"kind":{"const":"input_too_large","type":"string"},"limit":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"native_code":{"minLength":1,"type":"string"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"}},"required":["scope","unit","limit","source","kind","actual","native_code"],"type":"object"},{"additionalProperties":false,"properties":{"binary_path":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"installed_version":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"kind":{"const":"vendor_cli_too_old","type":"string"},"native_code":{"const":"claude_code_version_too_old","type":"string"},"source":{"const":"claude_stdout","type":"string"}},"required":["kind","native_code","source","binary_path","installed_version"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"credential_source_unconfirmed","type":"string"},"native_code":{"const":"grok_credential_source_unconfirmed","type":"string"},"reported_source":{"description":"Redacted credential source the vendor's startup frame reported.","maxLength":80,"type":"string"},"source":{"const":"grok_init","type":"string"}},"required":["kind","native_code","source","reported_source"],"type":"object"}],"description":"Vendor-attested request refusal that stops retries and account rotation on its harness; input, executable and credential-source causes carry their own evidence."},"resetsAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the refused window reopens (a spent subscription quota window), or null when the failure has no such time. Callers schedule a retry off this field, never off safeMessage."},"runDir":{"default":null,"description":"Run artifact directory.","type":["string","null"]},"safeMessage":{"description":"Redacted human-readable failure message.","type":"string"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"default":null,"description":"The vendor's own typed failure for the attempt this record speaks for, or null when no vendor-typed evidence exists (every harness without such a channel, and any unreadable record). Facts only: carries no remedy."}},"required":["safeMessage"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed terminal failure detail and recovery actions; null for non-failed runs."},"jobId":{"default":null,"description":"Daemon job id of the accepted launch. While runId is null, pass it as runId to the status, wait and result tools; they report the canonical runId once the run binds.","type":["string","null"]},"outcomeBanner":{"default":null,"description":"Server-owned outcome headline (D18); the single honest one-line verdict, null while non-terminal or unavailable.","type":["string","null"]},"outcomeFacts":{"anyOf":[{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},{"type":"null"}],"default":null,"description":"The D8 terminal outcome axes (checks/review/reason/noChanges); null for non-terminal or read-only routes."},"parentRunId":{"default":null,"type":["string","null"]},"planReadiness":{"anyOf":[{"additionalProperties":false,"description":"Server-derived readiness of a plan run (one derivation owner; D17).","properties":{"questionCount":{"default":0,"minimum":0,"type":"integer"},"state":{"description":"Derived plan readiness: ready (block parsed, zero open questions), needs_answers (open questions remain), unverified (no parseable block — the planner ignored the format).","enum":["ready","needs_answers","unverified"],"type":"string"}},"required":["state"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived plan readiness for plan tools (D17); null for non-plan tools."},"runDir":{"description":"Artifact directory of the run; null when not persisted.","type":["string","null"]},"runFacts":{"anyOf":[{"additionalProperties":false,"description":"Validated immutable terminal facts for one run.","properties":{"apply":{"additionalProperties":false,"description":"Terminal apply eligibility and operator-decision state.","properties":{"eligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Delivery-gate eligibility at terminalization; null when nothing is applyable."},"operator_decision_present":{"default":false,"description":"Whether a valid operator decision was present when the receipt was finalized.","type":"boolean"}},"type":"object"},"deliverable":{"additionalProperties":false,"description":"Canonical primary-output presence and identity for a terminal run.","properties":{"kind":{"anyOf":[{"enum":["answer","report","plan","patch","files","structured_output"],"type":"string"},{"type":"null"}],"description":"Kind of canonical primary deliverable; null when none exists."},"path":{"description":"Run-relative path of the canonical primary deliverable; null when absent.","type":["string","null"]},"present":{"description":"Whether the canonical primary deliverable exists.","type":"boolean"},"producer_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt that produced the deliverable, when known."}},"required":["present","kind","path"],"type":"object"},"gates":{"additionalProperties":false,"description":"Canonical gate configuration and terminal receipt projection.","properties":{"configured":{"description":"Whether the frozen task configured deterministic gates.","type":"boolean"},"executed":{"description":"Whether the terminal attempt executed the gate set.","type":"boolean"},"receipt_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt whose gate receipt decides this projection; null when no gates executed."},"required":{"description":"Number of configured required gates.","minimum":0,"type":"integer"},"state":{"description":"Terminal state of the configured deterministic gate set.","enum":["not_configured","passed","failed","skipped"],"type":"string"},"total":{"description":"Total configured deterministic gates.","minimum":0,"type":"integer"}},"required":["configured","required","total","executed","state"],"type":"object"},"generated_at":{"description":"When this immutable terminal receipt was finalized.","minLength":1,"type":"string"},"mode":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"outcome":{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},"participants":{"additionalProperties":false,"description":"Terminal participant graph plus its planner-lane count.","properties":{"attempts":{"default":[],"description":"Role-labelled participant roster.","items":{"additionalProperties":false,"description":"One role-labelled participant in the terminal run graph.","properties":{"attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Attempt id when the participant owns an orchestrator attempt; null for reviewer-panel members."},"deliverable_present":{"default":false,"description":"Whether this participant produced the deliverable its role requested.","type":"boolean"},"harness_id":{"description":"Harness that served this participant role.","minLength":1,"type":"string"},"role":{"description":"Canonical role of one participant in the terminal run graph.","enum":["planner","merge","candidate","scout","reducer","reviewer"],"type":"string"},"status":{"anyOf":[{"description":"Terminal outcome recorded for one run participant.","enum":["success","success_with_warnings","blocked","failed"],"type":"string"},{"type":"null"}],"default":null,"description":"Participant outcome when recorded; null for artifact-only reviewer membership."}},"required":["attempt_id","harness_id","role"],"type":"object"},"type":"array"},"planners":{"description":"Number of participants whose canonical role is planner.","minimum":0,"type":"integer"}},"required":["planners"],"type":"object"},"presentation":{"additionalProperties":false,"description":"Immutable terminal output state and primary artifact. Absent only on legacy RunFacts receipts.","properties":{"primary":{"anyOf":[{"additionalProperties":false,"description":"Primary user-facing artifact selected once during terminal preparation.","properties":{"kind":{"description":"Presentation kind of the terminal primary artifact.","enum":["answer","report","plan","patch","files","structured_output","diagnostic"],"type":"string"},"path":{"description":"Normalized run-relative path of the terminal primary artifact.","minLength":1,"type":"string"}},"required":["kind","path"],"type":"object"},{"type":"null"}],"description":"Selected terminal primary artifact, or null when the receipt announces readiness without a primary deliverable."},"state":{"description":"Terminal output readiness decided by the last valid output.ready receipt.","enum":["ready","diagnostic"],"type":"string"}},"required":["state","primary"],"type":"object"},"required_actions":{"default":[],"description":"Typed actions required to unblock this terminal outcome.","items":{"additionalProperties":false,"description":"One typed required operator action derived from a run's terminal outcome facts.","properties":{"detail":{"description":"Human-readable guidance for this action (English-only, INV-141).","type":"string"},"id":{"description":"Stable machine id for a required operator action on a blocked terminal run.","enum":["provide_required_input","complete_incomplete_work","resolve_review_block","fix_failed_checks","record_operator_decision"],"type":"string"}},"required":["id","detail"],"type":"object"},"type":"array"},"review":{"additionalProperties":false,"description":"Canonical terminal review verdict and blocking-finding identity.","properties":{"blocker_ids":{"default":[],"description":"Stable ids of accepted evidence-backed blocking findings.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"blockers":{"description":"Number of blocking findings.","minimum":0,"type":"integer"},"state":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"}},"required":["state","blockers"],"type":"object"},"run_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"schema_version":{"const":2,"description":"Schema version of the artifact; bumped on breaking ABI changes.","type":"number"},"task_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["schema_version","run_id","task_id","mode","outcome","deliverable","participants","gates","review","apply","generated_at"],"type":"object"},{"type":"null"}],"default":null,"description":"Validated canonical terminal RunFacts receipt; null while active, unavailable, or for legacy runs."},"runId":{"description":"Daemon run id once the accepted job started a run (recovery handle for inspect/follow/apply/decision); null while the job is still queued or after it failed before a run started.","type":["string","null"]},"status":{"description":"Run lifecycle state (queued | running | succeeded | failed | cancelled | interrupted); null when an accepted job's state could not be read.","type":["string","null"]},"storeId":{"description":"Identity of the durable engine store that accepted this group member, stable across restarts.","minLength":1,"type":"string"},"summary":{"description":"Human-readable outcome summary (same text as the tool's text content).","type":"string"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"}},"required":["summary","runId","runDir","status","applyEligibility"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"readOnlyHint":true},"description":"Read one bounded page of thread turns with answer previews and receipt facts. limit 1..20; choose at most one cursor, beforeTurnId, afterTurnId or aroundTurnId. No selector reads the newest turns. aroundTurnId returns the anchor and earlier turns; follow newerCursor for later turns. Ascending ordinals; cursors bind store, epoch, thread and limit. Replay refreshes current facts. Requires an existing daemon; never starts work.","inputSchema":{"additionalProperties":false,"properties":{"afterTurnId":{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"},"aroundTurnId":{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"},"beforeTurnId":{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"},"cursor":{"maxLength":2048,"minLength":1,"type":"string"},"expectedStoreId":{"minLength":1,"type":"string"},"limit":{"default":20,"maximum":20,"minimum":1,"type":"integer"},"threadId":{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"}},"required":["threadId"],"type":"object"},"name":"claudexor_thread_history","outputSchema":{"additionalProperties":false,"properties":{"epoch":{"maxLength":256,"minLength":1,"type":"string"},"hasNewer":{"type":"boolean"},"hasOlder":{"type":"boolean"},"header":{"additionalProperties":false,"properties":{"headRun":{"anyOf":[{"additionalProperties":false,"properties":{"run":{"additionalProperties":false,"description":"Compact run state embedded on a turn so a chat surface renders the whole conversation from one thread fetch.","properties":{"delegatedChildRunIds":{"default":[],"description":"At most eight server-owned direct Delegate child ids for whole-thread workspace aggregation.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"maxItems":8,"type":"array"},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.","properties":{"effective":{"default":false,"type":"boolean"},"reason":{"default":"not_requested","enum":["pending","not_requested","injected_unused","used","runtime_unavailable","manifest_unsupported","access_profile_incompatible","partially_degraded","startup_failed"],"type":"string"},"remediation":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null},"requested":{"default":false,"type":"boolean"},"used":{"default":false,"type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Durable Delegate outcome receipt; null for ordinary and legacy turns."},"finishedAt":{"default":null,"description":"When the run finished; null while live.","type":["string","null"]},"mode":{"description":"Default mode for new turns.","enum":["ask","plan","agent"],"type":"string"},"n":{"description":"Race width, when the run was a race.","type":"integer"},"outcomeFacts":{"anyOf":[{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},{"type":"null"}],"default":null,"description":"D8 terminal outcome axes (checks/review/reason/noChanges) for the turn; null while non-terminal."},"outputReadyState":{"default":"pending","description":"Whether a terminal run also has a loaded user-facing output artifact: pending (not yet), finalizing (being produced), ready (loaded), diagnostic (only diagnostic output).","enum":["pending","finalizing","ready","diagnostic"],"type":"string"},"result":{"additionalProperties":false,"default":{},"description":"Honest terminal outcome of a run (what the turn actually did), projected from the work product and answer artifacts.","properties":{"adopted":{"default":null,"description":"True when the live in-place tree was mutated this turn (regardless of review); null when unknown.","type":["boolean","null"]},"applyState":{"default":"not_applied","description":"Honest application state: not_applied (delivery pending), applied, applied_review_blocked, reverted, or discarded (remaining copied output deliberately not applied).","enum":["not_applied","applied","applied_review_blocked","reverted","discarded"],"type":"string"},"blockers":{"default":0,"description":"Count of accepted blocking review findings.","minimum":0,"type":"integer"},"diffStat":{"anyOf":[{"additionalProperties":false,"properties":{"additions":{"description":"Lines added.","minimum":0,"type":"integer"},"deletions":{"description":"Lines deleted.","minimum":0,"type":"integer"},"files":{"description":"Files changed.","minimum":0,"type":"integer"}},"required":["files","additions","deletions"],"type":"object"},{"type":"null"}],"default":null,"description":"Diff statistics; null unless a patch exists."},"kind":{"default":"none","description":"What the turn actually produced: a Git patch, directory files, an answer, a plan, a report, or nothing.","enum":["patch","files","answer","plan","report","none"],"type":"string"},"postTurnSha":{"default":null,"description":"Tree SHA right after this turn's mutation; revert refuses if the working tree has diverged from this since.","type":["string","null"]},"preTurnSha":{"default":null,"description":"Tree SHA before this turn mutated the in-place tree (revert restore target).","type":["string","null"]},"revertAnchorId":{"default":null,"description":"GC-independent revert anchor.","type":["string","null"]},"revertable":{"default":false,"description":"Revert metadata is available so a Revert affordance may be offered; not a live-safe guarantee — the server re-checks tree divergence at revert time.","type":"boolean"}},"type":"object"},"spendUsd":{"description":"Settled cash in USD; null when unknown.","type":["number","null"]},"state":{"description":"Control-plane run state = the run LIFECYCLE (D8): queued/running while live, then exactly one of succeeded / failed / cancelled / interrupted. Outcome quality (checks/review/delivery) is orthogonal — see outcomeFacts.","enum":["queued","running","succeeded","failed","cancelled","interrupted"],"type":"string"},"strategy":{"anyOf":[{"enum":["race","attempts","until_clean","deep_scan","create"],"type":"string"},{"type":"null"}],"description":"Engine strategy flag on the mode, when any."},"waitingOnUser":{"default":false,"description":"True while an interactive question is awaiting the user's answer.","type":"boolean"}},"required":["state"],"type":"object"},"runId":{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"}},"required":["runId","run"],"type":"object"},{"type":"null"}]},"headRunStatus":{"enum":["available","unbound","not_retained"],"type":"string"},"latestAdmission":{"anyOf":[{"additionalProperties":false,"description":"Control-plane projection of one thread turn with its embedded run card.","properties":{"enqueueError":{"anyOf":[{"additionalProperties":false,"properties":{"code":{"default":null,"description":"Machine-readable refusal code; remedies key on it, never on the message text.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context for exact retry.","type":"object"},"failedAt":{"description":"When the enqueue failed.","type":"string"},"message":{"description":"Human-readable refusal message.","type":"string"},"requiredActions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"False when no recorded job exists to replay — surfaces offer a new message instead of a doomed retry.","type":"boolean"}},"required":["message","failedAt"],"type":"object"},{"type":"null"}],"default":null,"description":"Why this turn has no run (enqueue/preflight refusal); null once a run binds."},"id":{"description":"Turn id.","minLength":1,"type":"string"},"jobId":{"anyOf":[{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"description":"Thread id."},"runId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Run backing this turn; null while unbound."},"state":{"anyOf":[{"description":"Control-plane run state = the run LIFECYCLE (D8): queued/running while live, then exactly one of succeeded / failed / cancelled / interrupted. Outcome quality (checks/review/delivery) is orthogonal — see outcomeFacts.","enum":["queued","running","succeeded","failed","cancelled","interrupted"],"type":"string"},{"type":"null"}],"description":"Control-plane run state = the run LIFECYCLE (D8): queued/running while live, then exactly one of succeeded / failed / cancelled / interrupted. Outcome quality (checks/review/delivery) is orthogonal — see outcomeFacts."}},"required":["id","jobId","state"],"type":"object"},{"type":"null"}],"description":"Control-plane projection of one thread turn with its embedded run card."},"latestOrdinal":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}],"description":"Latest stored turn ordinal, including runless turns; null only for an empty thread."},"latestTurnId":{"anyOf":[{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"description":"Thread id."},"sessions":{"items":{"additionalProperties":false,"description":"Control-plane projection of a vendor CLI session bound to a thread.","properties":{"harnessId":{"description":"Harness the session is bound to.","minLength":1,"type":"string"},"id":{"description":"Session id.","minLength":1,"type":"string"},"nativeSessionId":{"default":null,"description":"The vendor CLI session id; null when none exists.","type":["string","null"]},"observedModel":{"default":null,"description":"Model last observed on the session's stream.","type":["string","null"]},"profileId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Credential profile the vendor session was created under; resume never crosses profiles (null = engine-default credentials)."},"state":{"default":"live","description":"Session cache state: live, stale, or rebound.","enum":["live","stale","rebound"],"type":"string"},"threadId":{"description":"Thread the session belongs to.","minLength":1,"type":"string"}},"required":["id","threadId","harnessId"],"type":"object"},"maxItems":16,"type":"array"},"sessionsComplete":{"type":"boolean"},"thread":{"additionalProperties":false,"description":"Control-plane projection of a thread (camelCase view of the Thread artifact).","properties":{"access":{"anyOf":[{"description":"Access profile recorded by an immutable historical artifact. external_sandbox_full is retired and cannot be requested by active surfaces.","enum":["readonly","workspace_write","full","inherit_native","external_sandbox_full"],"type":"string"},{"type":"null"}],"default":null,"description":"Sticky write scope for write turns; null = the repo trust default."},"authPreference":{"default":"auto","description":"Preferred auth route: subscription (native/OAuth session), api_key (a stored API key), or auto (engine picks subscription-first with policy fallback). A preference, not a secret.","enum":["subscription","api_key","auto"],"type":"string"},"createdAt":{"description":"When the thread was created.","type":"string"},"credentialProfileId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Sticky credential profile for the thread; per-turn selection wins, null = engine-default credentials."},"eligibleHarnesses":{"default":[],"description":"Sticky eligible harness pool; empty = the engine auto-pools.","items":{"type":"string"},"type":"array"},"folder":{"anyOf":[{"description":"User-visible thread folder name.","maxLength":120,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Optional sidebar folder; null means ungrouped."},"headRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Most recent run of the thread; null before the first turn runs."},"id":{"description":"Thread id.","minLength":1,"type":"string"},"mode":{"description":"Default mode for new turns.","enum":["ask","plan","agent"],"type":"string"},"needsHuman":{"default":false,"description":"True when the head turn is blocked on a human decision (needs-me inbox).","type":"boolean"},"primaryHarness":{"default":null,"description":"Sticky primary harness for the thread; null = engine routing.","type":["string","null"]},"purgeAfter":{"default":null,"description":"Restore deadline, then auto-purge.","type":["string","null"]},"repoRoot":{"default":null,"description":"Project root the thread is anchored to; null for a no-project thread.","type":["string","null"]},"state":{"default":"active","description":"Thread lifecycle state: active, closed, trashed for recovery, or terminally purged.","enum":["active","closed","trashed","purged"],"type":"string"},"title":{"default":null,"description":"Thread title; null until set.","type":["string","null"]},"trashedAt":{"default":null,"description":"When the thread entered trash.","type":["string","null"]},"updatedAt":{"description":"When the thread was last updated.","type":"string"},"workspaceMode":{"default":"in_place","description":"Per-thread workspace mode: in_place mutates the live project tree directly (the default); isolated keeps a persistent git worktree per thread that apply merges into the project; delegated runs every turn in one caller-owned workspace bound at creation, which Claudexor never applies to the project or deletes.","enum":["in_place","isolated","delegated"],"type":"string"},"workspaceRoot":{"default":null,"description":"Caller-owned workspace a delegated thread executes in; null for in_place and isolated threads.","type":["string","null"]}},"required":["id","createdAt","updatedAt"],"type":"object"}},"required":["thread","latestTurnId","latestOrdinal","latestAdmission","headRun","headRunStatus","sessions","sessionsComplete"],"type":"object"},"limitedBy":{"anyOf":[{"enum":["turns","bytes"],"type":"string"},{"type":"null"}]},"newerCursor":{"anyOf":[{"maxLength":2048,"minLength":1,"type":"string"},{"type":"null"}]},"olderCursor":{"anyOf":[{"maxLength":2048,"minLength":1,"type":"string"},{"type":"null"}]},"replayCursor":{"anyOf":[{"maxLength":2048,"minLength":1,"type":"string"},{"type":"null"}]},"replayNextCursor":{"anyOf":[{"maxLength":2048,"minLength":1,"type":"string"},{"type":"null"}],"description":"Continue the original replay membership if current facts no longer fit one page; merge every segment before declaring the refresh complete."},"revision":{"additionalProperties":false,"properties":{"epoch":{"description":"Read-owner incarnation; compare sequence only within this epoch.","format":"uuid","type":"string"},"sequence":{"description":"Allocated before synchronous projection. A later snapshot always has a greater sequence.","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["epoch","sequence"],"type":"object"},"storeId":{"minLength":1,"type":"string"},"threadId":{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"},"turns":{"items":{"additionalProperties":false,"description":"Control-plane projection of one thread turn with its embedded run card.","properties":{"answeredByPrompt":{"anyOf":[{"additionalProperties":false,"description":"Control-plane projection of one thread turn with its embedded run card.","properties":{"id":{"description":"Turn id.","minLength":1,"type":"string"},"prompt":{"default":"","description":"The user's message for this turn.","type":"string"},"promptInfo":{"additionalProperties":false,"properties":{"textBytes":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"totalTextBytes":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}],"description":"Complete redacted UTF-8 length, only when known; never an estimated remainder."},"truncated":{"type":"boolean"}},"required":["textBytes","totalTextBytes","truncated"],"type":"object"}},"required":["id","promptInfo"],"type":"object"},{"type":"null"}],"description":"Control-plane projection of one thread turn with its embedded run card."},"answeredByTurnId":{"anyOf":[{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"description":"Thread id."},"answersPlanRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Plan run whose open questions this follow-up turn answers."},"continuity":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"description":"How a turn's lane was continued: native_resume (the lane's own vendor session already held the delta), packet (a continuation packet hydrated a lane switch/gap), or fresh (nothing to carry — the thread's first turn on any lane).","enum":["native_resume","packet","fresh"],"type":"string"},"laneSwitchedFrom":{"anyOf":[{"additionalProperties":false,"properties":{"harness":{"description":"Harness of the lane switched away from.","type":"string"},"profileId":{"default":null,"description":"Profile of the lane switched away from (null = engine default).","type":["string","null"]}},"required":["harness"],"type":"object"},{"type":"null"}],"default":null,"description":"The lane this turn switched away from; null for an in-lane continuation."},"packetTurns":{"default":0,"description":"Delta turns carried in the continuation packet (0 for native_resume/fresh).","minimum":0,"type":"integer"},"summarized":{"default":false,"description":"True when the packet collapsed an older prefix (mechanical fallback).","type":"boolean"}},"required":["kind"],"type":"object"},{"type":"null"}],"default":null,"description":"How this turn's lane was continued (native resume / packet / fresh); null until stamped."},"createdAt":{"description":"When the turn was created.","type":"string"},"enqueueError":{"anyOf":[{"additionalProperties":false,"properties":{"code":{"default":null,"description":"Machine-readable refusal code; remedies key on it, never on the message text.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context for exact retry.","type":"object"},"failedAt":{"description":"When the enqueue failed.","type":"string"},"message":{"description":"Human-readable refusal message.","type":"string"},"requiredActions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"False when no recorded job exists to replay — surfaces offer a new message instead of a doomed retry.","type":"boolean"}},"required":["message","failedAt"],"type":"object"},{"type":"null"}],"default":null,"description":"Why this turn has no run (enqueue/preflight refusal); null once a run binds."},"id":{"description":"Turn id.","minLength":1,"type":"string"},"kind":{"default":"followup","description":"Kind of thread turn: the initial message, a followup, or an operator decision turn.","enum":["initial","followup","decision"],"type":"string"},"ordinal":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"parentRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Run this turn follows up on, when any."},"planAnswerComplete":{"type":"boolean"},"planHash":{"default":null,"description":"SHA-256 of the frozen plan bytes this Implement turn materialized (INV-081); null on non-Implement/legacy turns (QA-046).","type":["string","null"]},"planReadinessOverridden":{"default":false,"description":"True when the operator implemented a not-ready plan over open questions (INV-081); recorded for provenance, rendered on the card (QA-046).","type":"boolean"},"planRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Set when this turn implements an approved plan from an earlier run."},"primaryOutput":{"anyOf":[{"additionalProperties":false,"description":"The run's primary user-facing output artifact.","properties":{"bytes":{"description":"Size of the output in bytes.","minimum":0,"type":"integer"},"kind":{"description":"What kind of output this is: answer, report, plan, summary, patch, diagnostic, or structured_output (schema-conformant final/output.json).","enum":["answer","report","plan","summary","patch","files","diagnostic","structured_output"],"type":"string"},"path":{"description":"Artifact path of the output.","type":"string"},"text":{"default":null,"description":"Inline text content, when loaded.","type":["string","null"]},"textBytes":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"totalTextBytes":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}],"description":"Complete redacted UTF-8 length, only when known; never an estimated remainder."},"truncated":{"type":"boolean"}},"required":["kind","path","truncated","textBytes","totalTextBytes"],"type":"object"},{"type":"null"}],"description":"The run's primary user-facing output artifact."},"primaryOutputStatus":{"enum":["available","none","not_retained"],"type":"string"},"prompt":{"default":"","description":"The user's message for this turn.","type":"string"},"promptInfo":{"additionalProperties":false,"properties":{"textBytes":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"totalTextBytes":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}],"description":"Complete redacted UTF-8 length, only when known; never an estimated remainder."},"truncated":{"type":"boolean"}},"required":["textBytes","totalTextBytes","truncated"],"type":"object"},"revision":{"additionalProperties":false,"properties":{"epoch":{"description":"Read-owner incarnation; compare sequence only within this epoch.","format":"uuid","type":"string"},"sequence":{"description":"Allocated before synchronous projection. A later snapshot always has a greater sequence.","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["epoch","sequence"],"type":"object"},"run":{"anyOf":[{"additionalProperties":false,"description":"Compact run state embedded on a turn so a chat surface renders the whole conversation from one thread fetch.","properties":{"applyEligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived apply-gate verdict (single producer: the delivery gate); null when the run has no patch artifact."},"applyEligibilityCoverage":{"enum":["complete","unavailable"],"type":"string"},"authRoute":{"anyOf":[{"additionalProperties":false,"properties":{"attemptId":{"default":null,"type":["string","null"]},"effective":{"anyOf":[{"description":"Auth mode a route runs under: a native local session, an API key, or unknown.","enum":["local_session","api_key","unknown"],"type":"string"},{"type":"null"}],"default":null,"description":"Auth mode a route runs under: a native local session, an API key, or unknown."},"harnessId":{"default":null,"type":["string","null"]},"modelMismatch":{"anyOf":[{"additionalProperties":false,"properties":{"observed":{"type":"string"},"requested":{"type":"string"}},"required":["requested","observed"],"type":"object"},{"type":"null"}],"default":null,"description":"Requested-vs-observed model mismatch; null when none."},"profileId":{"default":null,"description":"Credential profile the deciding attempt ran under; null = engine-default credentials.","type":["string","null"]},"reason":{"description":"Deterministic reason for the effective auth route: as_requested, native_first (auto, INV-061), no_native_session_fallback (auto downgraded to api_key), requested_route_unavailable (explicit preference contradicted), or undisclosed.","enum":["as_requested","native_first","no_native_session_fallback","requested_route_unavailable","undisclosed"],"type":"string"},"requested":{"default":"auto","description":"Preferred auth route: subscription (native/OAuth session), api_key (a stored API key), or auto (engine picks subscription-first with policy fallback). A preference, not a secret.","enum":["subscription","api_key","auto"],"type":"string"},"source":{"anyOf":[{"description":"Concrete credential source used or probed by a harness.","enum":["native_session","oauth_token_env","api_key_env","api_key_flag","provider_auth_file","none"],"type":"string"},{"type":"null"}],"default":null,"description":"Concrete credential source used or probed by a harness."}},"required":["requested","reason"],"type":"object"},{"type":"null"}],"description":"Auth route receipt (requested/effective/source/reason + disclosing attempt), projected verbatim from telemetry; null when unavailable."},"budget":{"additionalProperties":false,"default":{},"description":"Budget snapshot for a run: cap, spend, and provenance.","properties":{"cashKnowledge":{"description":"Cash certainty from the ledger; explicit unknown keeps spendUsd null independently of valuation.","enum":["exact","estimated","unknown"],"type":"string"},"controllableSpendUsd":{"default":null,"description":"Cash governed by the finite cap: settled amounts on routes Claudexor controls; null when that cash is unknown. spendUsd can still be null when an included subscription reports no actual debit.","type":["number","null"]},"estimated":{"default":false,"description":"True when settled cash is estimated rather than exact; subscription valuation confidence is reported separately.","type":"boolean"},"evidence":{"default":"complete","description":"Integrity of the canonical events this spend fallback read: 'incomplete' when malformed/non-object event lines were skipped, 'unavailable' when the events file was unreadable, else 'complete'. A non-complete value means the projected spend may disagree with disk truth.","enum":["complete","incomplete","unavailable"],"type":"string"},"paidBudget":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"unlimited","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"finite","type":"string"},"maxUsd":{"minimum":0,"type":"number"}},"required":["kind","maxUsd"],"type":"object"}],"default":{"kind":"unlimited"},"description":"Incremental-cash budget: explicitly unlimited or a finite non-negative USD cap."},"remainingUsd":{"default":null,"description":"Remaining finite cap after controllableSpendUsd; null when no cap or unknown.","type":["number","null"]},"source":{"default":"unknown","description":"Where the snapshot came from: the decision record, live events, settings, or unknown.","enum":["decision","events","settings","unknown"],"type":"string"},"spendUsd":{"default":null,"description":"CASH spend so far in USD; null when unknown.","type":["number","null"]},"valuationKnowledge":{"default":"unknown","description":"Confidence of valuationUsd: 'estimated' when token-derived, 'unknown' when no usage was reported (valuationUsd is then null), 'exact' when natively priced.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"default":null,"description":"Subscription valuation in USD (separate from billed cash); null when unknown — never a fabricated $0 (QA-023c).","type":["number","null"]}},"type":"object"},"createdAt":{"description":"When the run was created.","type":"string"},"delegatedChildRunIds":{"default":[],"description":"At most eight server-owned direct Delegate child ids for whole-thread workspace aggregation.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"maxItems":8,"type":"array"},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.","properties":{"effective":{"default":false,"type":"boolean"},"reason":{"default":"not_requested","enum":["pending","not_requested","injected_unused","used","runtime_unavailable","manifest_unsupported","access_profile_incompatible","partially_degraded","startup_failed"],"type":"string"},"remediation":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null},"requested":{"default":false,"type":"boolean"},"used":{"default":false,"type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Durable Delegate outcome receipt; null for ordinary and legacy turns."},"failure":{"anyOf":[{"additionalProperties":false,"description":"Typed failure record for a run: phase, category, evidence references, and suggested next actions.","properties":{"attemptId":{"default":null,"description":"Attempt involved in the failure, when known.","type":["string","null"]},"captureFailure":{"additionalProperties":false,"properties":{"bufferBudgetBytes":{"minimum":0,"type":"integer"},"causeCode":{"type":"string"},"cleanup":{"additionalProperties":false,"properties":{"code":{"type":["string","null"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"code":{"enum":["capture_output_exceeded","capture_output_incomplete","capture_preview_truncated","capture_failed"],"type":"string"},"drain":{"const":"truncated","type":"string"},"message":{"type":"string"},"stream":{"enum":["stdout","stderr"],"type":"string"}},"required":["code","message"],"type":"object"},"category":{"default":"unknown","description":"Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness.","enum":["validation","project","auth","harness_unavailable","harness_error","config_error","budget","policy","cancelled","internal","unknown"],"type":"string"},"code":{"anyOf":[{"description":"Machine-readable failure sub-code within a RunFailure category, including historical delegated-run failures and active access-profile refusals.","enum":["finite_zero","hard_cap","estimate_headroom","unknown_paid_in_flight","budget_overshoot","cost_unverifiable","delegation_child_drain_timeout","subscription_window_exhausted","credential_pool_exhausted","input_too_large","vendor_cli_too_old","credential_source_unconfirmed","delegated_home_unavailable","delegated_confinement_unavailable","delegated_evidence_incomplete","access_profile_incompatible","auxiliary_writable_roots_unsupported","retired_access_profile"],"type":"string"},{"type":"null"}],"default":null,"description":"Machine-readable failure sub-code within the category; null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage."},"eventRefs":{"default":[],"description":"Event references relevant to the failure.","items":{"type":"string"},"type":"array"},"harnessId":{"default":null,"description":"Harness involved in the failure, when known.","type":["string","null"]},"logRefs":{"default":[],"description":"Log artifact paths relevant to the failure.","items":{"type":"string"},"type":"array"},"nextActions":{"default":[],"description":"Suggested operator next actions.","items":{"type":"string"},"type":"array"},"phase":{"default":"unknown","description":"Pipeline phase where the failure happened.","type":"string"},"poolAttempts":{"default":[],"description":"Every failed execution try in order, each with its own account and error text; empty when no try failed (and for records written before this field existed).","items":{"additionalProperties":false,"description":"Per-try account attribution of a failed execution try (diagnostic evidence only).","properties":{"attemptId":{"description":"Attempt the try belongs to.","minLength":1,"type":"string"},"category":{"description":"Typed failure category of the try; untyped errors are unknown_harness_error.","enum":["timeout","rate_limited","auth_failed","capability_refused","process_crash","config_error","unknown_harness_error"],"type":"string"},"error":{"description":"The try's own error text with its original wording and whitespace, redacted.","type":"string"},"harnessId":{"description":"Harness the try ran on.","minLength":1,"type":"string"},"observedAt":{"description":"When the try's first error was observed.","format":"date-time","type":"string"},"phase":{"description":"How far the try got: before a typed session start, after start but before agent progress, or after progress.","enum":["pre_start","pre_progress","after_progress"],"type":"string"},"profileDisplayName":{"description":"The row's display name at try time (redacted); null for the default route.","type":["string","null"]},"profileId":{"description":"Account row the try ran on; null = the harness default route.","type":["string","null"]},"requestedModel":{"description":"Model the try asked for; null = the harness default model.","type":["string","null"]},"tryIndex":{"description":"Zero-based try index within the attempt.","minimum":0,"type":"integer"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"description":"The vendor's own typed failure for this try, when the adapter attached one."}},"required":["harnessId","profileId","profileDisplayName","requestedModel","attemptId","tryIndex","observedAt","phase","category","error","vendorFailure"],"type":"object"},"type":"array"},"rawDetailRef":{"default":null,"description":"Artifact path holding the raw (redacted) failure detail.","type":["string","null"]},"requestRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"actual":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"kind":{"const":"input_too_large","type":"string"},"limit":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"native_code":{"minLength":1,"type":"string"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"}},"required":["scope","unit","limit","source","kind","actual","native_code"],"type":"object"},{"additionalProperties":false,"properties":{"binary_path":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"installed_version":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"kind":{"const":"vendor_cli_too_old","type":"string"},"native_code":{"const":"claude_code_version_too_old","type":"string"},"source":{"const":"claude_stdout","type":"string"}},"required":["kind","native_code","source","binary_path","installed_version"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"credential_source_unconfirmed","type":"string"},"native_code":{"const":"grok_credential_source_unconfirmed","type":"string"},"reported_source":{"description":"Redacted credential source the vendor's startup frame reported.","maxLength":80,"type":"string"},"source":{"const":"grok_init","type":"string"}},"required":["kind","native_code","source","reported_source"],"type":"object"}],"description":"Vendor-attested request refusal that stops retries and account rotation on its harness; input, executable and credential-source causes carry their own evidence."},"resetsAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the refused window reopens (a spent subscription quota window), or null when the failure has no such time. Callers schedule a retry off this field, never off safeMessage."},"runDir":{"default":null,"description":"Run artifact directory.","type":["string","null"]},"safeMessage":{"description":"Redacted human-readable failure message.","type":"string"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"default":null,"description":"The vendor's own typed failure for the attempt this record speaks for, or null when no vendor-typed evidence exists (every harness without such a channel, and any unreadable record). Facts only: carries no remedy."}},"required":["safeMessage"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed failure info; null unless the run failed."},"failureMessageInfo":{"anyOf":[{"additionalProperties":false,"properties":{"textBytes":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"totalTextBytes":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}],"description":"Complete redacted UTF-8 length, only when known; never an estimated remainder."},"truncated":{"type":"boolean"}},"required":["textBytes","totalTextBytes","truncated"],"type":"object"},{"type":"null"}]},"fileCount":{"additionalProperties":false,"description":"File-kind tool calls, not distinct paths or the WorkProduct diffstat.","properties":{"coverage":{"enum":["complete","partial","unavailable"],"type":"string"},"value":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}]}},"required":["value","coverage"],"type":"object"},"finishedAt":{"default":null,"description":"When the run finished; null while live.","type":["string","null"]},"harnesses":{"description":"Harness pool the run used.","items":{"type":"string"},"type":"array"},"mode":{"description":"Default mode for new turns.","enum":["ask","plan","agent"],"type":"string"},"n":{"description":"Race width, when the run was a race.","type":"integer"},"operatorDecision":{"anyOf":[{"additionalProperties":false,"properties":{"action":{"description":"Operator decision action (e.g. accept_risk, override).","type":"string"},"decidedAt":{"default":null,"description":"When the decision was made.","type":["string","null"]}},"required":["action"],"type":"object"},{"type":"null"}],"default":null,"description":"Persisted operator unblock decision (accept_risk/override), hash-bound; null when none was made."},"operatorDecisionCoverage":{"enum":["complete","unavailable"],"type":"string"},"outcomeBanner":{"default":null,"description":"Server-owned outcome headline (status-projection.outcomeBanner); null while the run is not terminal.","type":["string","null"]},"outcomeFacts":{"anyOf":[{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},{"type":"null"}],"default":null,"description":"D8 terminal outcome axes (checks/review/reason/noChanges) for the turn; null while non-terminal."},"outputReadyState":{"default":"pending","description":"Whether a terminal run also has a loaded user-facing output artifact: pending (not yet), finalizing (being produced), ready (loaded), diagnostic (only diagnostic output).","enum":["pending","finalizing","ready","diagnostic"],"type":"string"},"planQuestions":{"default":[],"description":"Open questions of a plan run (projected from final/questions.json); empty otherwise.","items":{"additionalProperties":false,"description":"One open question surfaced by a plan revision.","properties":{"allow_text":{"default":false,"description":"True when free text is accepted as a complete answer, including as an alternative to single/multi options.","type":"boolean"},"id":{"description":"Stable question id within the plan revision.","minLength":1,"type":"string"},"kind":{"description":"Question kind: pick exactly one, pick one or more, or free text.","enum":["single","multi","text"],"type":"string"},"options":{"default":[],"description":"Options for single/multi questions; empty for free text.","items":{"additionalProperties":false,"description":"One selectable option of a plan question.","properties":{"id":{"description":"Stable option id within the question.","minLength":1,"type":"string"},"label":{"description":"Option label shown to the user.","minLength":1,"type":"string"}},"required":["id","label"],"type":"object"},"type":"array"},"prompt":{"description":"The question text.","minLength":1,"type":"string"}},"required":["id","kind","prompt"],"type":"object"},"type":"array"},"planReadiness":{"anyOf":[{"additionalProperties":false,"description":"Server-derived readiness of a plan run (one derivation owner; D17).","properties":{"questionCount":{"default":0,"minimum":0,"type":"integer"},"state":{"description":"Derived plan readiness: ready (block parsed, zero open questions), needs_answers (open questions remain), unverified (no parseable block — the planner ignored the format).","enum":["ready","needs_answers","unverified"],"type":"string"}},"required":["state"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived readiness of a plan run; null for non-plan runs."},"primaryHarness":{"description":"Primary harness the run preferred.","type":"string"},"requiredActions":{"default":[],"description":"Stable-id required operator actions for a succeeded-but-blocked run (GH #29); empty for clean/decided/failed runs.","items":{"additionalProperties":false,"description":"One typed required operator action derived from a run's terminal outcome facts.","properties":{"detail":{"description":"Human-readable guidance for this action (English-only, INV-141).","type":"string"},"id":{"description":"Stable machine id for a required operator action on a blocked terminal run.","enum":["provide_required_input","complete_incomplete_work","resolve_review_block","fix_failed_checks","record_operator_decision"],"type":"string"}},"required":["id","detail"],"type":"object"},"type":"array"},"result":{"additionalProperties":false,"default":{},"description":"Honest terminal outcome of a run (what the turn actually did), projected from the work product and answer artifacts.","properties":{"adopted":{"default":null,"description":"True when the live in-place tree was mutated this turn (regardless of review); null when unknown.","type":["boolean","null"]},"applyState":{"default":"not_applied","description":"Honest application state: not_applied (delivery pending), applied, applied_review_blocked, reverted, or discarded (remaining copied output deliberately not applied).","enum":["not_applied","applied","applied_review_blocked","reverted","discarded"],"type":"string"},"blockers":{"default":0,"description":"Count of accepted blocking review findings.","minimum":0,"type":"integer"},"diffStat":{"anyOf":[{"additionalProperties":false,"properties":{"additions":{"description":"Lines added.","minimum":0,"type":"integer"},"deletions":{"description":"Lines deleted.","minimum":0,"type":"integer"},"files":{"description":"Files changed.","minimum":0,"type":"integer"}},"required":["files","additions","deletions"],"type":"object"},{"type":"null"}],"default":null,"description":"Diff statistics; null unless a patch exists."},"kind":{"default":"none","description":"What the turn actually produced: a Git patch, directory files, an answer, a plan, a report, or nothing.","enum":["patch","files","answer","plan","report","none"],"type":"string"},"postTurnSha":{"default":null,"description":"Tree SHA right after this turn's mutation; revert refuses if the working tree has diverged from this since.","type":["string","null"]},"preTurnSha":{"default":null,"description":"Tree SHA before this turn mutated the in-place tree (revert restore target).","type":["string","null"]},"revertAnchorId":{"default":null,"description":"GC-independent revert anchor.","type":["string","null"]},"revertable":{"default":false,"description":"Revert metadata is available so a Revert affordance may be offered; not a live-safe guarantee — the server re-checks tree divergence at revert time.","type":"boolean"}},"type":"object"},"route":{"anyOf":[{"additionalProperties":false,"description":"Run-level route evidence projected from telemetry (requested vs observed model).","properties":{"harnessId":{"default":null,"description":"Harness that ran the final attempt.","type":["string","null"]},"observedModel":{"default":null,"description":"Model the harness stream actually reported.","type":["string","null"]},"requestedModel":{"default":null,"description":"Model requested for the run.","type":["string","null"]},"verified":{"default":false,"description":"True only when an observed model was actually reported by the harness stream — never inferred from the request.","type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Route evidence from telemetry; null when no telemetry exists (legacy runs)."},"runDir":{"description":"On-disk run artifact directory.","type":"string"},"runFacts":{"anyOf":[{"additionalProperties":false,"description":"Validated immutable terminal facts for one run.","properties":{"apply":{"additionalProperties":false,"description":"Terminal apply eligibility and operator-decision state.","properties":{"eligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Delivery-gate eligibility at terminalization; null when nothing is applyable."},"operator_decision_present":{"default":false,"description":"Whether a valid operator decision was present when the receipt was finalized.","type":"boolean"}},"type":"object"},"deliverable":{"additionalProperties":false,"description":"Canonical primary-output presence and identity for a terminal run.","properties":{"kind":{"anyOf":[{"enum":["answer","report","plan","patch","files","structured_output"],"type":"string"},{"type":"null"}],"description":"Kind of canonical primary deliverable; null when none exists."},"path":{"description":"Run-relative path of the canonical primary deliverable; null when absent.","type":["string","null"]},"present":{"description":"Whether the canonical primary deliverable exists.","type":"boolean"},"producer_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt that produced the deliverable, when known."}},"required":["present","kind","path"],"type":"object"},"gates":{"additionalProperties":false,"description":"Canonical gate configuration and terminal receipt projection.","properties":{"configured":{"description":"Whether the frozen task configured deterministic gates.","type":"boolean"},"executed":{"description":"Whether the terminal attempt executed the gate set.","type":"boolean"},"receipt_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt whose gate receipt decides this projection; null when no gates executed."},"required":{"description":"Number of configured required gates.","minimum":0,"type":"integer"},"state":{"description":"Terminal state of the configured deterministic gate set.","enum":["not_configured","passed","failed","skipped"],"type":"string"},"total":{"description":"Total configured deterministic gates.","minimum":0,"type":"integer"}},"required":["configured","required","total","executed","state"],"type":"object"},"generated_at":{"description":"When this immutable terminal receipt was finalized.","minLength":1,"type":"string"},"mode":{"description":"Default mode for new turns.","enum":["ask","plan","agent"],"type":"string"},"outcome":{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},"participants":{"additionalProperties":false,"description":"Terminal participant graph plus its planner-lane count.","properties":{"attempts":{"default":[],"description":"Role-labelled participant roster.","items":{"additionalProperties":false,"description":"One role-labelled participant in the terminal run graph.","properties":{"attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Attempt id when the participant owns an orchestrator attempt; null for reviewer-panel members."},"deliverable_present":{"default":false,"description":"Whether this participant produced the deliverable its role requested.","type":"boolean"},"harness_id":{"description":"Harness that served this participant role.","minLength":1,"type":"string"},"role":{"description":"Canonical role of one participant in the terminal run graph.","enum":["planner","merge","candidate","scout","reducer","reviewer"],"type":"string"},"status":{"anyOf":[{"description":"Terminal outcome recorded for one run participant.","enum":["success","success_with_warnings","blocked","failed"],"type":"string"},{"type":"null"}],"default":null,"description":"Participant outcome when recorded; null for artifact-only reviewer membership."}},"required":["attempt_id","harness_id","role"],"type":"object"},"type":"array"},"planners":{"description":"Number of participants whose canonical role is planner.","minimum":0,"type":"integer"}},"required":["planners"],"type":"object"},"presentation":{"additionalProperties":false,"description":"Immutable terminal output state and primary artifact. Absent only on legacy RunFacts receipts.","properties":{"primary":{"anyOf":[{"additionalProperties":false,"description":"Primary user-facing artifact selected once during terminal preparation.","properties":{"kind":{"description":"Presentation kind of the terminal primary artifact.","enum":["answer","report","plan","patch","files","structured_output","diagnostic"],"type":"string"},"path":{"description":"Normalized run-relative path of the terminal primary artifact.","minLength":1,"type":"string"}},"required":["kind","path"],"type":"object"},{"type":"null"}],"description":"Selected terminal primary artifact, or null when the receipt announces readiness without a primary deliverable."},"state":{"description":"Terminal output readiness decided by the last valid output.ready receipt.","enum":["ready","diagnostic"],"type":"string"}},"required":["state","primary"],"type":"object"},"required_actions":{"default":[],"description":"Typed actions required to unblock this terminal outcome.","items":{"additionalProperties":false,"description":"One typed required operator action derived from a run's terminal outcome facts.","properties":{"detail":{"description":"Human-readable guidance for this action (English-only, INV-141).","type":"string"},"id":{"description":"Stable machine id for a required operator action on a blocked terminal run.","enum":["provide_required_input","complete_incomplete_work","resolve_review_block","fix_failed_checks","record_operator_decision"],"type":"string"}},"required":["id","detail"],"type":"object"},"type":"array"},"review":{"additionalProperties":false,"description":"Canonical terminal review verdict and blocking-finding identity.","properties":{"blocker_ids":{"default":[],"description":"Stable ids of accepted evidence-backed blocking findings.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"blockers":{"description":"Number of blocking findings.","minimum":0,"type":"integer"},"state":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"}},"required":["state","blockers"],"type":"object"},"run_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"schema_version":{"const":2,"description":"Schema version of the artifact; bumped on breaking ABI changes.","type":"number"},"task_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["schema_version","run_id","task_id","mode","outcome","deliverable","participants","gates","review","apply","generated_at"],"type":"object"},{"type":"null"}],"default":null,"description":"Validated terminal RunFacts receipt; null while active or unavailable."},"spendEstimated":{"description":"True when settled cash is estimated rather than exact.","type":"boolean"},"spendUsd":{"description":"Settled cash in USD; null when unknown.","type":["number","null"]},"startedAt":{"description":"When the run started.","type":"string"},"state":{"description":"Control-plane run state = the run LIFECYCLE (D8): queued/running while live, then exactly one of succeeded / failed / cancelled / interrupted. Outcome quality (checks/review/delivery) is orthogonal — see outcomeFacts.","enum":["queued","running","succeeded","failed","cancelled","interrupted"],"type":"string"},"strategy":{"anyOf":[{"enum":["race","attempts","until_clean","deep_scan","create"],"type":"string"},{"type":"null"}],"description":"Engine strategy flag on the mode, when any."},"toolCount":{"additionalProperties":false,"properties":{"coverage":{"enum":["complete","partial","unavailable"],"type":"string"},"value":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}]}},"required":["value","coverage"],"type":"object"},"unverifiedOperatorDecision":{"anyOf":[{"additionalProperties":false,"properties":{"action":{"description":"Operator decision action (e.g. accept_risk, override).","type":"string"},"decidedAt":{"default":null,"description":"When the decision was made.","type":["string","null"]}},"required":["action"],"type":"object"},{"type":"null"}],"default":null,"description":"Persisted operator unblock decision (accept_risk/override), hash-bound; null when none was made."},"waitingOnUser":{"default":false,"description":"True while an interactive question is awaiting the user's answer.","type":"boolean"}},"required":["state","applyEligibilityCoverage","operatorDecisionCoverage","failureMessageInfo","toolCount","fileCount"],"type":"object"},{"type":"null"}],"description":"Compact run state embedded on a turn so a chat surface renders the whole conversation from one thread fetch."},"runId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Run backing this turn; null while unbound."},"runStatus":{"enum":["available","unbound","not_retained"],"type":"string"},"threadId":{"description":"Thread the turn belongs to.","minLength":1,"type":"string"}},"required":["id","threadId","createdAt","ordinal","revision","promptInfo","run","runStatus","primaryOutput","primaryOutputStatus","answeredByTurnId","answeredByPrompt","planAnswerComplete"],"type":"object"},"maxItems":20,"type":"array"}},"required":["storeId","threadId","epoch","revision","header","turns","hasOlder","hasNewer","olderCursor","newerCursor","replayCursor","replayNextCursor","limitedBy"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"readOnlyHint":true},"description":"Read a bounded UTF-8 part of any turn's complete stored prompt, including refused turns. Continue at nextOffset; totalBytes and sha256 identify the full prompt. Requires an existing daemon.","inputSchema":{"additionalProperties":false,"properties":{"expectedStoreId":{"minLength":1,"type":"string"},"maxBytes":{"default":32768,"maximum":65536,"minimum":4,"type":"integer"},"offset":{"default":0,"maximum":9007199254740991,"minimum":0,"type":"integer"},"threadId":{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"},"turnId":{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"}},"required":["threadId","turnId"],"type":"object"},"name":"claudexor_thread_prompt","outputSchema":{"additionalProperties":false,"description":"One bounded part of a single validated run event, read from the run's own event log by run id and seq. Concatenate parts in offset order until nextOffset equals totalBytes; only then is the event consumed.","properties":{"nextOffset":{"description":"Where the next part starts; equal to totalBytes when this part ends the event.","maximum":9007199254740991,"minimum":0,"type":"integer"},"offset":{"description":"UTF-8 byte offset where this part starts.","maximum":9007199254740991,"minimum":0,"type":"integer"},"sha256":{"description":"SHA-256 of all totalBytes; verify the reassembled text before parsing it.","pattern":"^[0-9a-f]{64}$","type":"string"},"text":{"description":"Bytes [offset, nextOffset) decoded as UTF-8; a boundary never splits a character.","type":"string"},"threadId":{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"},"totalBytes":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"turnId":{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"}},"required":["totalBytes","sha256","offset","nextOffset","text","threadId","turnId"],"type":"object"}},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Create a persistent Claudexor thread bound to a project and optional strict account profile. Creation starts no model. Write turns default to editing the project directory directly (in_place); choose workspace=isolated to use a persistent thread worktree created on the first write turn, then thread Apply to merge changes into the project. workspace=delegated with workspaceRoot binds every turn to that caller-owned directory under delegated authority (persistent, never applied to the project). Use claudexor_thread_turn to start work in it.","inputSchema":{"additionalProperties":false,"properties":{"access":{"enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"credentialProfileId":{"minLength":1,"pattern":"\\S","type":"string"},"defaultMode":{"enum":["ask","plan","agent"],"type":"string"},"eligibleHarnesses":{"items":{"minLength":1,"pattern":"\\S","type":"string"},"minItems":1,"type":"array"},"idempotencyKey":{"description":"Caller-owned key for this exact creation. Reuse after an unknown response; a different request with the same key conflicts.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"primaryHarness":{"minLength":1,"pattern":"\\S","type":"string"},"repoPath":{"description":"Absolute path of the target project.","type":"string"},"title":{"minLength":1,"pattern":"\\S","type":"string"},"workspace":{"description":"Per-thread workspace mode: in_place mutates the live project tree directly (the default); isolated keeps a persistent git worktree per thread that apply merges into the project; delegated runs every turn in one caller-owned workspace bound at creation, which Claudexor never applies to the project or deletes.","enum":["in_place","isolated","delegated"],"type":"string"},"workspaceRoot":{"description":"Required exactly with workspace=delegated: absolute existing caller-owned directory every turn executes in. Every later turn inherits delegated authority (no repository full-access trust record, no outer OS boundary), so choose it only for a workspace you own.","minLength":1,"type":"string"}},"required":["repoPath"],"type":"object"},"name":"claudexor_thread_create"},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Enqueue a turn on a persistent Claudexor thread with optional routing and strict account overrides. Supply idempotencyKey to recover a lost response without creating another paid turn. Returns durable thread and turn handles plus runId or a queued jobId.","inputSchema":{"additionalProperties":false,"properties":{"access":{"enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"attachments":{"description":"Immutable resource references from upload finalize. Paths, base64 and internal resolved attachments are rejected; ordinary lane admission still applies.","items":{"additionalProperties":false,"description":"Reference to an immutable daemon-owned uploaded resource.","properties":{"resourceId":{"description":"Immutable daemon resource id returned by upload finalize.","minLength":1,"type":"string"}},"required":["resourceId"],"type":"object"},"type":"array"},"credentialProfileId":{"minLength":1,"pattern":"\\S","type":"string"},"effort":{"description":"Optional effort override for this turn. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"execution":{"additionalProperties":false,"description":"This turn's own auxiliary writable directories; the thread's project and execution tree stay fixed, and omitting the list grants nothing.","properties":{"auxiliaryWritableRoots":{"description":"Exact existing absolute directories, created by the caller, that an Agent run with effective workspace_write may also write (service caches or scratch outside the execution tree). [] grants nothing extra; so does omission, except that a continueFrom successor omitting execution inherits its predecessor's whole execution group. Requires a lane whose capability_profile.access_control.auxiliary_writable_roots is true; the files are never part of the project result.","items":{"minLength":1,"type":"string"},"type":"array"}},"type":"object"},"harness":{"minLength":1,"pattern":"\\S","type":"string"},"idempotencyKey":{"description":"Caller-owned key for one logical turn. Retry an unknown outcome with the same key and body; use a new key for an intentional next turn.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"maxSeconds":{"maximum":604800,"minimum":1,"type":"integer"},"model":{"minLength":1,"pattern":"\\S","type":"string"},"primaryHarness":{"minLength":1,"pattern":"\\S","type":"string"},"prompt":{"description":"The next user turn for the persistent thread.","minLength":1,"pattern":"\\S","type":"string"},"runMode":{"enum":["ask","plan","agent"],"type":"string"},"threadId":{"minLength":1,"pattern":"\\S","type":"string"},"timeLimitMode":{"enum":["soft","hard"],"type":"string"},"web":{"enum":["off","auto","cached","live"],"type":"string"}},"required":["threadId","prompt"],"type":"object"},"name":"claudexor_thread_turn","outputSchema":{"anyOf":[{"additionalProperties":false,"description":"Response for a successfully enqueued run.","properties":{"jobId":{"description":"Daemon job id backing the run.","type":"string"},"runDir":{"description":"On-disk run artifact directory.","type":"string"},"runId":{"description":"Run id.","type":"string"},"summary":{"description":"Human-readable turn handle summary (same as the tool's text content).","type":"string"},"taskId":{"description":"Task id, when already allocated.","type":"string"},"threadId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"turnId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["runId","runDir","threadId","turnId","summary"],"type":"object"},{"additionalProperties":false,"properties":{"jobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"state":{"minLength":1,"type":"string"},"summary":{"description":"Human-readable turn handle summary (same as the tool's text content).","type":"string"},"threadId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"turnId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["jobId","threadId","turnId","state","summary"],"type":"object"}],"description":"Structured MCP result for claudexor_thread_turn: the durable thread-turn handle.","type":"object"}},{"annotations":{"readOnlyHint":true},"description":"Read a thread's daemon-owned turns and native session handles, including earlier turns after a lost response; use the run status/result tools for terminal output.","inputSchema":{"additionalProperties":false,"properties":{"threadId":{"minLength":1,"pattern":"\\S","type":"string"}},"required":["threadId"],"type":"object"},"name":"claudexor_thread_read"},{"annotations":{"destructiveHint":false,"readOnlyHint":true},"description":"Read the running daemon's durable store identity (storeId) through the opt-in handshake. Save storeId durably with each import key BEFORE claudexor_upload_import, and replay that saved value unchanged; never replace it with a later answer. Resource ids and import keys belong to that store only.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"claudexor_store_identity","outputSchema":{"additionalProperties":false,"description":"Successful control-plane negotiation.","properties":{"compatible":{"const":true,"type":"boolean"},"engine":{"additionalProperties":false,"description":"Build identity of the serving engine.","properties":{"entry":{"description":"Resolved entry path of the serving process.","minLength":1,"type":"string"},"sha":{"description":"Git commit SHA of the build; 'unknown' outside a stamped package or git checkout.","minLength":1,"type":"string"},"version":{"description":"Lockstep workspace version.","minLength":1,"type":"string"}},"required":["version","sha","entry"],"type":"object"},"operationsPath":{"const":"/v2/operations","type":"string"},"protocolMajor":{"const":3,"type":"number"},"servingMode":{"description":"Product admission: 'recovery_only' keeps normal product routes closed while recovery control stays reachable; absent means 'normal'.","enum":["normal","recovery_only"],"type":"string"},"storeId":{"description":"Immutable UUID of the durable engine store, stable across restarts; a run 404 is meaningful only with the same storeId. Returned only to a request sending `X-Claudexor-Store-Identity: 1` (older strict clients keep the legacy shape); absent when the store is unavailable or the daemon predates this field.","minLength":1,"type":"string"}},"required":["protocolMajor","compatible","operationsPath","engine"],"type":"object"}},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Import one explicit absolute regular file ON THE MCP-SERVER HOST as a ready immutable attachment in one call. First save expectedStoreId (from claudexor_store_identity) and idempotencyKey with the exact arguments; another store is refused before the file is touched. After any uncertainty or failure repeat the identical call: a completed import returns its original resource without reading the file again, even if the file has since changed or been deleted. Different arguments under a used key are refused; a new edition of the file needs a new key. Pass resource.resourceId in run/turn attachments. No remote-client path, URL, glob or directory; bytes only, no parsing or OCR.","inputSchema":{"additionalProperties":false,"properties":{"expectedStoreId":{"description":"Store UUID from the opt-in handshake, saved with the key BEFORE the first import and replayed unchanged; never replaced by the current store. A different store is refused before any effect.","minLength":1,"type":"string"},"idempotencyKey":{"description":"Caller-owned key for this one import. Save it with the exact arguments before calling and repeat both after any uncertainty; a completed import returns its original resource without reading the file again. A new edition of the file needs a new key.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"kind":{"description":"Default: image when the effective MIME type starts with image/, otherwise file.","enum":["image","file"],"type":"string"},"mime":{"description":"Default from the file extension (unknown extensions are application/octet-stream).","minLength":1,"type":"string"},"name":{"description":"Display name. Default: the file's base name.","type":"string"},"path":{"description":"Explicit absolute regular file on the MCP-server host, never the remote client's filesystem.","minLength":1,"pattern":"\\S","type":"string"}},"required":["expectedStoreId","path","idempotencyKey"],"type":"object"},"name":"claudexor_upload_import","outputSchema":{"additionalProperties":false,"description":"Current state of one keyed import, identical for its first call and every replay.","properties":{"content":{"additionalProperties":false,"description":"Exact bytes a keyed import owns, bound by its first accepted declaration.","properties":{"sha256":{"description":"Exact digest of the bytes: \"sha256:\" and 64 lowercase hex digits.","pattern":"^sha256:[a-f0-9]{64}$","type":"string"},"sizeBytes":{"description":"Exact byte length.","minimum":0,"type":"integer"}},"required":["sizeBytes","sha256"],"type":"object"},"receivedBytes":{"minimum":0,"type":"integer"},"resource":{"additionalProperties":false,"description":"The immutable resource, present exactly when state is ready.","properties":{"createdAt":{"description":"ISO-8601 timestamp string.","minLength":1,"type":"string"},"deduplicated":{"type":"boolean"},"kind":{"description":"Kind of attached resource: image input or generic file bytes.","enum":["image","file"],"type":"string"},"mime":{"minLength":1,"type":"string"},"name":{"type":"string"},"purpose":{"const":"model","description":"Immutable model-operation purpose; absent means a legacy or ordinary attachment.","type":"string"},"resourceId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"sha256":{"description":"Content hash in algo:hex form, e.g. \"sha256:abcd...\".","minLength":1,"type":"string"},"sizeBytes":{"minimum":0,"type":"integer"}},"required":["resourceId","kind","mime","name","sha256","sizeBytes","createdAt","deduplicated"],"type":"object"},"state":{"description":"open: send the bound bytes; uploading: a transfer is in flight; ready: resource is published; cancelled: finished without a resource, a new attempt needs a new key.","enum":["open","uploading","ready","cancelled"],"type":"string"},"storeId":{"description":"Durable store that owns this import key and its resource.","minLength":1,"type":"string"},"uploadId":{"description":"Upload that receives this import's bytes.","minLength":1,"type":"string"}},"required":["storeId","state","uploadId","content","receivedBytes"],"type":"object"}},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Low-level stage (claudexor_upload_import is the one-call keyed path). Create an ordinary attachment upload. Save the caller-owned idempotencyKey and exact request before calling; replay both after a lost response. Save uploadId before importing bytes.","inputSchema":{"additionalProperties":false,"properties":{"idempotencyKey":{"description":"Caller-owned key for this exact stage. Save key and body before calling; replay both after an unknown response.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"request":{"additionalProperties":false,"properties":{"kind":{"description":"Kind of attached resource: image input or generic file bytes.","enum":["image","file"],"type":"string"},"mime":{"minLength":1,"type":"string"},"name":{"default":"","type":"string"},"sizeBytes":{"minimum":0,"type":"integer"}},"required":["kind","mime","sizeBytes"],"type":"object"}},"required":["request","idempotencyKey"],"type":"object"},"name":"claudexor_upload_create","outputSchema":{"additionalProperties":false,"properties":{"expectedBytes":{"minimum":0,"type":"integer"},"receivedBytes":{"minimum":0,"type":"integer"},"state":{"enum":["open","uploading","uploaded","cancelled"],"type":"string"},"uploadId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["uploadId","state","receivedBytes","expectedBytes"],"type":"object"}},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Stream one explicit absolute regular file ON THE MCP-SERVER HOST into an existing upload using one PUT. No remote-client path, URL, glob or directory. Save uploadId and returned expectedSha256. After an uncertain PUT read status: uploaded -> finalize, uploading -> observe, cancelled -> explicitly create a new upload. Already uploaded bytes are never overwritten; this call can hash the same local file to recover its digest.","inputSchema":{"additionalProperties":false,"properties":{"path":{"description":"Explicit absolute regular file on the MCP-server host, never the remote client's filesystem.","minLength":1,"pattern":"\\S","type":"string"},"uploadId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["uploadId","path"],"type":"object"},"name":"claudexor_upload_import_local","outputSchema":{"additionalProperties":false,"properties":{"expectedBytes":{"minimum":0,"type":"integer"},"expectedSha256":{"description":"Digest of the verified local bytes. Save it for finalize; absent while uploading or cancelled.","minLength":1,"type":"string"},"receivedBytes":{"minimum":0,"type":"integer"},"state":{"enum":["open","uploading","uploaded","cancelled"],"type":"string"},"uploadId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["uploadId","state","receivedBytes","expectedBytes"],"type":"object"}},{"annotations":{"destructiveHint":false,"readOnlyHint":true},"description":"Read existing upload state once. A finalized upload can return 404: replay finalize with the original key/body to recover its resource; absence is not proof of failure.","inputSchema":{"additionalProperties":false,"properties":{"uploadId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["uploadId"],"type":"object"},"name":"claudexor_upload_status","outputSchema":{"additionalProperties":false,"properties":{"expectedBytes":{"minimum":0,"type":"integer"},"receivedBytes":{"minimum":0,"type":"integer"},"state":{"enum":["open","uploading","uploaded","cancelled"],"type":"string"},"uploadId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["uploadId","state","receivedBytes","expectedBytes"],"type":"object"}},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Finalize immutable attachment bytes. Save and replay the original caller-owned key and exact request after an unknown response, even if status returns 404. Never auto-cancel uncertain finalization. Attach the returned resourceId to run/turn attachments.","inputSchema":{"additionalProperties":false,"properties":{"idempotencyKey":{"description":"Caller-owned key for this exact stage. Save key and body before calling; replay both after an unknown response.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"request":{"additionalProperties":false,"properties":{"expectedSha256":{"description":"Content hash in algo:hex form, e.g. \"sha256:abcd...\".","minLength":1,"type":"string"}},"type":"object"},"uploadId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["uploadId","request","idempotencyKey"],"type":"object"},"name":"claudexor_upload_finalize","outputSchema":{"additionalProperties":false,"properties":{"createdAt":{"description":"ISO-8601 timestamp string.","minLength":1,"type":"string"},"deduplicated":{"type":"boolean"},"kind":{"description":"Kind of attached resource: image input or generic file bytes.","enum":["image","file"],"type":"string"},"mime":{"minLength":1,"type":"string"},"name":{"type":"string"},"purpose":{"const":"model","description":"Immutable model-operation purpose; absent means a legacy or ordinary attachment.","type":"string"},"resourceId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"sha256":{"description":"Content hash in algo:hex form, e.g. \"sha256:abcd...\".","minLength":1,"type":"string"},"sizeBytes":{"minimum":0,"type":"integer"}},"required":["resourceId","kind","mime","name","sha256","sizeBytes","createdAt","deduplicated"],"type":"object"}},{"annotations":{"destructiveHint":true,"readOnlyHint":false},"description":"Explicitly cancel an unfinished upload. Do not use cancellation to recover an unknown finalize outcome.","inputSchema":{"additionalProperties":false,"properties":{"uploadId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["uploadId"],"type":"object"},"name":"claudexor_upload_cancel","outputSchema":{"additionalProperties":false,"properties":{"expectedBytes":{"minimum":0,"type":"integer"},"receivedBytes":{"minimum":0,"type":"integer"},"state":{"enum":["open","uploading","uploaded","cancelled"],"type":"string"},"uploadId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["uploadId","state","receivedBytes","expectedBytes"],"type":"object"}},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Read, set, extend, or disable one live run's time limit. Mutations require the current expectedRevision from a read; a conflicting revision must be read again before retrying.","inputSchema":{"additionalProperties":false,"properties":{"action":{"enum":["read","set","extend","disable"],"type":"string"},"expectedRevision":{"minimum":0,"type":"integer"},"mode":{"description":"For set only; omission keeps the timer's current mode.","enum":["soft","hard"],"type":"string"},"runId":{"minLength":1,"type":"string"},"seconds":{"maximum":604800,"minimum":1,"type":"integer"}},"required":["runId","action"],"type":"object"},"name":"claudexor_run_time_limit"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"readOnlyHint":false},"description":"Send a live message to an existing run's active attempt. Requires an explicit stable caller idempotencyKey (the message id); reuse the same key and body to read its recorded receipt. accepted proves native acceptance only (a later live_input_delivered harness event with the same message_id, seen through claudexor_run_wait, reports consumption), delivered proves observed consumption, neither proves obedience. delivery_unknown may have landed: never resend it under a new key. Refusals remain typed outcomes: a pending question answers not_active/interaction_pending (the message does not answer it; use claudexor_answer_interaction), a still-queued job not_active/no_live_session. not_active sent nothing, so a later attempt needs a new key. No automatic retry, queue, or relaunch; host cancellation stops only this request.","inputSchema":{"additionalProperties":false,"description":"Live message into a running run. Send with an Idempotency-Key (the message id): a replay under the same key returns the recorded receipt without a second delivery.","properties":{"expectedAttemptId":{"description":"Target attempt id. Required when the run has several live attempts (race n>1): without it the daemon answers rejected/multi_attempt. A mismatch with the live attempt answers not_active/attempt_mismatch.","minLength":1,"type":"string"},"idempotencyKey":{"description":"The submission's identity: the Idempotency-Key verbatim. Replaying it returns this receipt again; a new message needs a new key.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"runId":{"description":"Run the message was addressed to.","minLength":1,"type":"string"},"text":{"description":"The message to place into the run's active attempt. 1..65536 UTF-16 code units (the JS string length, not bytes or visible characters); an over-long body is a 400, never truncated. Secret-like values are refused (inline_secret_rejected) like every prompt ingress.","maxLength":65536,"minLength":1,"type":"string"}},"required":["runId","text","idempotencyKey"],"type":"object"},"name":"claudexor_run_message","outputSchema":{"additionalProperties":false,"description":"Receipt of a live message into a running run; every typed outcome answers HTTP 200 (unlike the answer/control routes), so read `outcome`, not the status code.","properties":{"accepted":{"description":"True only for outcome delivered or accepted; false for every other outcome.","type":"boolean"},"attemptId":{"description":"Live attempt the message targeted, when one was selected.","type":"string"},"harnessId":{"description":"Harness of the targeted attempt.","type":"string"},"liveInput":{"description":"The targeted harness's declared live-input channel (its capability profile), when an attempt was selected.","enum":["mid_turn","next_tool_boundary","none"],"type":"string"},"message":{"description":"Human-readable detail.","type":"string"},"messageId":{"description":"The submission's identity: the Idempotency-Key verbatim. Replaying it returns this receipt again; a new message needs a new key.","maxLength":256,"minLength":1,"type":"string"},"nativeTurnId":{"description":"Native turn id the harness reported on acceptance (Codex turn/steer result).","type":"string"},"outcome":{"description":"delivered = native consumption observed; accepted = native acceptance boundary observed (consumption unproved); rejected = explicit refusal of this submission; not_active = no eligible target before dispatch; unsupported = no live-input channel for this harness/transport/run scope; delivery_unknown = the message may have landed (never a safe-to-resend signal).","enum":["delivered","accepted","rejected","not_active","unsupported","delivery_unknown"],"type":"string"},"reason":{"description":"Why the outcome is not delivered: no_active_turn (the harness has no active native turn), run_terminal, attempt_mismatch (expectedAttemptId is not the live attempt), no_live_session (no registered live attempt, no adapter channel, or no native session yet), multi_attempt (several live attempts and no expectedAttemptId), thread_bound (thread turns are not steerable in v1), interaction_pending (a question is open; the message was not sent), rpc_refused (the vendor refused the steer on a still-active turn), admission_persist_failed (the daemon could not journal admission; nothing was sent), transport_lost, response_timeout.","enum":["no_active_turn","run_terminal","attempt_mismatch","no_live_session","multi_attempt","thread_bound","interaction_pending","rpc_refused","admission_persist_failed","transport_lost","response_timeout"],"type":"string"},"runId":{"description":"Run the message was addressed to.","minLength":1,"type":"string"}},"required":["accepted","outcome","runId","messageId"],"type":"object"}},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Start one successor of a terminal single-candidate Agent or Ask run on the existing daemon. The daemon inherits only mode, scope, execution, harness, model and the prompt-cache lifetime, which this tool cannot change (another lifetime, Default included, needs a new run); every other omitted control takes its ordinary new-run default, not the predecessor's value, so restate access, web, account, budget, time limit and review when the successor must keep them. Budget and time limits apply to this successor alone, never as a remainder of the chain. prompt is optional and may be empty. Supply idempotencyKey to replay an unknown response. Returns the same durable handle as the launch tools (jobId, runId once bound); pass either as runId to claudexor_run_wait/status/result.","inputSchema":{"additionalProperties":false,"properties":{"access":{"description":"Optional access profile for this run.","enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"attachments":{"description":"Immutable resource references from upload finalize. Paths, base64 and internal resolved attachments are rejected; ordinary lane admission still applies.","items":{"additionalProperties":false,"description":"Reference to an immutable daemon-owned uploaded resource.","properties":{"resourceId":{"description":"Immutable daemon resource id returned by upload finalize.","minLength":1,"type":"string"}},"required":["resourceId"],"type":"object"},"type":"array"},"continueCarrier":{"description":"auto: the best carrier the engine can prove (native session, moved session, then the evidence index); packet: a fresh session re-briefed by the evidence index (the caller's choice for a derailed session).","enum":["auto","packet"],"type":"string"},"credentialProfileId":{"description":"Strict credential profile for this run; never falls back to another account.","minLength":1,"pattern":"\\S","type":"string"},"externalContextPolicy":{"description":"Alias of web for control-api parity.","enum":["off","auto","cached","live"],"type":"string"},"idempotencyKey":{"description":"Reuse the same key and arguments after an unknown response.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"maxSeconds":{"description":"Initial run time limit in seconds. Explicit limits default to hard unless timeLimitMode is soft.","maximum":604800,"minimum":1,"type":"integer"},"paidBudget":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"unlimited","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"finite","type":"string"},"maxUsd":{"minimum":0,"type":"number"}},"required":["kind","maxUsd"],"type":"object"}],"description":"Incremental-cash budget: explicitly unlimited or a finite non-negative USD cap."},"prompt":{"description":"Optional continuation text; empty is valid.","type":"string"},"review":{"description":"Enable internal model review. Ordinary Agent defaults to false; true selects reviewers automatically. An explicit reviewer panel or reviewer overrides also enable review. Best-of and until-clean retain review.","type":"boolean"},"reviewerEfforts":{"additionalProperties":false,"description":"Enable review with per-provider reviewer effort overrides.","properties":{"anthropic":{"description":"Reviewer effort for the anthropic family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"cursor":{"description":"Reviewer effort for the cursor family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"google":{"description":"Reviewer effort for the google family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"local":{"description":"Reviewer effort for the local family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"openai":{"description":"Reviewer effort for the openai family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"opencode":{"description":"Reviewer effort for the opencode family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"unknown":{"description":"Reviewer effort for the unknown family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"xai":{"description":"Reviewer effort for the xai family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"}},"type":"object"},"reviewerModels":{"additionalProperties":false,"description":"Enable review with per-provider reviewer model overrides.","properties":{"anthropic":{"minLength":1,"type":"string"},"cursor":{"minLength":1,"type":"string"},"google":{"minLength":1,"type":"string"},"local":{"minLength":1,"type":"string"},"openai":{"minLength":1,"type":"string"},"opencode":{"minLength":1,"type":"string"},"unknown":{"minLength":1,"type":"string"},"xai":{"minLength":1,"type":"string"}},"type":"object"},"reviewerPanel":{"description":"Enable review with explicit panel entries, preserving order and duplicates; no additional review flag is needed.","items":{"additionalProperties":false,"properties":{"credentialProfileId":{"description":"Optional strict credential profile id; absent uses the canonical account pool.","minLength":1,"type":"string"},"effort":{"description":"Effort for this reviewer entry. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"harness":{"minLength":1,"type":"string"},"model":{"minLength":1,"type":"string"},"processingPreference":{"description":"Advisory service preference; omission inherits captured settings and explicit Standard requests ordinary service.","enum":["standard","fast","economy"],"type":"string"}},"required":["harness"],"type":"object"},"minItems":1,"type":"array"},"runId":{"minLength":1,"pattern":"\\S","type":"string"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"},"timeLimitMode":{"description":"With maxSeconds: soft warns and continues; hard cancels on expiry.","enum":["soft","hard"],"type":"string"},"web":{"description":"External context policy for this run.","enum":["off","auto","cached","live"],"type":"string"}},"required":["runId"],"type":"object"},"name":"claudexor_run_continue","outputSchema":{"additionalProperties":false,"description":"Structured MCP tool result for Claudexor run tools.","properties":{"applyEligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"description":"Apply-gate verdict for mutating runs; null for read-only routes or when no patch exists."},"attemptExecution":{"items":{"additionalProperties":false,"description":"Compact projection of existing attempt execution and amount evidence.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"harnessId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"processing":{"additionalProperties":false,"description":"Requested intent, submitted native control, and observed execution are independent facts. A submitted flag never proves observed service; mixed or missing session observations remain explicit.","properties":{"observed":{"enum":["standard","fast","economy","mixed","unknown"],"type":"string"},"observedNative":{"items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"reason":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"requested":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"submitted":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"submittedNative":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."}},"required":["requested","submitted","submittedNative","observed","observedNative","reason","source"],"type":"object"},"processingCostBasis":{"additionalProperties":false,"description":"Mode-qualified billing evidence for an existing cost record. Authentication alone does not establish included premium service; credits, cash, and token valuation stay distinct.","properties":{"debit":{"const":"unobserved","description":"The route reports no actual cash or purchased-credit debit. Included service still admits the work, but its cash stays unknown instead of zero and is outside the finite cap; absence keeps proven ordinary inclusion as zero cash.","type":"string"},"kind":{"enum":["included","paid_credits","cash","valuation","unknown"],"type":"string"},"nativeMode":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"}},"required":["nativeMode","kind","source"],"type":"object"},"usageCost":{"additionalProperties":false,"description":"Observed usage components. An amount of unknown meaning is not charged cash; separately proven included service can still establish exact zero incremental cash unless its route reports no actual debit.","properties":{"cashKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"cashUsd":{"minimum":0,"type":"number"},"unknownUsd":{"minimum":0,"type":"number"},"valuationKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"minimum":0,"type":"number"}},"required":["cashUsd","valuationUsd","unknownUsd","cashKnowledge","valuationKnowledge"],"type":"object"}},"required":["attemptId","harnessId"],"type":"object"},"type":"array"},"council":{"anyOf":[{"additionalProperties":false,"description":"Council membership + merge disclosure for a --council plan run.","properties":{"degraded":{"default":false,"description":"True when fewer contract-accepted drafts than requested, including any retained unverified contribution; failures remain disclosed per member.","type":"boolean"},"drafted":{"description":"Members with contract-accepted drafts; excludes retained unverified inputs and is not a work-completion or verification count.","minimum":0,"type":"integer"},"members":{"default":[],"description":"Per-member role and outcome.","items":{"additionalProperties":false,"description":"One council member's role and draft/merge outcome.","properties":{"error":{"default":null,"description":"First redacted draft error; null unless the member failed.","type":["string","null"]},"harnessId":{"description":"Harness that drafted (or merged) this member's plan.","minLength":1,"type":"string"},"role":{"description":"primary = the merger that synthesizes the unified plan; member = draft only.","enum":["primary","member"],"type":"string"},"status":{"description":"Draft outcome: drafted = contract-accepted input; merged = accepted draft and successful merge; failed stays failed even when its unverified text helped the merger.","enum":["drafted","failed","merged"],"type":"string"}},"required":["harnessId","role","status"],"type":"object"},"type":"array"},"mergedBy":{"default":null,"description":"Harness that produced the unified plan (the primary); null if the merge failed.","type":["string","null"]},"requested":{"description":"Requested member count (n; at least 2, up to the configured Council cap).","exclusiveMinimum":0,"type":"integer"}},"required":["requested","drafted"],"type":"object"},{"type":"null"}],"default":null,"description":"Council membership + merge disclosure (QA-023b); null for solo/non-plan tools or deferred handles."},"deferredMessage":{"anyOf":[{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"},{"type":"null"}],"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved."},"delegatedFromRunId":{"default":null,"type":["string","null"]},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.","properties":{"effective":{"default":false,"type":"boolean"},"reason":{"default":"not_requested","enum":["pending","not_requested","injected_unused","used","runtime_unavailable","manifest_unsupported","access_profile_incompatible","partially_degraded","startup_failed"],"type":"string"},"remediation":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null},"requested":{"default":false,"type":"boolean"},"used":{"default":false,"type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output."},"detailProblem":{"anyOf":[{"additionalProperties":false,"description":"Typed failure of a post-run detail read whose durable run result still survives.","properties":{"code":{"description":"Stable machine code of the detail problem, if any.","type":["string","null"]},"message":{"description":"Human-readable description of the detail problem.","type":"string"},"retryable":{"description":"Whether retrying the detail read may help.","type":["boolean","null"]}},"required":["code","message","retryable"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed post-terminal detail-read problem (the run result survives; its detail projections are absent for this reason); null when the detail read succeeded."},"failure":{"anyOf":[{"additionalProperties":false,"description":"Typed failure record for a run: phase, category, evidence references, and suggested next actions.","properties":{"attemptId":{"default":null,"description":"Attempt involved in the failure, when known.","type":["string","null"]},"captureFailure":{"additionalProperties":false,"properties":{"bufferBudgetBytes":{"minimum":0,"type":"integer"},"causeCode":{"type":"string"},"cleanup":{"additionalProperties":false,"properties":{"code":{"type":["string","null"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"code":{"enum":["capture_output_exceeded","capture_output_incomplete","capture_preview_truncated","capture_failed"],"type":"string"},"drain":{"const":"truncated","type":"string"},"message":{"type":"string"},"stream":{"enum":["stdout","stderr"],"type":"string"}},"required":["code","message"],"type":"object"},"category":{"default":"unknown","description":"Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness.","enum":["validation","project","auth","harness_unavailable","harness_error","config_error","budget","policy","cancelled","internal","unknown"],"type":"string"},"code":{"anyOf":[{"description":"Machine-readable failure sub-code within a RunFailure category, including historical delegated-run failures and active access-profile refusals.","enum":["finite_zero","hard_cap","estimate_headroom","unknown_paid_in_flight","budget_overshoot","cost_unverifiable","delegation_child_drain_timeout","subscription_window_exhausted","credential_pool_exhausted","input_too_large","vendor_cli_too_old","credential_source_unconfirmed","delegated_home_unavailable","delegated_confinement_unavailable","delegated_evidence_incomplete","access_profile_incompatible","auxiliary_writable_roots_unsupported","retired_access_profile"],"type":"string"},{"type":"null"}],"default":null,"description":"Machine-readable failure sub-code within the category; null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage."},"eventRefs":{"default":[],"description":"Event references relevant to the failure.","items":{"type":"string"},"type":"array"},"harnessId":{"default":null,"description":"Harness involved in the failure, when known.","type":["string","null"]},"logRefs":{"default":[],"description":"Log artifact paths relevant to the failure.","items":{"type":"string"},"type":"array"},"nextActions":{"default":[],"description":"Suggested operator next actions.","items":{"type":"string"},"type":"array"},"phase":{"default":"unknown","description":"Pipeline phase where the failure happened.","type":"string"},"poolAttempts":{"default":[],"description":"Every failed execution try in order, each with its own account and error text; empty when no try failed (and for records written before this field existed).","items":{"additionalProperties":false,"description":"Per-try account attribution of a failed execution try (diagnostic evidence only).","properties":{"attemptId":{"description":"Attempt the try belongs to.","minLength":1,"type":"string"},"category":{"description":"Typed failure category of the try; untyped errors are unknown_harness_error.","enum":["timeout","rate_limited","auth_failed","capability_refused","process_crash","config_error","unknown_harness_error"],"type":"string"},"error":{"description":"The try's own error text with its original wording and whitespace, redacted.","type":"string"},"harnessId":{"description":"Harness the try ran on.","minLength":1,"type":"string"},"observedAt":{"description":"When the try's first error was observed.","format":"date-time","type":"string"},"phase":{"description":"How far the try got: before a typed session start, after start but before agent progress, or after progress.","enum":["pre_start","pre_progress","after_progress"],"type":"string"},"profileDisplayName":{"description":"The row's display name at try time (redacted); null for the default route.","type":["string","null"]},"profileId":{"description":"Account row the try ran on; null = the harness default route.","type":["string","null"]},"requestedModel":{"description":"Model the try asked for; null = the harness default model.","type":["string","null"]},"tryIndex":{"description":"Zero-based try index within the attempt.","minimum":0,"type":"integer"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"description":"The vendor's own typed failure for this try, when the adapter attached one."}},"required":["harnessId","profileId","profileDisplayName","requestedModel","attemptId","tryIndex","observedAt","phase","category","error","vendorFailure"],"type":"object"},"type":"array"},"rawDetailRef":{"default":null,"description":"Artifact path holding the raw (redacted) failure detail.","type":["string","null"]},"requestRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"actual":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"kind":{"const":"input_too_large","type":"string"},"limit":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"native_code":{"minLength":1,"type":"string"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"}},"required":["scope","unit","limit","source","kind","actual","native_code"],"type":"object"},{"additionalProperties":false,"properties":{"binary_path":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"installed_version":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"kind":{"const":"vendor_cli_too_old","type":"string"},"native_code":{"const":"claude_code_version_too_old","type":"string"},"source":{"const":"claude_stdout","type":"string"}},"required":["kind","native_code","source","binary_path","installed_version"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"credential_source_unconfirmed","type":"string"},"native_code":{"const":"grok_credential_source_unconfirmed","type":"string"},"reported_source":{"description":"Redacted credential source the vendor's startup frame reported.","maxLength":80,"type":"string"},"source":{"const":"grok_init","type":"string"}},"required":["kind","native_code","source","reported_source"],"type":"object"}],"description":"Vendor-attested request refusal that stops retries and account rotation on its harness; input, executable and credential-source causes carry their own evidence."},"resetsAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the refused window reopens (a spent subscription quota window), or null when the failure has no such time. Callers schedule a retry off this field, never off safeMessage."},"runDir":{"default":null,"description":"Run artifact directory.","type":["string","null"]},"safeMessage":{"description":"Redacted human-readable failure message.","type":"string"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"default":null,"description":"The vendor's own typed failure for the attempt this record speaks for, or null when no vendor-typed evidence exists (every harness without such a channel, and any unreadable record). Facts only: carries no remedy."}},"required":["safeMessage"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed terminal failure detail and recovery actions; null for non-failed runs."},"jobId":{"default":null,"description":"Daemon job id of the accepted launch. While runId is null, pass it as runId to the status, wait and result tools; they report the canonical runId once the run binds.","type":["string","null"]},"outcomeBanner":{"default":null,"description":"Server-owned outcome headline (D18); the single honest one-line verdict, null while non-terminal or unavailable.","type":["string","null"]},"outcomeFacts":{"anyOf":[{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},{"type":"null"}],"default":null,"description":"The D8 terminal outcome axes (checks/review/reason/noChanges); null for non-terminal or read-only routes."},"parentRunId":{"default":null,"type":["string","null"]},"planReadiness":{"anyOf":[{"additionalProperties":false,"description":"Server-derived readiness of a plan run (one derivation owner; D17).","properties":{"questionCount":{"default":0,"minimum":0,"type":"integer"},"state":{"description":"Derived plan readiness: ready (block parsed, zero open questions), needs_answers (open questions remain), unverified (no parseable block — the planner ignored the format).","enum":["ready","needs_answers","unverified"],"type":"string"}},"required":["state"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived plan readiness for plan tools (D17); null for non-plan tools."},"runDir":{"description":"Artifact directory of the run; null when not persisted.","type":["string","null"]},"runFacts":{"anyOf":[{"additionalProperties":false,"description":"Validated immutable terminal facts for one run.","properties":{"apply":{"additionalProperties":false,"description":"Terminal apply eligibility and operator-decision state.","properties":{"eligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Delivery-gate eligibility at terminalization; null when nothing is applyable."},"operator_decision_present":{"default":false,"description":"Whether a valid operator decision was present when the receipt was finalized.","type":"boolean"}},"type":"object"},"deliverable":{"additionalProperties":false,"description":"Canonical primary-output presence and identity for a terminal run.","properties":{"kind":{"anyOf":[{"enum":["answer","report","plan","patch","files","structured_output"],"type":"string"},{"type":"null"}],"description":"Kind of canonical primary deliverable; null when none exists."},"path":{"description":"Run-relative path of the canonical primary deliverable; null when absent.","type":["string","null"]},"present":{"description":"Whether the canonical primary deliverable exists.","type":"boolean"},"producer_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt that produced the deliverable, when known."}},"required":["present","kind","path"],"type":"object"},"gates":{"additionalProperties":false,"description":"Canonical gate configuration and terminal receipt projection.","properties":{"configured":{"description":"Whether the frozen task configured deterministic gates.","type":"boolean"},"executed":{"description":"Whether the terminal attempt executed the gate set.","type":"boolean"},"receipt_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt whose gate receipt decides this projection; null when no gates executed."},"required":{"description":"Number of configured required gates.","minimum":0,"type":"integer"},"state":{"description":"Terminal state of the configured deterministic gate set.","enum":["not_configured","passed","failed","skipped"],"type":"string"},"total":{"description":"Total configured deterministic gates.","minimum":0,"type":"integer"}},"required":["configured","required","total","executed","state"],"type":"object"},"generated_at":{"description":"When this immutable terminal receipt was finalized.","minLength":1,"type":"string"},"mode":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"outcome":{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},"participants":{"additionalProperties":false,"description":"Terminal participant graph plus its planner-lane count.","properties":{"attempts":{"default":[],"description":"Role-labelled participant roster.","items":{"additionalProperties":false,"description":"One role-labelled participant in the terminal run graph.","properties":{"attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Attempt id when the participant owns an orchestrator attempt; null for reviewer-panel members."},"deliverable_present":{"default":false,"description":"Whether this participant produced the deliverable its role requested.","type":"boolean"},"harness_id":{"description":"Harness that served this participant role.","minLength":1,"type":"string"},"role":{"description":"Canonical role of one participant in the terminal run graph.","enum":["planner","merge","candidate","scout","reducer","reviewer"],"type":"string"},"status":{"anyOf":[{"description":"Terminal outcome recorded for one run participant.","enum":["success","success_with_warnings","blocked","failed"],"type":"string"},{"type":"null"}],"default":null,"description":"Participant outcome when recorded; null for artifact-only reviewer membership."}},"required":["attempt_id","harness_id","role"],"type":"object"},"type":"array"},"planners":{"description":"Number of participants whose canonical role is planner.","minimum":0,"type":"integer"}},"required":["planners"],"type":"object"},"presentation":{"additionalProperties":false,"description":"Immutable terminal output state and primary artifact. Absent only on legacy RunFacts receipts.","properties":{"primary":{"anyOf":[{"additionalProperties":false,"description":"Primary user-facing artifact selected once during terminal preparation.","properties":{"kind":{"description":"Presentation kind of the terminal primary artifact.","enum":["answer","report","plan","patch","files","structured_output","diagnostic"],"type":"string"},"path":{"description":"Normalized run-relative path of the terminal primary artifact.","minLength":1,"type":"string"}},"required":["kind","path"],"type":"object"},{"type":"null"}],"description":"Selected terminal primary artifact, or null when the receipt announces readiness without a primary deliverable."},"state":{"description":"Terminal output readiness decided by the last valid output.ready receipt.","enum":["ready","diagnostic"],"type":"string"}},"required":["state","primary"],"type":"object"},"required_actions":{"default":[],"description":"Typed actions required to unblock this terminal outcome.","items":{"additionalProperties":false,"description":"One typed required operator action derived from a run's terminal outcome facts.","properties":{"detail":{"description":"Human-readable guidance for this action (English-only, INV-141).","type":"string"},"id":{"description":"Stable machine id for a required operator action on a blocked terminal run.","enum":["provide_required_input","complete_incomplete_work","resolve_review_block","fix_failed_checks","record_operator_decision"],"type":"string"}},"required":["id","detail"],"type":"object"},"type":"array"},"review":{"additionalProperties":false,"description":"Canonical terminal review verdict and blocking-finding identity.","properties":{"blocker_ids":{"default":[],"description":"Stable ids of accepted evidence-backed blocking findings.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"blockers":{"description":"Number of blocking findings.","minimum":0,"type":"integer"},"state":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"}},"required":["state","blockers"],"type":"object"},"run_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"schema_version":{"const":2,"description":"Schema version of the artifact; bumped on breaking ABI changes.","type":"number"},"task_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["schema_version","run_id","task_id","mode","outcome","deliverable","participants","gates","review","apply","generated_at"],"type":"object"},{"type":"null"}],"default":null,"description":"Validated canonical terminal RunFacts receipt; null while active, unavailable, or for legacy runs."},"runId":{"description":"Daemon run id once the accepted job started a run (recovery handle for inspect/follow/apply/decision); null while the job is still queued or after it failed before a run started.","type":["string","null"]},"status":{"description":"Run lifecycle state (queued | running | succeeded | failed | cancelled | interrupted); null when an accepted job's state could not be read.","type":["string","null"]},"storeId":{"description":"Identity of the durable engine store that accepted this group member, stable across restarts.","minLength":1,"type":"string"},"summary":{"description":"Human-readable outcome summary (same text as the tool's text content).","type":"string"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"}},"required":["summary","runId","runDir","status","applyEligibility"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"readOnlyHint":false},"description":"Operator-only editable next message for one daemon-owned single-candidate Agent/Ask predecessor. request.action create captures controls once and reserves its one successor; replace changes only the full prompt/ref list at expectedRevision; clear releases only the draft. Every mutation requires a stable idempotencyKey. Eligible settled success dispatches one ordinary continuation; failures, Stop, restart or admission refusal hold without retry. Held edits never rearm. The successor keeps the predecessor's execution: after a successful isolated (envelope) Agent it starts from the project base and receives only the path of the unapplied saved patch; nothing is applied automatically. No thread or engine Delegate child targets. Ordinary controller-owned one-shot workers are supported.","inputSchema":{"additionalProperties":false,"properties":{"idempotencyKey":{"maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"request":{"anyOf":[{"additionalProperties":false,"properties":{"action":{"const":"create","type":"string"},"attachments":{"items":{"additionalProperties":false,"description":"Reference to an immutable daemon-owned uploaded resource.","properties":{"resourceId":{"description":"Immutable daemon resource id returned by upload finalize.","minLength":1,"type":"string"}},"required":["resourceId"],"type":"object"},"type":"array"},"controls":{"additionalProperties":false,"description":"Request body for POST /runs: prompt, mode, scope, routing, strategy flags, budget, policies, and thread linkage.","properties":{"access":{"description":"Requested access profile; effective access is derived by the engine and never client-supplied.","enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"continueCarrier":{"description":"Carrier preference for continueFrom; omitted = auto.","enum":["auto","packet"],"type":"string"},"credentialProfileId":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"description":"Explicit per-run credential profile id; null FORCES the engine-default ladder past a thread-sticky profile; unknown/disabled ids refuse, never default."},"effort":{"description":"Per-reviewer effort hint, passed to that harness only.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"efforts":{"additionalProperties":{"description":"Per-reviewer effort hint, passed to that harness only.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"description":"Harness-scoped effort map (harness id to effort); an entry here wins over the scalar effort and the per-harness settings default.","propertyNames":{"minLength":1,"pattern":"\\S"},"type":"object"},"externalContextPolicy":{"description":"Web policy for the run (alias of externalContextPolicy; must match when both set).","enum":["off","auto","cached","live"],"type":"string"},"maxSeconds":{"description":"Wall-clock limit for the whole run (seconds, max seven days). Omission disables the clock. Explicit limits cancel by default; soft mode warns and continues.","exclusiveMinimum":0,"maximum":604800,"type":"integer"},"paidBudget":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"unlimited","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"finite","type":"string"},"maxUsd":{"minimum":0,"type":"number"}},"required":["kind","maxUsd"],"type":"object"}],"description":"Explicit incremental-cash budget for the run."},"review":{"description":"Agent model review: ordinary runs default off; true selects an automatic panel. Explicit reviewer controls, best-of and untilClean request review. Capped attempts default to review unless explicitly false.","type":"boolean"},"reviewerEfforts":{"additionalProperties":{"description":"Per-reviewer effort hint, passed to that harness only.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"description":"Per-provider-family reviewer effort overrides (legacy; reviewerPanel wins when present).","propertyNames":{"enum":["openai","anthropic","google","cursor","opencode","xai","local","unknown"]},"type":"object"},"reviewerModels":{"additionalProperties":{"description":"Per-reviewer model hint, passed to that harness only.","minLength":1,"pattern":"\\S","type":"string"},"description":"Per-provider-family reviewer model overrides (legacy; reviewerPanel wins when present).","propertyNames":{"enum":["openai","anthropic","google","cursor","opencode","xai","local","unknown"]},"type":"object"},"reviewerPanel":{"description":"Explicit Agent reviewer panel — who reviews the change, one entry per reviewer as `harness=model:effort` (CLI `--reviewer-panel`, unpinned) or structured `--reviewer-panel-json` with optional strict credentialProfileId. Duplicate harness entries are kept so one provider can review through several models; overrides the legacy reviewerModels/reviewerEfforts maps.","items":{"additionalProperties":false,"description":"One reviewer of an explicit reviewer panel — a harness plus optional model, effort, and strict credentialProfileId. Compact entries are unpinned; structured JSON carries pins.","properties":{"credentialProfileId":{"description":"Per-reviewer model hint, passed to that harness only.","minLength":1,"pattern":"\\S","type":"string"},"effort":{"description":"Per-reviewer effort hint, passed to that harness only.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"harness":{"description":"Explicit reviewer harness id; repeated harness ids are allowed so one provider can review through multiple requested models.","minLength":1,"pattern":"\\S","type":"string"},"model":{"description":"Per-reviewer model hint, passed to that harness only.","minLength":1,"pattern":"\\S","type":"string"},"processingPreference":{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"}},"required":["harness"],"type":"object"},"minItems":1,"type":"array"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"},"timeLimitMode":{"description":"Initial timer mode: soft warns and continues; hard cancels. Omission is hard with maxSeconds and soft without it.","enum":["soft","hard"],"type":"string"},"web":{"description":"Web policy for the run (alias of externalContextPolicy; must match when both set).","enum":["off","auto","cached","live"],"type":"string"}},"type":"object"},"predecessorId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"prompt":{"type":"string"}},"required":["action","predecessorId","prompt","attachments"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"const":"replace","type":"string"},"attachments":{"items":{"additionalProperties":false,"description":"Reference to an immutable daemon-owned uploaded resource.","properties":{"resourceId":{"description":"Immutable daemon resource id returned by upload finalize.","minLength":1,"type":"string"}},"required":["resourceId"],"type":"object"},"type":"array"},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"expectedRevision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"prompt":{"type":"string"}},"required":["action","draftId","expectedRevision","prompt","attachments"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"const":"clear","type":"string"},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"expectedRevision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["action","draftId","expectedRevision"],"type":"object"}],"description":"One editable reserved next message of a daemon-owned one-shot Agent/Ask. Every mutation requires Idempotency-Key; replace/clear require the exact revision."}},"required":["request","idempotencyKey"],"type":"object"},"name":"claudexor_next_message","outputSchema":{"additionalProperties":false,"properties":{"appliedRevision":{"description":"The exact revision originally applied by this idempotency key.","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"draft":{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"}},"required":["appliedRevision","draft"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"readOnlyHint":true},"description":"Read one exact deferred draft: bounded prompt/ref preview with explicit omissions, predecessor result path, successor handles and `controls`, the values frozen at creation by origin (inherited from the predecessor, resolved at creation, captured Settings preferences) with their capture time. Permissions, trust, accounts and quota are not frozen. This read never dispatches. A terminal predecessor may still have a waiting or held draft; inspect its state.","inputSchema":{"additionalProperties":false,"properties":{"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["draftId"],"type":"object"},"name":"claudexor_next_message_read","outputSchema":{"additionalProperties":false,"description":"Bounded editable-content snapshot. Read the exact predecessorResult path (or claudexor_run_result for its job/run handle) for predecessor output; output is never duplicated here. Terminal predecessor observation does not imply draft resolution.","properties":{"attachments":{"items":{"additionalProperties":false,"description":"Reference to an immutable daemon-owned uploaded resource.","properties":{"resourceId":{"description":"Immutable daemon resource id returned by upload finalize.","minLength":1,"type":"string"}},"required":["resourceId"],"type":"object"},"maxItems":32,"type":"array"},"controls":{"anyOf":[{"additionalProperties":false,"description":"Frozen effective controls. Dispatch reads tool permissions, account and harness enablement, trust, quota, capabilities, paid-fallback policy and other settings afresh; a refusal holds the draft.","properties":{"capturedAt":{"description":"Draft creation; edits never recapture controls.","minLength":1,"type":"string"},"inherited":{"additionalProperties":{},"description":"Continuation-inherited groups from the predecessor's accepted request (mode, scope, execution, harness and model groups, promptCacheTtl); omitted per-harness models were completed from Settings at creation.","type":"object"},"resolved":{"additionalProperties":{},"description":"Create-time controls as captured: explicit draft controls, otherwise ordinary new-run defaults at creation, never the predecessor's value. An omitted access is the project's default access at creation, not the predecessor's.","type":"object"},"settings":{"anyOf":[{"additionalProperties":false,"properties":{"authPreference":{"default":"auto","description":"Preferred auth route: subscription (native/OAuth session), api_key (a stored API key), or auto (engine picks subscription-first with policy fallback). A preference, not a secret.","enum":["subscription","api_key","auto"],"type":"string"},"eligibleHarnesses":{"items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"harnesses":{"additionalProperties":{"additionalProperties":false,"description":"Per-harness settings.","properties":{"auth_preference":{"default":"auto","description":"Preferred auth route: subscription (native/OAuth session), api_key (a stored API key), or auto (engine picks subscription-first with policy fallback). A preference, not a secret.","enum":["subscription","api_key","auto"],"type":"string"},"default_model":{"default":null,"description":"Per-harness default model; null = the harness's own default.","type":["string","null"]},"effort":{"anyOf":[{"description":"Cross-harness reasoning-effort level as a lowercase slug (open vocabulary, mirroring the vendor contract); adapters advertise the levels they accept per model, ordered weakest to strongest by the vendor itself, and a shared normalizer passes advertised levels through, clamps inside the vendor order, places a word the vendor order lacks by the shared preference order (none < minimal < low < medium < high < xhigh < max < ultra) onto an advertised level, and refuses words neither order places.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},{"type":"null"}],"default":null,"description":"Default reasoning effort for the harness; null = harness default."},"fallback_model":{"default":null,"description":"Model to fall back to on typed fallback signals; null = none.","type":["string","null"]},"max_rounds":{"anyOf":[{"exclusiveMinimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Default max convergence rounds; null = engine default."},"max_turns":{"anyOf":[{"exclusiveMinimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Default max agent turns; null = no limit."},"web":{"default":"auto","description":"Default web policy for this harness.","enum":["off","auto","cached","live"],"type":"string"}},"type":"object"},"type":"object"},"primaryHarness":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."}},"required":["harnesses","eligibleHarnesses","primaryHarness","authPreference"],"type":"object"},{"type":"null"}],"description":"Settings execution preferences captured at creation (per-harness defaults, eligible and primary harness, auth preference), used at dispatch instead of current values."}},"required":["capturedAt","inherited","resolved","settings"],"type":"object"},{"type":"null"}],"description":"Null after clear."},"detailPath":{"type":"string"},"draft":{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"},"omittedAttachments":{"minimum":0,"type":"integer"},"omittedPromptBytes":{"minimum":0,"type":"integer"},"promptBytes":{"minimum":0,"type":"integer"},"promptPreview":{"type":"string"}},"required":["draft","promptPreview","promptBytes","omittedPromptBytes","attachments","omittedAttachments","controls","detailPath"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"readOnlyHint":true},"description":"Observe an existing durable run (or a queued job id) through bounded event replay. Defaults: afterSeq=0, waitMs=25000, maxEvents=50, wake=batch. Events already available at the snapshot fence are returned first, even while a question is pending. wake=batch then keeps collecting until the page fills, it includes a question event (also one written before the wait), the run ends, or waitMs elapses; wake=event returns as soon as any event is available. waitMs=0 returns only the already available page. A pending question whose event is not in the page never ends a wait by itself; it is always reported in pendingInteractions. Resume with nextSeq; snapshotSeq is a fence, and terminal is not the end of events, until a page with no events reports eventOmission stream_ended (the stream cannot serve the rest, such as a last line left unterminated by a crash): stop there. Pages are capped at 64 KiB of events, pending bodies at 32 KiB, results at 128 KiB (UTF-8 JSON); an event too large for any page is named in oversizedEvent: read it with claudexor_run_event_read, then resume with afterSeq set to its seq. Daemon discovery and each snapshot read have separate 5s budgets, so a call can take waitMs plus about 15s; size waitMs to your client's tool timeout. Timeout, disconnect and host abort close only this read, never the worker. Use claudexor_run_result for output and claudexor_run_interactions for omitted question bodies.","inputSchema":{"additionalProperties":false,"properties":{"afterSeq":{"default":0,"description":"Last durable event seq already consumed (the previous nextSeq), never snapshotSeq.","maximum":9007199254740991,"minimum":0,"type":"integer"},"maxEvents":{"default":50,"maximum":200,"minimum":1,"type":"integer"},"runId":{"description":"Run id, or the job id of an accepted launch that may still be queued.","maxLength":256,"minLength":1,"type":"string"},"waitMs":{"default":25000,"description":"Bound of the event stage. Zero never waits for new events: it returns the bounded page already available at the snapshot fence, read within a separate 5s budget. Daemon discovery and each snapshot read have their own 5s budgets, so one call can take up to waitMs plus about 15s.","maximum":50000,"minimum":0,"type":"integer"},"wake":{"default":"batch","description":"batch (default): collect events until the page fills, it includes a question event (interaction.requested, also one written before the wait), the run ends, or waitMs elapses. event: return as soon as any event is available. A pending question whose event is not in the page is reported in both modes but never ends a wait by itself.","enum":["batch","event"],"type":"string"}},"required":["runId"],"type":"object"},"name":"claudexor_run_wait","outputSchema":{"additionalProperties":false,"description":"Read-only run observation, at most 131072 UTF-8 JSON bytes: at most two snapshot reads and one stream subscription, no automatic reconnect or worker cancellation. Events already available at the snapshot fence are returned before any wait, whether or not a question is pending. Resume with nextSeq.","properties":{"deferredMessage":{"anyOf":[{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"},{"type":"null"}],"description":"Snapshot only: terminal wakeReason refers to the predecessor, never proves draft resolution."},"eventOmission":{"anyOf":[{"enum":["event_limit","byte_limit","oversized_frame","invalid_event","stream_ended"],"type":"string"},{"type":"null"}],"description":"Why the page stopped early: event_limit or byte_limit (more events may follow; resume with nextSeq), oversized_frame (the next frame exceeds the 131072-byte stream frame cap), invalid_event (the next frame failed validation and is never skipped), stream_ended (the stream, which ends only for a terminal run, served nothing after nextSeq although snapshotSeq is higher, such as a last line left unterminated by a crash; nothing was skipped, and the same call returns the same page until the log changes, so stop there). Null means no limit was reached, not that replay is exhausted."},"events":{"description":"Ordered new events, at most 65536 UTF-8 JSON bytes including envelopes. Legacy events retain their body and use the stream id as seq.","items":{"additionalProperties":false,"properties":{"event":{"additionalProperties":false,"description":"Append-only run event record (one JSONL line in the run's event log).","properties":{"payload":{"additionalProperties":{},"default":{},"description":"Event-type-specific payload.","type":"object"},"run_id":{"description":"Run the event belongs to.","minLength":1,"type":"string"},"seq":{"description":"Monotonic per-run sequence stamped at emit time; the durable SSE cursor and snapshot fence. Optional only for pre-v0.8.0 artifacts.","exclusiveMinimum":0,"type":"integer"},"task_id":{"description":"Task the run belongs to.","minLength":1,"type":"string"},"thread_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"ts":{"description":"Event timestamp.","type":"string"},"type":{"description":"Type of an append-only run event, covering run lifecycle, contract/context creation, budget, routing fallbacks, harness activity, interactions, gates, review, arbitration, work products, and control verbs.","enum":["run.created","task.contract.created","context.pack.created","project.git.initialized","project.claude_bridge.created","budget.lease.created","budget.observation","budget.cash","policy.web.upgraded","harness.started","harness.event","harness.completed","route.fallback.started","route.fallback.completed","route.fallback.exhausted","route.transient.detected","route.transient.retry_scheduled","route.profile.headroom_exceeded","route.profile.rotated","route.profile.rotation_exhausted","route.profile.credential_unusable","route.account.pool_selected","route.account.lane_switch","route.account.pool_exhausted","route.transient.exhausted","route.fallback.auth_switched","route.primary.diverged","route.pool.degraded","session.continuity","interaction.requested","interaction.answered","interaction.timeout","interaction.answer_discarded","interaction.withdrawn","message.accepted","message.delivered","message.refused","plan.progress","plan.questions","plan.brief.materialized","council.started","council.draft","council.member.failed","council.merged","budget.quota_pressure","delegation.belt.unavailable","delegation.belt.degraded","output.ready","gate.started","gate.completed","review.preflight","review.started","review.skipped","reviewer.started","reviewer.first_event","reviewer.auth_switched","reviewer.completed","reviewer.timed_out","reviewer.failed","finding.revalidated","synthesis.started","arbitration.completed","work_product.emitted","work_product.adopted","control.requested","control.applied","control.rejected","run.blocked","run.completed","run.failed","run.continuation","run.continuation.denied","run.continuity","workspace.retained"],"type":"string"}},"required":["ts","run_id","task_id","type"],"type":"object"},"seq":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["seq","event"],"type":"object"},"maxItems":200,"type":"array"},"nextSeq":{"description":"Last returned event seq, or afterSeq when none was returned. It never advances over an unreturned event.","maximum":9007199254740991,"minimum":0,"type":"integer"},"omittedInteractions":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"oversizedEvent":{"anyOf":[{"additionalProperties":false,"properties":{"seq":{"description":"Durable seq of the next unread event.","maximum":9007199254740991,"minimum":0,"type":"integer"},"type":{"description":"Event type the daemon stream names for it.","type":"string"}},"required":["seq","type"],"type":"object"},{"type":"null"}],"description":"The next unread event after nextSeq cannot fit one page. Read its exact bytes in parts with claudexor_run_event_read, then resume with afterSeq set to its seq. Null otherwise."},"pendingInteractionCount":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"pendingInteractions":{"description":"Current snapshot's pending questions, bounded to 32768 UTF-8 JSON bytes; claudexor_run_interactions returns complete bodies. They never hold back events.","items":{"additionalProperties":false,"description":"A live interactive question awaiting the user's answer (snapshot projection).","properties":{"attemptId":{"default":null,"description":"Attempt the interaction was raised in, when known.","type":["string","null"]},"harnessId":{"default":null,"description":"Harness that raised the interaction.","type":["string","null"]},"interactionId":{"description":"Interaction id used to answer.","minLength":1,"type":"string"},"questions":{"default":[],"description":"Questions awaiting answers.","items":{"additionalProperties":false,"description":"One question of an interactive user-input request.","properties":{"header":{"default":null,"description":"Short chip/header text some harnesses attach to a question.","type":["string","null"]},"id":{"description":"Question id.","minLength":1,"type":"string"},"multi_select":{"default":false,"description":"Whether multiple options may be selected.","type":"boolean"},"options":{"default":[],"description":"Selectable options; empty for free-text-only questions.","items":{"additionalProperties":false,"description":"One multiple-choice option of an interactive question.","properties":{"description":{"default":null,"description":"Optional longer explanation of the option.","type":["string","null"]},"label":{"description":"Option label shown to the user.","type":"string"}},"required":["label"],"type":"object"},"type":"array"},"question":{"description":"The question text.","type":"string"}},"required":["id","question"],"type":"object"},"type":"array"},"requestedAt":{"description":"When the interaction was requested.","type":"string"},"runId":{"description":"Run the interaction belongs to.","minLength":1,"type":"string"},"sourceTool":{"default":null,"description":"Native tool that raised the request.","type":["string","null"]},"timeoutAt":{"default":null,"description":"When the interaction times out into a benign decline; null = no timeout.","type":["string","null"]}},"required":["interactionId","runId","requestedAt"],"type":"object"},"type":"array"},"runId":{"description":"Canonical run id; a queued job id converges to its run id once the run binds.","type":"string"},"snapshotPhase":{"enum":["before_wait","after_wait"],"type":"string"},"snapshotProblem":{"anyOf":[{"enum":["snapshot_unavailable"],"type":"string"},{"type":"null"}],"description":"A failed final read leaves the explicitly labelled initial snapshot, never invented current state."},"snapshotSeq":{"description":"Last event seq at the latest snapshot: a fence, not a cursor. nextSeq below it means events are already written; eventOmission stream_ended reports when the stream cannot serve them.","maximum":9007199254740991,"minimum":0,"type":"integer"},"status":{"description":"Control-plane run state = the run LIFECYCLE (D8): queued/running while live, then exactly one of succeeded / failed / cancelled / interrupted. Outcome quality (checks/review/delivery) is orthogonal — see outcomeFacts.","enum":["queued","running","succeeded","failed","cancelled","interrupted"],"type":"string"},"wakeReason":{"description":"Why this observation returned, by precedence: aborted (this read was cancelled; the worker continues), terminal (the run is terminal; events may still follow nextSeq unless eventOmission is stream_ended), interactions (this page includes a question event), events (event mode, a completed zero-wait page, or a page, even an empty one, stopped by event_limit, byte_limit, oversized_frame or invalid_event), timeout (waitMs elapsed, possibly with a partial batch), disconnected (the stream ended early; never completion).","enum":["events","interactions","terminal","timeout","aborted","disconnected"],"type":"string"}},"required":["runId","status","snapshotSeq","snapshotPhase","snapshotProblem","nextSeq","events","eventOmission","oversizedEvent","pendingInteractions","pendingInteractionCount","omittedInteractions","wakeReason"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"readOnlyHint":true},"description":"Read one bounded part of one run event by run id and seq, typically claudexor_run_wait's oversizedEvent. Returns the exact UTF-8 bytes [offset, nextOffset) of the redacted serialization the run event stream delivers, with totalBytes and the sha256 of the whole event; parts never split a character. Read from offset 0, then each nextOffset until it equals totalBytes; a partial read is not a consumed event, so do not move claudexor_run_wait past it until the last part. Only validated events of this run are readable; there is no path, artifact or whole-log access.","inputSchema":{"additionalProperties":false,"properties":{"maxBytes":{"default":32768,"description":"Upper bound of this part's UTF-8 bytes; a part may end earlier at a character boundary.","maximum":65536,"minimum":4,"type":"integer"},"offset":{"default":0,"description":"0, or the previous part's nextOffset.","maximum":9007199254740991,"minimum":0,"type":"integer"},"runId":{"maxLength":256,"minLength":1,"type":"string"},"seq":{"description":"The event to read, e.g. claudexor_run_wait's oversizedEvent.seq.","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["runId","seq"],"type":"object"},"name":"claudexor_run_event_read","outputSchema":{"additionalProperties":false,"description":"One bounded part of a single validated run event, read from the run's own event log by run id and seq. Concatenate parts in offset order until nextOffset equals totalBytes; only then is the event consumed.","properties":{"nextOffset":{"description":"Where the next part starts; equal to totalBytes when this part ends the event.","maximum":9007199254740991,"minimum":0,"type":"integer"},"offset":{"description":"UTF-8 byte offset where this part starts.","maximum":9007199254740991,"minimum":0,"type":"integer"},"runId":{"description":"Canonical run id.","minLength":1,"type":"string"},"seq":{"description":"Durable seq of the event (its event-stream id).","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"sha256":{"description":"SHA-256 of all totalBytes; verify the reassembled text before parsing it.","pattern":"^[0-9a-f]{64}$","type":"string"},"text":{"description":"Bytes [offset, nextOffset) decoded as UTF-8; a boundary never splits a character.","type":"string"},"totalBytes":{"description":"UTF-8 byte length of the event's complete stream serialization: the redacted JSON line the run event stream delivers.","exclusiveMinimum":0,"type":"integer"},"type":{"description":"Type of an append-only run event, covering run lifecycle, contract/context creation, budget, routing fallbacks, harness activity, interactions, gates, review, arbitration, work products, and control verbs.","enum":["run.created","task.contract.created","context.pack.created","project.git.initialized","project.claude_bridge.created","budget.lease.created","budget.observation","budget.cash","policy.web.upgraded","harness.started","harness.event","harness.completed","route.fallback.started","route.fallback.completed","route.fallback.exhausted","route.transient.detected","route.transient.retry_scheduled","route.profile.headroom_exceeded","route.profile.rotated","route.profile.rotation_exhausted","route.profile.credential_unusable","route.account.pool_selected","route.account.lane_switch","route.account.pool_exhausted","route.transient.exhausted","route.fallback.auth_switched","route.primary.diverged","route.pool.degraded","session.continuity","interaction.requested","interaction.answered","interaction.timeout","interaction.answer_discarded","interaction.withdrawn","message.accepted","message.delivered","message.refused","plan.progress","plan.questions","plan.brief.materialized","council.started","council.draft","council.member.failed","council.merged","budget.quota_pressure","delegation.belt.unavailable","delegation.belt.degraded","output.ready","gate.started","gate.completed","review.preflight","review.started","review.skipped","reviewer.started","reviewer.first_event","reviewer.auth_switched","reviewer.completed","reviewer.timed_out","reviewer.failed","finding.revalidated","synthesis.started","arbitration.completed","work_product.emitted","work_product.adopted","control.requested","control.applied","control.rejected","run.blocked","run.completed","run.failed","run.continuation","run.continuation.denied","run.continuity","workspace.retained"],"type":"string"}},"required":["runId","seq","type","totalBytes","sha256","offset","nextOffset","text"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"readOnlyHint":true},"description":"Observe lifecycle and pending attention from 1..1000 existing durable job/run handles in one read. targets contains {runId, seen?}; waitMs defaults to 25000 (0..50000). Echo each summary token as that target's seen to suppress unchanged terminal/question attention; tokens are not event cursors or answers. Returns ascending attention indexes and compact summaries in input order, including duplicates and explicit unknowns, within 128 KiB of logical JSON. waitMs=0 reads once; timeout never retries. Discovery adds up to 5s and HTTP adds up to waitMs+5s (total waitMs+10s). Host abort closes only observation; discovery's read-only handshake may settle in the background. Requires an existing supporting daemon; never starts one or a worker. Terminal lifecycle is not output readiness: use claudexor_run_result for output and claudexor_run_interactions for question bodies.","inputSchema":{"additionalProperties":false,"description":"Read-only attention observation; compact request JSON is at most 1048576 UTF-8 bytes.","properties":{"targets":{"items":{"additionalProperties":false,"properties":{"runId":{"maxLength":256,"minLength":1,"type":"string"},"seen":{"maxLength":43,"minLength":43,"pattern":"^[A-Za-z0-9_-]{43}$","type":"string"}},"required":["runId"],"type":"object"},"maxItems":1000,"minItems":1,"type":"array"},"waitMs":{"default":25000,"maximum":50000,"minimum":0,"type":"integer"}},"required":["targets"],"type":"object"},"name":"claudexor_runs_wait","outputSchema":{"additionalProperties":false,"description":"Lifecycle and pending attention only, at most 131072 UTF-8 JSON bytes; output readiness is a separate addressed read.","properties":{"attention":{"items":{"maximum":999,"minimum":0,"type":"integer"},"maxItems":1000,"type":"array"},"summaries":{"items":{"anyOf":[{"additionalProperties":false,"properties":{"pending":{"type":"boolean"},"problem":{"type":"null"},"status":{"description":"Control-plane run state = the run LIFECYCLE (D8): queued/running while live, then exactly one of succeeded / failed / cancelled / interrupted. Outcome quality (checks/review/delivery) is orthogonal — see outcomeFacts.","enum":["queued","running","succeeded","failed","cancelled","interrupted"],"type":"string"},"token":{"maxLength":43,"minLength":43,"pattern":"^[A-Za-z0-9_-]{43}$","type":"string"}},"required":["status","pending","token","problem"],"type":"object"},{"additionalProperties":false,"properties":{"pending":{"type":"null"},"problem":{"enum":["not_found","snapshot_unavailable","not_observed"],"type":"string"},"status":{"type":"null"},"token":{"type":"null"}},"required":["status","pending","token","problem"],"type":"object"}]},"maxItems":1000,"minItems":1,"type":"array"},"wakeReason":{"enum":["attention","problems","timeout","aborted"],"type":"string"}},"required":["wakeReason","attention","summaries"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"readOnlyHint":true},"description":"Read exactly one retained task group page by caller UUID, optionally checking expectedStoreId. limit is 1..200 (default 50); state filters lifecycle; cursor (at most 2048 characters) is bound to group/filter/store/current served generations. The logical result is at most 131072 UTF-8 bytes and may return fewer members; resume only with nextCursor. Retained-only/current-served qualifiers are not a permanent roster or proof of submission. Job handles remain canonical while runId is null until binding. Explicit unavailable observations are unknown. Requires an existing supporting daemon; discovery and HTTP reads each allow up to 5s. Host cancellation closes only the read. Never launches, retries, resumes, cancels or answers work. Lifecycle is not output readiness; use addressed result/interactions tools for bodies.","inputSchema":{"additionalProperties":false,"properties":{"cursor":{"maxLength":2048,"type":"string"},"expectedStoreId":{"minLength":1,"type":"string"},"limit":{"default":50,"maximum":200,"minimum":1,"type":"integer"},"state":{"description":"Control-plane run state = the run LIFECYCLE (D8): queued/running while live, then exactly one of succeeded / failed / cancelled / interrupted. Outcome quality (checks/review/delivery) is orthogonal — see outcomeFacts.","enum":["queued","running","succeeded","failed","cancelled","interrupted"],"type":"string"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"}},"required":["taskGroupId"],"type":"object"},"name":"claudexor_task_group_runs","outputSchema":{"additionalProperties":false,"description":"One retained-only page in current served generations, at most 131072 UTF-8 bytes of logical JSON; absence is not historical completeness or launch authority.","properties":{"hasMore":{"type":"boolean"},"members":{"items":{"additionalProperties":false,"properties":{"createdAt":{"minLength":1,"type":"string"},"jobId":{"minLength":1,"type":"string"},"observation":{"anyOf":[{"additionalProperties":false,"properties":{"pending":{"type":"boolean"},"problem":{"type":"null"},"status":{"description":"Control-plane run state = the run LIFECYCLE (D8): queued/running while live, then exactly one of succeeded / failed / cancelled / interrupted. Outcome quality (checks/review/delivery) is orthogonal — see outcomeFacts.","enum":["queued","running","succeeded","failed","cancelled","interrupted"],"type":"string"},"token":{"maxLength":43,"minLength":43,"pattern":"^[A-Za-z0-9_-]{43}$","type":"string"}},"required":["status","pending","token","problem"],"type":"object"},{"additionalProperties":false,"properties":{"pending":{"type":"null"},"problem":{"enum":["not_found","snapshot_unavailable","not_observed"],"type":"string"},"status":{"type":"null"},"token":{"type":"null"}},"required":["status","pending","token","problem"],"type":"object"}]},"runId":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]}},"required":["jobId","runId","createdAt","observation"],"type":"object"},"maxItems":200,"type":"array"},"nextCursor":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}]},"retention":{"const":"retained_only","type":"string"},"storeId":{"minLength":1,"type":"string"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"},"viewToken":{"pattern":"^[A-Za-z0-9_-]{43}$","type":"string"},"visibility":{"const":"current_served_generations","type":"string"}},"required":["taskGroupId","storeId","visibility","retention","viewToken","members","hasMore","nextCursor"],"type":"object"}},{"annotations":{"readOnlyHint":true},"description":"Return doctor-backed Claudexor runtime status: per-harness verdicts with enabled/disabled intents, doctor reasons and checks, and the configured model.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"claudexor_status"},{"annotations":{"readOnlyHint":true},"description":"Return the derived AgentCapabilityCatalog: per-harness live capabilities (doctor-backed), canonical modes, the mutability matrix, run-control keys, CLI verbs, and the run-apply-state vocabulary.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"claudexor_capabilities","outputSchema":{"additionalProperties":false,"description":"Machine-readable capability catalog for external agents — derived, never hand-maintained.","properties":{"availableHarnesses":{"description":"Convenience: ids with doctor status ok.","items":{"type":"string"},"type":"array"},"cliCommands":{"description":"CLI verbs with mutability/stability (full flag detail via `claudexor help --json`).","items":{"additionalProperties":false,"description":"CLI verb projection from the command registry (same data `claudexor help --json` serves).","properties":{"id":{"description":"CLI verb.","type":"string"},"mutability":{"description":"read = never mutates the tree; write = produces tree changes (envelope or live); delivery = moves an existing WorkProduct into the tree/VCS; ops = local config/daemon plumbing.","enum":["read","write","delivery","ops"],"type":"string"},"recovery":{"description":"True for post-run recovery verbs (inspect/follow/apply/decision).","type":"boolean"},"stability":{"description":"Contract stability of the verb.","enum":["stable","experimental"],"type":"string"}},"required":["id","mutability","stability","recovery"],"type":"object"},"type":"array"},"generatedAt":{"description":"ISO timestamp when the catalog was composed.","type":"string"},"git":{"additionalProperties":false,"description":"Execution-location Git readiness. Read-only and valid non-Git in-place flows do not require it.","properties":{"detail":{"type":["string","null"]},"remediation":{"type":["string","null"]},"status":{"enum":["available","missing","developer_tools_stub","failed"],"type":"string"},"version":{"type":["string","null"]}},"required":["status","version","detail","remediation"],"type":"object"},"harnesses":{"description":"Live per-harness capabilities (doctor-backed).","items":{"additionalProperties":false,"description":"Per-harness live capability row (manifest + doctor + model truth).","properties":{"accessControl":{"additionalProperties":false,"default":{"auxiliaryWritableRoots":false},"description":"Negotiated access-control grants beyond the access profile. Engines that predate this row omit it (= no auxiliary writable roots).","properties":{"auxiliaryWritableRoots":{"description":"True when this harness applies execution.auxiliaryWritableRoots natively under workspace_write, and a later run whose effective execution carries no list (a new thread turn without one) keeps no earlier grant; false lanes refuse an explicit pool and drop from an auto pool.","type":"boolean"}},"required":["auxiliaryWritableRoots"],"type":"object"},"accessProfilesSupported":{"description":"Access profiles the adapter can enforce.","items":{"description":"Active filesystem/command access profile for a run: readonly (no writes), workspace_write (use the harness's native workspace-write policy), full (unrestricted; requires the per-repo trust allow for a run an operator starts at a surface, not for an execution.delegated run), inherit_native (defer to the harness's own native settings).","enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"type":"array"},"accountCatalog":{"type":"boolean"},"attachmentInputs":{"description":"Finite media/MIME/size/count/transport declarations for this adapter.","items":{"additionalProperties":false,"description":"Finite MIME, size, count and transport limits declared by one adapter.","properties":{"kind":{"description":"Kind of attached resource: image input or generic file bytes.","enum":["image","file"],"type":"string"},"max_bytes":{"exclusiveMinimum":0,"type":"integer"},"max_count":{"exclusiveMinimum":0,"type":"integer"},"mime_types":{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"transport":{"description":"Native adapter transport used for one supported attachment class.","enum":["file_path","base64_stream","base64_inline","text_inline"],"type":"string"}},"required":["kind","mime_types","max_bytes","max_count","transport"],"type":"object"},"type":"array"},"configuredModel":{"description":"The user's configured per-harness default model, if any (null = engine default routing).","type":["string","null"]},"configuredModelValid":{"description":"Admission of configuredModel under the harness's own absence declaration (INV-104): false = refused by an authoritative list, or no list could be read; true = listed, or unlisted on an advisory harness (forwarded to the vendor; the settings write and doctor readiness carry that note); null when no model is configured.","type":["boolean","null"]},"delegation":{"additionalProperties":false,"description":"Whether this installed runtime can offer Delegate through this harness.","properties":{"available":{"description":"Whether this harness can receive the packaged delegation belt.","type":"boolean"},"reason":{"description":"Stable reason for the current delegation capability verdict.","enum":["ready","runtime_unavailable","manifest_unsupported"],"type":"string"},"remediation":{"default":null,"description":"Concrete update/repair guidance when unavailable; null when ready.","type":["string","null"]},"requiresFullAccess":{"default":false,"description":"Whether this harness can reach the belt only under a full-access profile.","type":"boolean"}},"required":["available","reason"],"type":"object"},"disabledIntents":{"description":"Intents the doctor disabled (with reasons in `reasons`).","items":{"type":"string"},"type":"array"},"displayName":{"description":"Human display name from the manifest.","type":"string"},"effortLevels":{"description":"Reasoning-effort ladder the adapter declares (normalized by the engine).","items":{"description":"Cross-harness reasoning-effort level as a lowercase slug (open vocabulary, mirroring the vendor contract); adapters advertise the levels they accept per model, ordered weakest to strongest by the vendor itself, and a shared normalizer passes advertised levels through, clamps inside the vendor order, places a word the vendor order lacks by the shared preference order (none < minimal < low < medium < high < xhigh < max < ultra) onto an advertised level, and refuses words neither order places.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"type":"array"},"enabled":{"description":"False when settings disable this harness (harnesses.<id>.enabled=false) — routing excludes it regardless of doctor status.","type":"boolean"},"enabledIntents":{"description":"Intents the gateway will route to this harness right now.","items":{"type":"string"},"type":"array"},"id":{"description":"Harness id (codex, claude, cursor, opencode, raw-api, openrouter, ...).","type":"string"},"inputLimits":{"items":{"additionalProperties":false,"description":"Adapter-owned observed input bound, not a predictive refusal or a model-window claim.","properties":{"askPromptBudget":{"additionalProperties":false,"properties":{"engineOverheadMax":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"shape":{"const":"ordinary_initial_attempt","description":"Ordinary ASK initial attempt, including thread-turn continuity; excludes deep-scan and automatic continuation attempts.","type":"string"}},"required":["shape","engineOverheadMax"],"type":"object"},"limit":{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"},"verified_against":{"description":"Native runtime version against which the bound was observed.","minLength":1,"type":"string"}},"required":["scope","unit","limit","source","verified_against"],"type":"object"},"type":"array"},"liveInput":{"default":"none","description":"How a live message enters one of this harness's RUNNING sessions (POST /v2/runs/:id/messages): mid_turn | next_tool_boundary | none. The harness maximum from its capability profile; the POST answers for the specific run. Omitted by engines older than 3.16.0 (= none).","enum":["mid_turn","next_tool_boundary","none"],"type":"string"},"models":{"additionalProperties":false,"description":"Summary of a harness's model truth source (full list via the models endpoint/verb).","properties":{"count":{"description":"Number of enumerable models (GET /harnesses/:id/models has the full list).","minimum":0,"type":"integer"},"source":{"description":"Where the model list comes from: a live vendor API enumeration, the adapter manifest's curated hints, or nothing (model overrides are refused for source=none).","enum":["api","manifest","none"],"type":"string"},"verifiedAgainst":{"description":"Vendor CLI version the manifest hints were last verified against (null for api/none sources).","type":["string","null"]}},"required":["source","count","verifiedAgainst"],"type":"object"},"processingPreferences":{"items":{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},"type":"array"},"promptCacheTtls":{"description":"Exact promptCacheTtl values this harness's adapter translates into native controls; empty when a requested value would be disclosed as ignored, omitted by engines without the run control.","items":{"description":"Native prompt-cache lifetime for the main conversation and helper requests of a harness that declares it. Omission sends no override: native defaults, profile settings and the inherited environment stay in effect.","enum":["5m","1h"],"type":"string"},"type":"array"},"providerFamily":{"description":"Vendor family the harness routes to.","enum":["openai","anthropic","google","cursor","opencode","xai","local","unknown"],"type":"string"},"readonlyMechanism":{"description":"HOW read-only is enforced (fs_sandbox | permission_deny | tool_allowlist | none) — none means read-only intent is advisory for this harness.","enum":["fs_sandbox","permission_deny","tool_allowlist","none"],"type":"string"},"reasons":{"description":"Human-readable doctor/discovery reasons for degraded or unavailable status.","items":{"type":"string"},"type":"array"},"setupLogin":{"anyOf":[{"additionalProperties":false,"description":"Effective setup-login flow for this harness on the current host.","properties":{"mode":{"description":"in_app requests the daemon-hosted login flow; external_terminal requests the existing client PTY flow.","enum":["in_app","external_terminal"],"type":"string"}},"required":["mode"],"type":"object"},{"type":"null"}],"description":"Effective setup-login flow for this harness on the current host; current producers emit null or an object, while omission identifies a legacy catalog row."},"status":{"description":"Doctor verdict: ok | degraded | unavailable (doctor-backed, cached ~90s).","enum":["ok","degraded","unavailable"],"type":"string"},"webPolicy":{"description":"How external web/search is controlled for this harness.","enum":["native","tools","uncontrolled","none"],"type":"string"},"writeMechanism":{"default":"none","description":"HOW workspace_write is confined (fs_sandbox | tool_policy | none) — fs_sandbox is the base sandbox; a native automatic reviewer may still admit individual actions outside it. tool_policy means an allowed shell is unconfined (no FS/network fence); consumers choosing lanes by confinement read THIS field, never a harness name.","enum":["fs_sandbox","tool_policy","none"],"type":"string"}},"required":["id","enabled","displayName","status","providerFamily","enabledIntents","disabledIntents","reasons","configuredModel","configuredModelValid","models","webPolicy","attachmentInputs","effortLevels","accessProfilesSupported","readonlyMechanism","delegation"],"type":"object"},"type":"array"},"mcpTools":{"description":"MCP tool names `claudexor mcp serve` exposes.","items":{"type":"string"},"type":"array"},"modes":{"description":"Canonical run modes; strategy controls are separate schema-owned fields, never modes.","items":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"type":"array"},"mutability":{"additionalProperties":false,"description":"The mutability matrix: every way a Claudexor run can (or cannot) touch a tree, from the schema's closed vocabularies.","properties":{"accessProfiles":{"description":"Access vocabulary; `full` additionally requires the per-repo trust allow (claudexor trust --allow-full-access) for a run an operator starts at a surface, not for an execution.delegated run.","items":{"description":"Active filesystem/command access profile for a run: readonly (no writes), workspace_write (use the harness's native workspace-write policy), full (unrestricted; requires the per-repo trust allow for a run an operator starts at a surface, not for an execution.delegated run), inherit_native (defer to the harness's own native settings).","enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"type":"array"},"applyModes":{"description":"Delivery modes for applying a run's WorkProduct to the project.","items":{"enum":["apply","commit","branch","pr"],"type":"string"},"type":"array"},"isolationKinds":{"description":"Run isolation: envelope = isolated worktree in the external per-project runtime namespace (default), live = the project tree itself.","items":{"enum":["envelope","live"],"type":"string"},"type":"array"},"readOnlyModes":{"description":"Canonical modes that never mutate the project tree (ask/plan).","items":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"type":"array"},"workspaceKinds":{"items":{"enum":["git","directory"],"type":"string"},"type":"array"},"workspaceModes":{"description":"Thread workspace modes (in_place | isolated | delegated).","items":{"description":"Per-thread workspace mode: in_place mutates the live project tree directly (the default); isolated keeps a persistent git worktree per thread that apply merges into the project; delegated runs every turn in one caller-owned workspace bound at creation, which Claudexor never applies to the project or deletes.","enum":["in_place","isolated","delegated"],"type":"string"},"type":"array"},"writeModes":{"description":"Canonical modes that may mutate a tree (agent).","items":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"type":"array"}},"required":["readOnlyModes","writeModes","isolationKinds","workspaceModes","accessProfiles","applyModes"],"type":"object"},"ok":{"const":true,"description":"Envelope marker (matches the CLI JSON convention).","type":"boolean"},"outputSchemaDialects":{"description":"Supported structured-output JSON Schema dialects and canonical $schema URIs.","items":{"additionalProperties":false,"description":"One JSON Schema dialect accepted by the structured-output validator.","properties":{"defaultWhenOmitted":{"description":"True when this dialect is selected for schemas without a $schema declaration.","type":"boolean"},"dialect":{"description":"Stable dialect id used in structured-output receipts.","enum":["draft-07","draft-2020-12"],"type":"string"},"uri":{"description":"Canonical $schema URI accepted for this dialect.","format":"uri","type":"string"}},"required":["dialect","uri","defaultWhenOmitted"],"type":"object"},"minItems":1,"type":"array"},"runApplyStates":{"description":"RunApplyState vocabulary an agent can encounter on run results (not_applied | applied | applied_review_blocked | reverted) — distinct from the ApplyEligibility verdict object on run details.","items":{"type":"string"},"type":"array"},"runControlKeys":{"description":"Accepted POST /runs request keys (derived from the ControlRunStartRequest schema; the CLI/MCP/ACP surfaces project subsets of these).","items":{"type":"string"},"type":"array"},"version":{"description":"Claudexor version serving this catalog (compare with CLAUDEXOR_PLUGIN_VERSION to detect plugin skew).","type":"string"}},"required":["ok","version","generatedAt","git","harnesses","availableHarnesses","modes","runControlKeys","outputSchemaDialects","mutability","cliCommands","mcpTools","runApplyStates"],"type":"object"}},{"annotations":{"readOnlyHint":true},"description":"Return the read-only Accounts view: registered profiles, readiness, quota freshness, and routing identity. accountPools.next_up is the configured default model's verdict, never a forecast for another model; routingEvidence carries model-scoped recent refusals, temporary per-model capability marks, and each account's last service per requested model (a routing observation, not a quota or authentication verdict). Default combines current quota and registry facts with retained readiness observations: one coalesced cold acquisition, including failure, then passive reads with the original check time. Viewing does not renew old evidence; actual execution performs its own checks. fresh:true requests the atomic snapshot instead — an EXPENSIVE explicit refresh (a live probe per registered profile, a full harness doctor sweep, and the vendor quota fan-out, which honors account/route rate-limit cooldowns and existing broad floors and discloses paused subjects in quota.refresh_skipped). Use fresh:true only when acting on staleness matters; never poll with it. This tool never starts login or changes account state.","inputSchema":{"additionalProperties":false,"properties":{"fresh":{"description":"true = the expensive atomic Accounts snapshot (fresh probes + doctor + vendor quota fan-out); false/absent = current quota/registry facts with retained readiness observations and their age.","type":"boolean"}},"type":"object"},"name":"claudexor_accounts","outputSchema":{"anyOf":[{"additionalProperties":false,"description":"Credential-profile registry listing with per-profile doctor readiness and per-harness accounts authority.","properties":{"accountPools":{"default":[],"description":"Additive per-harness pool authority of the unified account model: routing facts (next_up incl. the api_key_route kind) live here so legacy strict next_up decoders never see unknown kinds. Old clients ignore this key.","items":{"additionalProperties":false,"description":"Per-harness pool authority (unified account model): who an unpinned run routes to next.","properties":{"harness_id":{"description":"Harness family this pool verdict belongs to.","minLength":1,"type":"string"},"next_up":{"anyOf":[{"additionalProperties":false,"description":"An enabled account row is who an unpinned run routes to next.","properties":{"kind":{"const":"profile","type":"string"},"profileId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["kind","profileId"],"type":"object"},{"additionalProperties":false,"description":"The account pool is empty or exhausted; the unpinned route is the policy-governed API key (INV-061) — a route, never an account row.","properties":{"kind":{"const":"api_key_route","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"description":"An unpinned run has nothing routable, with a human reason.","properties":{"kind":{"const":"none","type":"string"},"reason":{"type":"string"}},"required":["kind","reason"],"type":"object"}],"description":"Server-computed pool routing verdict for one harness's unpinned runs (unified account model)."}},"required":["harness_id","next_up"],"type":"object"},"type":"array"},"harnessAccounts":{"default":[],"description":"Per-harness accounts authority (INV-135): the native CLI-login pseudo-row state and the server-computed Active identity, so no surface re-derives the accounts symmetry. A unified-model engine emits [] here (the key must stay present for legacy strict clients) and carries routing facts in accountPools instead.","items":{"additionalProperties":false,"description":"Per-harness accounts authority: native CLI-login state + the informational next-up identity.","properties":{"harness_id":{"description":"Harness family these accounts belong to.","minLength":1,"type":"string"},"identity":{"anyOf":[{"additionalProperties":false,"description":"Non-secret {email, plan} identity of one account, derived daemon-side from a sanctioned scoped credential source or an allowlisted harness CLI status observation; never carries raw status or token material.","properties":{"email":{"description":"Login email of the account (codex id_token `email`, claude oauthAccount `emailAddress`, or an allowlisted harness CLI status observation).","minLength":1,"type":"string"},"plan":{"description":"Subscription/plan label (codex `chatgpt_plan_type` / claude oauthAccount `organizationType`).","minLength":1,"type":"string"}},"type":"object"},{"type":"null"}],"default":null,"description":"Non-secret {email, plan} of the native/CLI login, derived daemon-side from a sanctioned credential source or allowlisted harness CLI status observation; null when absent/undisclosed."},"native_credentials_enabled":{"description":"Whether the native/CLI login participates in this harness's credential ladder.","type":"boolean"},"native_login_detected":{"description":"Whether a native/default vendor login is currently detected available (the CLI login pseudo-row state).","type":"boolean"},"next_up":{"anyOf":[{"additionalProperties":false,"description":"An enabled credential profile is who an unpinned run routes to next.","properties":{"kind":{"const":"profile","type":"string"},"profileId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["kind","profileId"],"type":"object"},{"additionalProperties":false,"description":"The unprofiled/default credential is the subject of an unpinned run.","properties":{"kind":{"const":"native","type":"string"},"route":{"description":"Effective route of the unprofiled/default subject; omitted by older daemons.","enum":["local_session","api_key"],"type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"description":"An unpinned run has nothing routable (the default credential is disabled and no account is pinned).","properties":{"kind":{"const":"none","type":"string"},"reason":{"type":"string"}},"required":["kind","reason"],"type":"object"}],"description":"Server-computed identity an unpinned run of this harness would route to next."}},"required":["harness_id","native_credentials_enabled","native_login_detected","next_up"],"type":"object"},"type":"array"},"profiles":{"description":"Every registered credential profile paired with its doctor readiness projection and non-secret identity.","items":{"additionalProperties":false,"properties":{"identity":{"anyOf":[{"additionalProperties":false,"description":"Non-secret {email, plan} identity of one account, derived daemon-side from a sanctioned scoped credential source or an allowlisted harness CLI status observation; never carries raw status or token material.","properties":{"email":{"description":"Login email of the account (codex id_token `email`, claude oauthAccount `emailAddress`, or an allowlisted harness CLI status observation).","minLength":1,"type":"string"},"plan":{"description":"Subscription/plan label (codex `chatgpt_plan_type` / claude oauthAccount `organizationType`).","minLength":1,"type":"string"}},"type":"object"},{"type":"null"}],"default":null,"description":"Non-secret {email, plan} of this profile, derived daemon-side from its scoped credential source or allowlisted harness CLI status observation; null when absent/undisclosed."},"profile":{"additionalProperties":false,"description":"Durable non-secret named binding for one harness; credential material may live in Claudexor-owned scoped state, a managed secret store, or a platform-declared vendor/OS-user store, never in this row.","properties":{"created_at":{"anyOf":[{"description":"ISO-8601 timestamp string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"When the profile was registered; null for hand-written config entries."},"credential_kind":{"description":"Binding kind for a profile: Claudexor-owned scoped vendor state, a managed OAuth secret, or a managed API-key secret; a vendor OS-user credential may remain outside that state.","enum":["config_dir_login","oauth_token","api_key"],"type":"string"},"display_name":{"description":"Human label shown wherever the profile appears.","minLength":1,"type":"string"},"enabled":{"default":true,"description":"Disabled profiles are never routable.","type":"boolean"},"harness_id":{"description":"Harness family this profile belongs to.","minLength":1,"type":"string"},"isolation_locator":{"default":null,"description":"Canonical absolute path to Claudexor-owned scoped vendor state for config_dir_login bindings; null for secret-ref kinds.","type":["string","null"]},"profile_id":{"description":"Stable user-chosen profile identifier (unique per harness).","minLength":1,"type":"string"},"secret_ref":{"default":null,"description":"Namespaced secret-store name (e.g. claude_oauth:work) for oauth_token/api_key profiles; null for config_dir_login.","type":["string","null"]}},"required":["profile_id","harness_id","display_name","credential_kind"],"type":"object"},"status":{"additionalProperties":false,"description":"Doctor-owned readiness projection for one credential profile; never durable config.","properties":{"availability":{"enum":["available","unavailable","unknown"],"type":"string"},"detail":{"description":"Redacted human-readable probe evidence.","type":"string"},"harness_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"last_verified_at":{"anyOf":[{"description":"ISO-8601 timestamp string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"When the verification verdict was established, by the method named in verification_source; null = never verified."},"profile_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"stale":{"description":"True only for a bounded stale last-known-good observation; stale is never a fresh passed verification.","type":"boolean"},"stale_age_ms":{"description":"Age in milliseconds of the bounded stale observation, when stale is true.","minimum":0,"type":"integer"},"stale_basis":{"description":"Basis of a stale observation: last_positive_after_timeout = the status probe did not answer within its budget and this row store's last positive status answer, still inside its bounded interval, stands in; unpinned pool admission alone may consume it. Absent = the generic last-known-good grace, consumable only by an already selected route.","enum":["last_positive_after_timeout"],"type":"string"},"verification":{"enum":["passed","failed","not_run"],"type":"string"},"verification_source":{"default":"local_store","description":"How the verification verdict was reached: local_store = the binding's required local state or managed secret is present (says nothing about a token being live); vendor = the vendor answered under the exact binding environment and effective platform credential policy.","enum":["local_store","vendor"],"type":"string"}},"required":["profile_id","harness_id","availability","verification"],"type":"object"}},"required":["profile","status"],"type":"object"},"type":"array"},"routingEvidence":{"additionalProperties":false,"description":"Model-scoped routing evidence; absent when the engine predates the read or the read failed.","properties":{"capabilities":{"description":"Temporary capability marks; absent from engines that predate them. A mark clears on a success there or a catalog or credential change; after expires_at one operation may probe the account.","items":{"additionalProperties":false,"description":"A temporary capability mark for one account and one model. It only orders auto selection: the account stays enabled and usable as a last fallback.","properties":{"account_fingerprint":{"description":"Provider account identity the mark is bound to; null when the adapter has none.","type":["string","null"]},"expires_at":{"description":"Probe becomes eligible at this time; not a vendor reset.","minLength":1,"type":"string"},"harness_id":{"description":"Harness family of the account.","minLength":1,"type":"string"},"observed_at":{"description":"Start of this mark's episode, when its row was created (a recognized refusal, or the service elsewhere that confirmed an unrecognized one); renewals and probes keep it.","minLength":1,"type":"string"},"profile_id":{"description":"Account row that refused this model before generation started.","minLength":1,"type":"string"},"provider_reason":{"description":"Latest refusal diagnostic, redacted and at most 1024 characters: the provider's reason for a recognized refusal, the engine's message and vendor code otherwise.","type":"string"},"requested_model":{"description":"Model the refused request named.","type":"string"},"state":{"description":"provisional = refused here; confirmed = another account then served the correlated retry; probe_due = expired, the next selection may probe it; probing = one operation holds that probe.","enum":["provisional","confirmed","probe_due","probing"],"type":"string"}},"required":["harness_id","profile_id","requested_model","account_fingerprint","provider_reason","observed_at","expires_at","state"],"type":"object"},"type":"array"},"lastService":{"description":"Latest observed service per registered account and requested model, most recent service first.","items":{"additionalProperties":false,"description":"The latest observed service of one account for one requested model under its current credential binding.","properties":{"harness_id":{"description":"Harness family of the account.","minLength":1,"type":"string"},"observed_at":{"description":"When the account was observed serving that request.","minLength":1,"type":"string"},"profile_id":{"description":"Account row that served the request.","minLength":1,"type":"string"},"requested_model":{"description":"Model the run asked for; null = the harness default model.","type":["string","null"]}},"required":["harness_id","profile_id","requested_model","observed_at"],"type":"object"},"type":"array"},"refusals":{"description":"Live pre-progress refusal observations, each scoped to one requested model.","items":{"additionalProperties":false,"description":"A bounded, self-expiring typed observation that an account refused a started session before any progress; it orders the account pool and never excludes a row.","properties":{"expires_at":{"description":"Self-expiry instant (observation retention, not a vendor reset time); after this the observation is ignored.","minLength":1,"type":"string"},"harness_id":{"description":"Harness family the observed account belongs to.","minLength":1,"type":"string"},"observed_at":{"description":"When the pre-progress refusal was observed.","minLength":1,"type":"string"},"profile_id":{"description":"Account row whose started session was refused before progress.","minLength":1,"type":"string"},"requested_model":{"description":"Model the run asked this account for; null = the harness default model.","type":["string","null"]}},"required":["harness_id","profile_id","requested_model","observed_at","expires_at"],"type":"object"},"type":"array"}},"required":["refusals","lastService"],"type":"object"},"routingEvidenceProblem":{"description":"One diagnostic when the routing-evidence read failed; the account listing is still authoritative.","type":"string"}},"required":["profiles"],"type":"object"},{"additionalProperties":false,"description":"Atomic Accounts snapshot: profiles, next-up authority, fresh harness readiness, Git capability, and quota from one server-authored epoch.","properties":{"accountPools":{"default":[],"description":"Additive per-harness pool authority of the unified account model: routing facts (next_up incl. the api_key_route kind) live here so legacy strict next_up decoders never see unknown kinds. Old clients ignore this key.","items":{"additionalProperties":false,"description":"Per-harness pool authority (unified account model): who an unpinned run routes to next.","properties":{"harness_id":{"description":"Harness family this pool verdict belongs to.","minLength":1,"type":"string"},"next_up":{"anyOf":[{"additionalProperties":false,"description":"An enabled account row is who an unpinned run routes to next.","properties":{"kind":{"const":"profile","type":"string"},"profileId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["kind","profileId"],"type":"object"},{"additionalProperties":false,"description":"The account pool is empty or exhausted; the unpinned route is the policy-governed API key (INV-061) — a route, never an account row.","properties":{"kind":{"const":"api_key_route","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"description":"An unpinned run has nothing routable, with a human reason.","properties":{"kind":{"const":"none","type":"string"},"reason":{"type":"string"}},"required":["kind","reason"],"type":"object"}],"description":"Server-computed pool routing verdict for one harness's unpinned runs (unified account model)."}},"required":["harness_id","next_up"],"type":"object"},"type":"array"},"git":{"additionalProperties":false,"description":"Git readiness from the same Accounts refresh cycle.","properties":{"detail":{"type":["string","null"]},"remediation":{"type":["string","null"]},"status":{"enum":["available","missing","developer_tools_stub","failed"],"type":"string"},"version":{"type":["string","null"]}},"required":["status","version","detail","remediation"],"type":"object"},"harnessAccounts":{"default":[],"description":"Per-harness accounts authority (INV-135): the native CLI-login pseudo-row state and the server-computed Active identity, so no surface re-derives the accounts symmetry. A unified-model engine emits [] here (the key must stay present for legacy strict clients) and carries routing facts in accountPools instead.","items":{"additionalProperties":false,"description":"Per-harness accounts authority: native CLI-login state + the informational next-up identity.","properties":{"harness_id":{"description":"Harness family these accounts belong to.","minLength":1,"type":"string"},"identity":{"anyOf":[{"additionalProperties":false,"description":"Non-secret {email, plan} identity of one account, derived daemon-side from a sanctioned scoped credential source or an allowlisted harness CLI status observation; never carries raw status or token material.","properties":{"email":{"description":"Login email of the account (codex id_token `email`, claude oauthAccount `emailAddress`, or an allowlisted harness CLI status observation).","minLength":1,"type":"string"},"plan":{"description":"Subscription/plan label (codex `chatgpt_plan_type` / claude oauthAccount `organizationType`).","minLength":1,"type":"string"}},"type":"object"},{"type":"null"}],"default":null,"description":"Non-secret {email, plan} of the native/CLI login, derived daemon-side from a sanctioned credential source or allowlisted harness CLI status observation; null when absent/undisclosed."},"native_credentials_enabled":{"description":"Whether the native/CLI login participates in this harness's credential ladder.","type":"boolean"},"native_login_detected":{"description":"Whether a native/default vendor login is currently detected available (the CLI login pseudo-row state).","type":"boolean"},"next_up":{"anyOf":[{"additionalProperties":false,"description":"An enabled credential profile is who an unpinned run routes to next.","properties":{"kind":{"const":"profile","type":"string"},"profileId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["kind","profileId"],"type":"object"},{"additionalProperties":false,"description":"The unprofiled/default credential is the subject of an unpinned run.","properties":{"kind":{"const":"native","type":"string"},"route":{"description":"Effective route of the unprofiled/default subject; omitted by older daemons.","enum":["local_session","api_key"],"type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"description":"An unpinned run has nothing routable (the default credential is disabled and no account is pinned).","properties":{"kind":{"const":"none","type":"string"},"reason":{"type":"string"}},"required":["kind","reason"],"type":"object"}],"description":"Server-computed identity an unpinned run of this harness would route to next."}},"required":["harness_id","native_credentials_enabled","native_login_detected","next_up"],"type":"object"},"type":"array"},"harnesses":{"description":"Fresh harness readiness used for the account next-up projection.","items":{"additionalProperties":false,"description":"Doctor-backed status row for one harness: status, intents, checks, and configured-model validity.","properties":{"authSources":{"default":[],"description":"Doctor-backed readiness by authentication source; an empty array means readiness was not reported.","items":{"additionalProperties":false,"description":"Doctor-backed readiness for one exact credential source.","properties":{"availability":{"enum":["available","unavailable","unknown"],"type":"string"},"detail":{"description":"Redacted human-readable source evidence.","type":"string"},"source":{"description":"Concrete credential source used or probed by a harness.","enum":["native_session","oauth_token_env","api_key_env","api_key_flag","provider_auth_file","none"],"type":"string"},"verification":{"enum":["passed","failed","not_run"],"type":"string"}},"required":["source","availability","verification"],"type":"object"},"type":"array"},"checks":{"default":[],"description":"Doctor probe results.","items":{"additionalProperties":false,"description":"Result of a conformance probe for one capability check.","properties":{"detail":{"description":"Human-readable detail for the outcome.","type":"string"},"duration_ms":{"description":"How long the check took, in milliseconds.","minimum":0,"type":"integer"},"id":{"description":"Check id.","type":"string"},"status":{"description":"Outcome of the check: pass, fail, or skip.","enum":["pass","fail","skip"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"configuredModel":{"default":null,"description":"The user's configured per-harness default model, if any.","type":["string","null"]},"configuredModelCheck":{"anyOf":[{"additionalProperties":false,"properties":{"message":{"default":null,"description":"Actionable rejection message, when rejected.","type":["string","null"]},"status":{"description":"Whether the configured model is admitted (listed, or unlisted on an advisory harness) or refused by an authoritative list.","enum":["ok","rejected"],"type":"string"}},"required":["status"],"type":"object"},{"type":"null"}],"default":null,"description":"Truth-source check of configuredModel under the harness's own absence declaration; ok with a message is an advisory admission; null when no model is configured."},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate capability projection for one harness and installed runtime.","properties":{"available":{"description":"Whether this harness can receive the packaged delegation belt.","type":"boolean"},"reason":{"description":"Stable reason for the current delegation capability verdict.","enum":["ready","runtime_unavailable","manifest_unsupported"],"type":"string"},"remediation":{"default":null,"description":"Concrete update/repair guidance when unavailable; null when ready.","type":["string","null"]},"requiresFullAccess":{"default":false,"description":"Whether this harness can reach the belt only under a full-access profile.","type":"boolean"}},"required":["available","reason"],"type":"object"},{"type":"null"}],"default":null,"description":"Engine-owned Delegate capability for this harness and installed runtime; null on legacy status rows."},"disabledIntents":{"default":[],"description":"Intents the doctor disabled.","items":{"type":"string"},"type":"array"},"enabledIntents":{"default":[],"description":"Intents the gateway will route to this harness.","items":{"type":"string"},"type":"array"},"id":{"description":"Harness id.","type":"string"},"manifest":{"anyOf":[{"additionalProperties":false,"description":"Static manifest an adapter declares for its harness: identity, kind, capabilities, auth modes, and access profiles.","properties":{"access_profiles_supported":{"default":[],"description":"Access profiles the adapter can enforce.","items":{"description":"Active filesystem/command access profile for a run: readonly (no writes), workspace_write (use the harness's native workspace-write policy), full (unrestricted; requires the per-repo trust allow for a run an operator starts at a surface, not for an execution.delegated run), inherit_native (defer to the harness's own native settings).","enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"type":"array"},"adapter_version":{"description":"Version of the Claudexor adapter itself.","type":"string"},"auth_modes":{"default":[],"description":"Auth modes the harness supports (availability only, not readiness).","items":{"enum":["local_session","api_key","none"],"type":"string"},"type":"array"},"capabilities":{"additionalProperties":false,"description":"Declared harness capabilities the engine actually consumes for intent gating, routing, knob support, and disclosure.","properties":{"browser_tool":{"default":false,"description":"The adapter can inject a browser-automation MCP server (Playwright MCP) the harness drives as browser_* tools; never injected when web policy is off.","type":"boolean"},"create_from_scratch":{"default":false,"description":"The harness can scaffold new projects (create_from_scratch intent).","type":"boolean"},"effort_levels":{"default":[],"description":"Ordered (weakest to strongest) reasoning-effort levels this harness accepts across all its models; empty means effort is not a tunable surface.","items":{"description":"Cross-harness reasoning-effort level as a lowercase slug (open vocabulary, mirroring the vendor contract); adapters advertise the levels they accept per model, ordered weakest to strongest by the vendor itself, and a shared normalizer passes advertised levels through, clamps inside the vendor order, places a word the vendor order lacks by the shared preference order (none < minimal < low < medium < high < xhigh < max < ultra) onto an advertised level, and refuses words neither order places.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"type":"array"},"effort_levels_verified_against":{"default":null,"description":"Vendor CLI version the effort ladders were last verified against; null = never verified / not applicable.","type":["string","null"]},"implement":{"default":false,"description":"The harness can implement code changes (implement intent).","type":"boolean"},"implementation_transport":{"default":"workspace","description":"Typed producer/consumer transport used when implement=true.","enum":["workspace","git_patch_envelope"],"type":"string"},"interactive":{"default":false,"description":"The adapter can surface interactive user questions (interaction_requested events) and deliver typed answers back into the live session.","type":"boolean"},"json_schema_output":{"default":false,"description":"The harness can constrain its final message to a caller-supplied JSON Schema (native structured-output flag).","type":"boolean"},"known_models":{"default":[],"description":"Manifest-declared model ids/aliases this harness accepts (bare string = every credential route; object form scopes a model to specific routes), used as the model truth source when the adapter has no live inventory and judged under model_inventory_absence: an authoritative harness refuses an explicit model outside it, an advisory harness forwards it with a note.","items":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"id":{"description":"Model id/alias.","minLength":1,"type":"string"},"routes":{"description":"Credential routes this model is available on.","items":{"enum":["local_session","api_key"],"type":"string"},"minItems":1,"type":"array"}},"required":["id","routes"],"type":"object"}]},"type":"array"},"known_models_verified_against":{"default":null,"description":"Vendor CLI version the known_models hints were last verified against; null = never verified / not applicable.","type":["string","null"]},"max_turns":{"default":false,"description":"Honors HarnessRunSpec.max_turns (e.g. a native --max-turns flag).","type":"boolean"},"model_effort_levels":{"additionalProperties":{"additionalProperties":false,"description":"Reasoning-effort vocabulary a single model advertises.","properties":{"default":{"anyOf":[{"description":"Cross-harness reasoning-effort level as a lowercase slug (open vocabulary, mirroring the vendor contract); adapters advertise the levels they accept per model, ordered weakest to strongest by the vendor itself, and a shared normalizer passes advertised levels through, clamps inside the vendor order, places a word the vendor order lacks by the shared preference order (none < minimal < low < medium < high < xhigh < max < ultra) onto an advertised level, and refuses words neither order places.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},{"type":"null"}],"default":null,"description":"The effort level the vendor uses for this model when none is requested."},"levels":{"default":[],"description":"Ordered (weakest to strongest) reasoning-effort levels this model advertises, in the vendor's own order.","items":{"description":"Cross-harness reasoning-effort level as a lowercase slug (open vocabulary, mirroring the vendor contract); adapters advertise the levels they accept per model, ordered weakest to strongest by the vendor itself, and a shared normalizer passes advertised levels through, clamps inside the vendor order, places a word the vendor order lacks by the shared preference order (none < minimal < low < medium < high < xhigh < max < ultra) onto an advertised level, and refuses words neither order places.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"type":"array"}},"type":"object"},"default":{},"description":"Per-model advertised reasoning-effort vocabulary keyed by model id; a model absent here falls back to the harness-wide effort_levels union.","type":"object"},"model_inventory_absence":{"description":"Whether an absence from this harness's model lists (the live models() answer and the manifest known_models alike) proves a model is ABSENT; omitted = authoritative (an unlisted model is refused). advisory = absence is not proof, so an explicit model is forwarded to the vendor and disclosed instead of refused.","enum":["authoritative","advisory"],"type":"string"},"model_inventory_routes":{"description":"Credential routes supported by the adapter's live models() producer; omitted preserves all-route support. Other routes use manifest known_models, never another account's live inventory.","items":{"enum":["local_session","api_key"],"type":"string"},"minItems":1,"type":"array"},"plan":{"default":false,"description":"The harness can produce plans (plan intent).","type":"boolean"},"processing_preferences":{"description":"Service preferences translated by this adapter; model/account support is separate.","items":{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},"type":"array"},"read_files":{"default":false,"description":"The harness can read project files.","type":"boolean"},"review":{"default":false,"description":"The harness can act as a reviewer (review intent).","type":"boolean"},"structured_output_channel":{"default":"final_message","description":"Where a schema-constrained answer surfaces: side_tool (rides a tool; final message stays markdown) or final_message (constrains the final message itself).","enum":["side_tool","final_message"],"type":"string"},"synthesize":{"default":false,"description":"The harness can synthesize across candidate outputs (synthesize intent).","type":"boolean"},"tool_lists":{"default":false,"description":"Honors tool_permission_policy allow/deny lists (e.g. a native --allowedTools flag).","type":"boolean"},"verify":{"default":false,"description":"The harness can act as the FinalVerifier (verify intent).","type":"boolean"},"web_policy":{"default":"none","description":"How a harness can honor the external web policy: native (a native config surface), tools (permissioned tools the adapter can allow/deny), uncontrolled (can reach the web but exposes no enforceable switch), or none (no web access at all).","enum":["native","tools","uncontrolled","none"],"type":"string"},"work_report_transport":{"default":"unsupported","description":"How the harness carries the D-16 WorkReport envelope: constrained (native schema transport), validated (instructed terminal metadata), or unsupported (work_state stays unverified).","enum":["constrained","validated","unsupported"],"type":"string"}},"type":"object"},"capability_profile":{"additionalProperties":false,"default":{},"description":"Structured per-harness facts the engine consumes: auth routing, isolation containment, readonly mechanism, finite attachment inputs, MCP injection, live input into a running session, and translated prompt-cache lifetimes.","properties":{"access_control":{"additionalProperties":false,"default":{},"description":"Declared access-control facts for a harness.","properties":{"auxiliary_writable_roots":{"default":false,"description":"The adapter applies HarnessRunSpec.auxiliary_writable_roots natively under workspace_write, and a later spec carrying none receives no earlier grant; false = such a lane refuses (explicit pool) or is filtered (auto pool).","type":"boolean"},"readonly_mechanism":{"default":"none","description":"How read-only access is enforced for a harness: a filesystem sandbox, permission denial, a tool allowlist, or none (read-only intent is advisory).","enum":["fs_sandbox","permission_deny","tool_allowlist","none"],"type":"string"},"write_mechanism":{"default":"none","description":"How workspace_write access is CONFINED for a harness: a filesystem/network base sandbox (codex seatbelt; the harness's native automatic reviewer may still admit individual actions outside it, so fs_sandbox does not mean every admitted action stays inside), a tool-permission policy with no FS/network fence (claude — an allowed shell is unconfined), or none (write intent is advisory).","enum":["fs_sandbox","tool_policy","none"],"type":"string"}},"type":"object"},"attachment_inputs":{"default":[],"items":{"additionalProperties":false,"description":"Finite MIME, size, count and transport limits declared by one adapter.","properties":{"kind":{"description":"Kind of attached resource: image input or generic file bytes.","enum":["image","file"],"type":"string"},"max_bytes":{"exclusiveMinimum":0,"type":"integer"},"max_count":{"exclusiveMinimum":0,"type":"integer"},"mime_types":{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"transport":{"description":"Native adapter transport used for one supported attachment class.","enum":["file_path","base64_stream","base64_inline","text_inline"],"type":"string"}},"required":["kind","mime_types","max_bytes","max_count","transport"],"type":"object"},"type":"array"},"auth":{"additionalProperties":false,"default":{},"description":"Declared auth routing facts for a harness.","properties":{"credential_profile_policies":{"description":"Platform-specific profile identity/cardinality/cleanup policy; absent uses the backward-compatible profile-scoped, unbounded, Claudexor-owned defaults.","items":{"additionalProperties":false,"description":"Platform-specific identity scope, enabled-profile cardinality, and credential cleanup ownership for one auth source.","properties":{"cleanup_owner":{"description":"Who owns cleanup of the credential when its Claudexor profile binding is removed.","enum":["claudexor","vendor"],"type":"string"},"identity_scope":{"description":"Identity boundary selected by a credential profile: the named profile itself or the host OS user/login vault.","enum":["profile","os_user"],"type":"string"},"max_enabled_profiles":{"anyOf":[{"exclusiveMinimum":0,"type":"integer"},{"type":"null"}],"description":"Maximum enabled profile bindings on these platforms; null means unbounded."},"platforms":{"description":"Nonempty host-platform set governed by this policy row.","items":{"description":"Host platform used to resolve credential and managed-login policy.","enum":["darwin","linux","win32"],"type":"string"},"minItems":1,"type":"array"},"source":{"description":"Concrete credential source used or probed by a harness.","enum":["native_session","oauth_token_env","api_key_env","api_key_flag","provider_auth_file","none"],"type":"string"}},"required":["source","platforms","identity_scope","max_enabled_profiles","cleanup_owner"],"type":"object"},"type":"array"},"credential_transports":{"default":[],"description":"Declared credential transports per auth source.","items":{"additionalProperties":false,"description":"How a credential from one auth source physically reaches the harness process.","properties":{"kind":{"description":"Mechanism that carries a credential to the harness process (config file, env var, OAuth token env, OS keychain, HTTP header, or none).","enum":["config_file","env_var","oauth_token_env","os_keychain","http_header","none"],"type":"string"},"platforms":{"description":"Host platforms on which this physical credential transport applies; absent means every supported platform for backward compatibility.","items":{"description":"Host platform used to resolve credential and managed-login policy.","enum":["darwin","linux","win32"],"type":"string"},"minItems":1,"type":"array"},"relocatable_by":{"default":[],"description":"Relocation levers that can move this transport into a scoped environment.","items":{"description":"Which relocation lever moves the credential into a scoped environment (HOME, a config dir override, env injection, or none).","enum":["HOME","CONFIG_DIR","ENV","none"],"type":"string"},"type":"array"},"source":{"description":"Concrete credential source used or probed by a harness.","enum":["native_session","oauth_token_env","api_key_env","api_key_flag","provider_auth_file","none"],"type":"string"}},"required":["source","kind"],"type":"object"},"type":"array"},"managed_login":{"anyOf":[{"additionalProperties":false,"description":"Managed-login input requirement; command, argv, flow, and time window remain owned by the native-login registry.","properties":{"stdin":{"description":"Input transport the vendor login command requires.","enum":["none","pipe","terminal"],"type":"string"}},"required":["stdin"],"type":"object"},{"type":"null"}],"description":"Managed subscription-login input requirement; null means this harness defines no managed login, absent is a legacy manifest."},"preferred_source":{"anyOf":[{"description":"Concrete credential source used or probed by a harness.","enum":["native_session","oauth_token_env","api_key_env","api_key_flag","provider_auth_file","none"],"type":"string"},{"type":"null"}],"default":null,"description":"Auth source the adapter prefers; null when it has no preference."},"supported_sources":{"default":[],"description":"Auth sources this harness supports.","items":{"description":"Concrete credential source used or probed by a harness.","enum":["native_session","oauth_token_env","api_key_env","api_key_flag","provider_auth_file","none"],"type":"string"},"type":"array"}},"type":"object"},"input_limits":{"items":{"additionalProperties":false,"description":"Adapter-owned observed input bound, not a predictive refusal or a model-window claim.","properties":{"limit":{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"},"verified_against":{"description":"Native runtime version against which the bound was observed.","minLength":1,"type":"string"}},"required":["scope","unit","limit","source","verified_against"],"type":"object"},"type":"array"},"isolation":{"additionalProperties":false,"default":{},"description":"Declared isolation containment facts for a harness.","properties":{"supported_containment":{"default":["env_or_file_injection"],"description":"Containment mechanisms the adapter can run under.","items":{"description":"Isolation containment level an adapter supports for run environments, from env/file injection through scoped-HOME keychain bridging or a private per-profile keychain to process sandboxes and containers.","enum":["env_or_file_injection","scoped_home_keychain_bridge","private_per_profile_keychain","host_user_context","process_sandbox","container"],"type":"string"},"type":"array"}},"type":"object"},"live_input":{"default":"none","description":"How a live message enters a running session: mid_turn (consumed inside the active turn), next_tool_boundary (queued until the same turn's next tool boundary), none (no truthful channel; the engine answers unsupported).","enum":["mid_turn","next_tool_boundary","none"],"type":"string"},"mcp_injection":{"default":false,"description":"The adapter can inject engine-owned MCP servers into the harness sandbox (browser tool, delegation belt); false = browser MCP is refused and Delegate degrades to ordinary Agent with a durable typed receipt.","type":"boolean"},"mcp_injection_requires_full_access":{"default":false,"description":"An injected MCP server can only reach the daemon (belt) at full access; below it the harness sandbox cancels the call. true => Delegate below full access degrades to ordinary Agent with a durable typed receipt.","type":"boolean"},"prompt_cache_ttls":{"description":"Prompt-cache lifetimes this adapter translates into native controls; a requested lifetime outside the list (or with the list absent) is disclosed as ignored.","items":{"description":"Native prompt-cache lifetime for the main conversation and helper requests of a harness that declares it. Omission sends no override: native defaults, profile settings and the inherited environment stay in effect.","enum":["5m","1h"],"type":"string"},"type":"array"}},"type":"object"},"display_name":{"description":"Human display name of the harness.","type":"string"},"id":{"description":"Harness id (codex, claude, cursor, opencode, raw-api, ...).","minLength":1,"type":"string"},"kind":{"description":"Kind of harness adapter: a local vendor CLI, a remote API, or a fake used for tests.","enum":["local_cli","remote_api","fake"],"type":"string"},"provider_family":{"default":"unknown","description":"Vendor/provider family a harness routes to, used for route-diversity reasoning; open-ended via \"unknown\".","enum":["openai","anthropic","google","cursor","opencode","xai","local","unknown"],"type":"string"},"version":{"description":"Vendor CLI/API version, when discovered.","type":"string"}},"required":["id","display_name","kind","capabilities"],"type":"object"},{"type":"null"}],"description":"The harness's declared manifest, when available."},"readiness":{"default":[],"description":"Display-ready readiness checks, daemon-normalized from the raw evidence.","items":{"additionalProperties":false,"description":"One display-ready readiness check row (daemon-normalized).","properties":{"detail":{"default":null,"description":"Redacted human-readable evidence for the outcome.","type":["string","null"]},"id":{"description":"Stable machine id of the check (adapter probe id or auth source).","type":"string"},"kind":{"description":"What KIND of readiness this is: binary presence, credential source, isolated smoke, configured-model validity, or a generic capability probe.","enum":["binary","auth","smoke","model","probe"],"type":"string"},"status":{"description":"Outcome; skip = not run / not applicable.","enum":["pass","fail","skip"],"type":"string"},"title":{"description":"Human display name of the check.","type":"string"}},"required":["id","kind","title","status"],"type":"object"},"type":"array"},"reasons":{"default":[],"description":"Human-readable reasons for degraded/unavailable status.","items":{"type":"string"},"type":"array"},"routableIntents":{"default":[],"description":"Intents the harness is actually routable for right now (doctor-gated); the server-side availability truth surfaces must read instead of re-deriving.","items":{"type":"string"},"type":"array"},"setupLogin":{"anyOf":[{"additionalProperties":false,"description":"Effective setup-login flow for this harness on the current host.","properties":{"mode":{"description":"in_app requests the daemon-hosted login flow; external_terminal requests the existing client PTY flow.","enum":["in_app","external_terminal"],"type":"string"}},"required":["mode"],"type":"object"},{"type":"null"}],"description":"Effective setup-login flow for this harness on the current host; current producers emit null or an object, while omission identifies a legacy row."},"status":{"description":"Doctor verdict for a harness: ok (usable), degraded (usable with limitations), or unavailable.","enum":["ok","degraded","unavailable"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"profiles":{"description":"Every registered credential profile paired with its doctor readiness projection and non-secret identity.","items":{"additionalProperties":false,"properties":{"identity":{"anyOf":[{"additionalProperties":false,"description":"Non-secret {email, plan} identity of one account, derived daemon-side from a sanctioned scoped credential source or an allowlisted harness CLI status observation; never carries raw status or token material.","properties":{"email":{"description":"Login email of the account (codex id_token `email`, claude oauthAccount `emailAddress`, or an allowlisted harness CLI status observation).","minLength":1,"type":"string"},"plan":{"description":"Subscription/plan label (codex `chatgpt_plan_type` / claude oauthAccount `organizationType`).","minLength":1,"type":"string"}},"type":"object"},{"type":"null"}],"default":null,"description":"Non-secret {email, plan} of this profile, derived daemon-side from its scoped credential source or allowlisted harness CLI status observation; null when absent/undisclosed."},"profile":{"additionalProperties":false,"description":"Durable non-secret named binding for one harness; credential material may live in Claudexor-owned scoped state, a managed secret store, or a platform-declared vendor/OS-user store, never in this row.","properties":{"created_at":{"anyOf":[{"description":"ISO-8601 timestamp string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"When the profile was registered; null for hand-written config entries."},"credential_kind":{"description":"Binding kind for a profile: Claudexor-owned scoped vendor state, a managed OAuth secret, or a managed API-key secret; a vendor OS-user credential may remain outside that state.","enum":["config_dir_login","oauth_token","api_key"],"type":"string"},"display_name":{"description":"Human label shown wherever the profile appears.","minLength":1,"type":"string"},"enabled":{"default":true,"description":"Disabled profiles are never routable.","type":"boolean"},"harness_id":{"description":"Harness family this profile belongs to.","minLength":1,"type":"string"},"isolation_locator":{"default":null,"description":"Canonical absolute path to Claudexor-owned scoped vendor state for config_dir_login bindings; null for secret-ref kinds.","type":["string","null"]},"profile_id":{"description":"Stable user-chosen profile identifier (unique per harness).","minLength":1,"type":"string"},"secret_ref":{"default":null,"description":"Namespaced secret-store name (e.g. claude_oauth:work) for oauth_token/api_key profiles; null for config_dir_login.","type":["string","null"]}},"required":["profile_id","harness_id","display_name","credential_kind"],"type":"object"},"status":{"additionalProperties":false,"description":"Doctor-owned readiness projection for one credential profile; never durable config.","properties":{"availability":{"enum":["available","unavailable","unknown"],"type":"string"},"detail":{"description":"Redacted human-readable probe evidence.","type":"string"},"harness_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"last_verified_at":{"anyOf":[{"description":"ISO-8601 timestamp string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"When the verification verdict was established, by the method named in verification_source; null = never verified."},"profile_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"stale":{"description":"True only for a bounded stale last-known-good observation; stale is never a fresh passed verification.","type":"boolean"},"stale_age_ms":{"description":"Age in milliseconds of the bounded stale observation, when stale is true.","minimum":0,"type":"integer"},"stale_basis":{"description":"Basis of a stale observation: last_positive_after_timeout = the status probe did not answer within its budget and this row store's last positive status answer, still inside its bounded interval, stands in; unpinned pool admission alone may consume it. Absent = the generic last-known-good grace, consumable only by an already selected route.","enum":["last_positive_after_timeout"],"type":"string"},"verification":{"enum":["passed","failed","not_run"],"type":"string"},"verification_source":{"default":"local_store","description":"How the verification verdict was reached: local_store = the binding's required local state or managed secret is present (says nothing about a token being live); vendor = the vendor answered under the exact binding environment and effective platform credential policy.","enum":["local_store","vendor"],"type":"string"}},"required":["profile_id","harness_id","availability","verification"],"type":"object"}},"required":["profile","status"],"type":"object"},"type":"array"},"quota":{"additionalProperties":false,"description":"Fresh quota response used to compute next-up in this exact Accounts snapshot epoch, decorated with the same server-owned availability projection as /v2/quota.","properties":{"absences":{"default":[],"description":"Every registered subject reports a snapshot or a typed absence; a refresh gap may coexist with a stale last-known snapshot.","items":{"additionalProperties":false,"description":"A registered subject's typed quota observation gap; may accompany stale last-known data.","properties":{"detail":{"default":null,"type":["string","null"]},"observed_at":{"format":"date-time","type":"string"},"reason":{"description":"Why a registered subject has no fresh quota snapshot, in the source's own vocabulary.","enum":["not_logged_in","transport_unavailable","platform_unsupported","refresh_failed","no_source","auth_revoked","rate_limited","probe_skipped_rate_limited","poll_paced","credential_profile_ambiguous"],"type":"string"},"retry_after_ms":{"minimum":0,"type":"integer"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"}},"required":["subject","reason","observed_at"],"type":"object"},"type":"array"},"refresh_skipped":{"items":{"additionalProperties":false,"description":"One subject a refresh cycle did not re-fetch because its poll rate-limit cooldown is active, or a retained legacy vendor floor when subject is absent; its snapshots/absences in the same response are last-known registry data.","properties":{"not_before":{"format":"date-time","type":"string"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"},"vendor":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["vendor","not_before"],"type":"object"},"type":"array"},"refreshed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"snapshots":{"items":{"additionalProperties":false,"description":"One vendor-owned quota snapshot plus its derived availability projection.","properties":{"availability":{"additionalProperties":false,"description":"Typed server-owned availability projection derived at the /v2/quota and atomic Accounts response boundaries; absent from raw journal/projection storage.","properties":{"blocking_constraints":{"description":"Ids of the constraints that produced a non-available state.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"model_scoped_exhaustions":{"description":"Every spent/cooling model-scoped window, listed regardless of state so consumers see partial exhaustion without re-deriving constraint scope.","items":{"additionalProperties":false,"description":"A spent or cooling window that applies only to the named models or declared model-id prefixes. Without a requested model only a window that DECLARES it governs the unspecified-model route can exhaust the subject; when the request names a model it covers, it blocks that request too (and is then also listed in blocking_constraints). resets_at is its earliest known release instant (null = unknown).","properties":{"applies_to_model_prefixes":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"applies_to_models":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"constraint_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}},"required":["constraint_id","applies_to_models","resets_at"],"type":"object"},"type":"array"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Earliest known instant at which any blocking constraint may release; null when nothing blocks or no reset is known."},"state":{"description":"Spendability verdict for one snapshot: exhausted = a spent window blocks every applicable request; cooldown = an applicable window is only rate-limit-cooling; available = nothing applicable blocks.","enum":["available","exhausted","cooldown"],"type":"string"}},"required":["state","blocking_constraints","resets_at","model_scoped_exhaustions"],"type":"object"},"constraints":{"items":{"additionalProperties":false,"description":"One independent vendor quota window; without model ids or declared prefixes it applies to every model, and null usage stays unknown.","properties":{"applies_to_model_prefixes":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"applies_to_models":{"anyOf":[{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},{"type":"null"}]},"applies_to_request_kinds":{"description":"Vendor-declared operation scope. Absent applies to both text and image; model scope still applies independently.","items":{"enum":["text","image"],"type":"string"},"minItems":1,"type":"array"},"applies_to_unspecified_model":{"type":"boolean"},"cooldown_until":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null},"id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"label":{"minLength":1,"type":"string"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"used_ratio":{"anyOf":[{"maximum":1,"minimum":0,"type":"number"},{"type":"null"}]},"window_seconds":{"anyOf":[{"exclusiveMinimum":0,"type":"number"},{"type":"null"}]}},"required":["id","label","used_ratio","window_seconds","resets_at"],"type":"object"},"type":"array"},"freshness":{"description":"Freshness of a quota snapshot at read time.","enum":["fresh","stale","unknown"],"type":"string"},"observed_at":{"format":"date-time","type":"string"},"snapshot_id":{"description":"Server-derived stable snapshot identity for consumers; absent from raw journal evidence and optional for legacy responses.","minLength":1,"type":"string"},"source":{"description":"Machine-readable source of quota evidence, classified by schema-owned traits.","enum":["codex_app_server","codex_rollout","claude_statusline","claude_api_retry","claude_oauth_usage","agy_command_usage","cursor_rate_limit","grok_rate_limit","claude_rate_limit_event","codex_app_server_event","codex_image_response"],"type":"string"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"}},"required":["subject","constraints","source","observed_at","freshness"],"type":"object"},"type":"array"}},"required":["snapshots","refreshed_at"],"type":"object"},"quotaEventCursor":{"description":"Opaque global-journal cursor fencing the returned quota response; pass it verbatim as Last-Event-ID only for the dedicated quota event observer, never the general stream.","maxLength":4096,"minLength":1,"type":"string"},"routingEvidence":{"additionalProperties":false,"description":"Model-scoped routing evidence; absent when the engine predates the read or the read failed.","properties":{"capabilities":{"description":"Temporary capability marks; absent from engines that predate them. A mark clears on a success there or a catalog or credential change; after expires_at one operation may probe the account.","items":{"additionalProperties":false,"description":"A temporary capability mark for one account and one model. It only orders auto selection: the account stays enabled and usable as a last fallback.","properties":{"account_fingerprint":{"description":"Provider account identity the mark is bound to; null when the adapter has none.","type":["string","null"]},"expires_at":{"description":"Probe becomes eligible at this time; not a vendor reset.","minLength":1,"type":"string"},"harness_id":{"description":"Harness family of the account.","minLength":1,"type":"string"},"observed_at":{"description":"Start of this mark's episode, when its row was created (a recognized refusal, or the service elsewhere that confirmed an unrecognized one); renewals and probes keep it.","minLength":1,"type":"string"},"profile_id":{"description":"Account row that refused this model before generation started.","minLength":1,"type":"string"},"provider_reason":{"description":"Latest refusal diagnostic, redacted and at most 1024 characters: the provider's reason for a recognized refusal, the engine's message and vendor code otherwise.","type":"string"},"requested_model":{"description":"Model the refused request named.","type":"string"},"state":{"description":"provisional = refused here; confirmed = another account then served the correlated retry; probe_due = expired, the next selection may probe it; probing = one operation holds that probe.","enum":["provisional","confirmed","probe_due","probing"],"type":"string"}},"required":["harness_id","profile_id","requested_model","account_fingerprint","provider_reason","observed_at","expires_at","state"],"type":"object"},"type":"array"},"lastService":{"description":"Latest observed service per registered account and requested model, most recent service first.","items":{"additionalProperties":false,"description":"The latest observed service of one account for one requested model under its current credential binding.","properties":{"harness_id":{"description":"Harness family of the account.","minLength":1,"type":"string"},"observed_at":{"description":"When the account was observed serving that request.","minLength":1,"type":"string"},"profile_id":{"description":"Account row that served the request.","minLength":1,"type":"string"},"requested_model":{"description":"Model the run asked for; null = the harness default model.","type":["string","null"]}},"required":["harness_id","profile_id","requested_model","observed_at"],"type":"object"},"type":"array"},"refusals":{"description":"Live pre-progress refusal observations, each scoped to one requested model.","items":{"additionalProperties":false,"description":"A bounded, self-expiring typed observation that an account refused a started session before any progress; it orders the account pool and never excludes a row.","properties":{"expires_at":{"description":"Self-expiry instant (observation retention, not a vendor reset time); after this the observation is ignored.","minLength":1,"type":"string"},"harness_id":{"description":"Harness family the observed account belongs to.","minLength":1,"type":"string"},"observed_at":{"description":"When the pre-progress refusal was observed.","minLength":1,"type":"string"},"profile_id":{"description":"Account row whose started session was refused before progress.","minLength":1,"type":"string"},"requested_model":{"description":"Model the run asked this account for; null = the harness default model.","type":["string","null"]}},"required":["harness_id","profile_id","requested_model","observed_at","expires_at"],"type":"object"},"type":"array"}},"required":["refusals","lastService"],"type":"object"},"routingEvidenceProblem":{"description":"One diagnostic when the routing-evidence read failed; the account listing is still authoritative.","type":"string"}},"required":["profiles","harnesses","git","quota","quotaEventCursor"],"type":"object"},{"additionalProperties":false,"description":"Atomic Accounts snapshot: profiles, next-up authority, fresh harness readiness, Git capability, and quota from one server-authored epoch.","properties":{"accountPools":{"default":[],"description":"Additive per-harness pool authority of the unified account model: routing facts (next_up incl. the api_key_route kind) live here so legacy strict next_up decoders never see unknown kinds. Old clients ignore this key.","items":{"additionalProperties":false,"description":"Per-harness pool authority (unified account model): who an unpinned run routes to next.","properties":{"harness_id":{"description":"Harness family this pool verdict belongs to.","minLength":1,"type":"string"},"next_up":{"anyOf":[{"additionalProperties":false,"description":"An enabled account row is who an unpinned run routes to next.","properties":{"kind":{"const":"profile","type":"string"},"profileId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["kind","profileId"],"type":"object"},{"additionalProperties":false,"description":"The account pool is empty or exhausted; the unpinned route is the policy-governed API key (INV-061) — a route, never an account row.","properties":{"kind":{"const":"api_key_route","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"description":"An unpinned run has nothing routable, with a human reason.","properties":{"kind":{"const":"none","type":"string"},"reason":{"type":"string"}},"required":["kind","reason"],"type":"object"}],"description":"Server-computed pool routing verdict for one harness's unpinned runs (unified account model)."}},"required":["harness_id","next_up"],"type":"object"},"type":"array"},"git":{"additionalProperties":false,"description":"Git readiness from the same Accounts refresh cycle.","properties":{"detail":{"type":["string","null"]},"remediation":{"type":["string","null"]},"status":{"enum":["available","missing","developer_tools_stub","failed"],"type":"string"},"version":{"type":["string","null"]}},"required":["status","version","detail","remediation"],"type":"object"},"harnessAccounts":{"default":[],"description":"Per-harness accounts authority (INV-135): the native CLI-login pseudo-row state and the server-computed Active identity, so no surface re-derives the accounts symmetry. A unified-model engine emits [] here (the key must stay present for legacy strict clients) and carries routing facts in accountPools instead.","items":{"additionalProperties":false,"description":"Per-harness accounts authority: native CLI-login state + the informational next-up identity.","properties":{"harness_id":{"description":"Harness family these accounts belong to.","minLength":1,"type":"string"},"identity":{"anyOf":[{"additionalProperties":false,"description":"Non-secret {email, plan} identity of one account, derived daemon-side from a sanctioned scoped credential source or an allowlisted harness CLI status observation; never carries raw status or token material.","properties":{"email":{"description":"Login email of the account (codex id_token `email`, claude oauthAccount `emailAddress`, or an allowlisted harness CLI status observation).","minLength":1,"type":"string"},"plan":{"description":"Subscription/plan label (codex `chatgpt_plan_type` / claude oauthAccount `organizationType`).","minLength":1,"type":"string"}},"type":"object"},{"type":"null"}],"default":null,"description":"Non-secret {email, plan} of the native/CLI login, derived daemon-side from a sanctioned credential source or allowlisted harness CLI status observation; null when absent/undisclosed."},"native_credentials_enabled":{"description":"Whether the native/CLI login participates in this harness's credential ladder.","type":"boolean"},"native_login_detected":{"description":"Whether a native/default vendor login is currently detected available (the CLI login pseudo-row state).","type":"boolean"},"next_up":{"anyOf":[{"additionalProperties":false,"description":"An enabled credential profile is who an unpinned run routes to next.","properties":{"kind":{"const":"profile","type":"string"},"profileId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["kind","profileId"],"type":"object"},{"additionalProperties":false,"description":"The unprofiled/default credential is the subject of an unpinned run.","properties":{"kind":{"const":"native","type":"string"},"route":{"description":"Effective route of the unprofiled/default subject; omitted by older daemons.","enum":["local_session","api_key"],"type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"description":"An unpinned run has nothing routable (the default credential is disabled and no account is pinned).","properties":{"kind":{"const":"none","type":"string"},"reason":{"type":"string"}},"required":["kind","reason"],"type":"object"}],"description":"Server-computed identity an unpinned run of this harness would route to next."}},"required":["harness_id","native_credentials_enabled","native_login_detected","next_up"],"type":"object"},"type":"array"},"harnesses":{"description":"Fresh harness readiness used for the account next-up projection.","items":{"additionalProperties":false,"description":"Doctor-backed status row for one harness: status, intents, checks, and configured-model validity.","properties":{"authSources":{"default":[],"description":"Doctor-backed readiness by authentication source; an empty array means readiness was not reported.","items":{"additionalProperties":false,"description":"Doctor-backed readiness for one exact credential source.","properties":{"availability":{"enum":["available","unavailable","unknown"],"type":"string"},"detail":{"description":"Redacted human-readable source evidence.","type":"string"},"source":{"description":"Concrete credential source used or probed by a harness.","enum":["native_session","oauth_token_env","api_key_env","api_key_flag","provider_auth_file","none"],"type":"string"},"verification":{"enum":["passed","failed","not_run"],"type":"string"}},"required":["source","availability","verification"],"type":"object"},"type":"array"},"checks":{"default":[],"description":"Doctor probe results.","items":{"additionalProperties":false,"description":"Result of a conformance probe for one capability check.","properties":{"detail":{"description":"Human-readable detail for the outcome.","type":"string"},"duration_ms":{"description":"How long the check took, in milliseconds.","minimum":0,"type":"integer"},"id":{"description":"Check id.","type":"string"},"status":{"description":"Outcome of the check: pass, fail, or skip.","enum":["pass","fail","skip"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"configuredModel":{"default":null,"description":"The user's configured per-harness default model, if any.","type":["string","null"]},"configuredModelCheck":{"anyOf":[{"additionalProperties":false,"properties":{"message":{"default":null,"description":"Actionable rejection message, when rejected.","type":["string","null"]},"status":{"description":"Whether the configured model is admitted (listed, or unlisted on an advisory harness) or refused by an authoritative list.","enum":["ok","rejected"],"type":"string"}},"required":["status"],"type":"object"},{"type":"null"}],"default":null,"description":"Truth-source check of configuredModel under the harness's own absence declaration; ok with a message is an advisory admission; null when no model is configured."},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate capability projection for one harness and installed runtime.","properties":{"available":{"description":"Whether this harness can receive the packaged delegation belt.","type":"boolean"},"reason":{"description":"Stable reason for the current delegation capability verdict.","enum":["ready","runtime_unavailable","manifest_unsupported"],"type":"string"},"remediation":{"default":null,"description":"Concrete update/repair guidance when unavailable; null when ready.","type":["string","null"]},"requiresFullAccess":{"default":false,"description":"Whether this harness can reach the belt only under a full-access profile.","type":"boolean"}},"required":["available","reason"],"type":"object"},{"type":"null"}],"default":null,"description":"Engine-owned Delegate capability for this harness and installed runtime; null on legacy status rows."},"disabledIntents":{"default":[],"description":"Intents the doctor disabled.","items":{"type":"string"},"type":"array"},"enabledIntents":{"default":[],"description":"Intents the gateway will route to this harness.","items":{"type":"string"},"type":"array"},"id":{"description":"Harness id.","type":"string"},"manifest":{"anyOf":[{"additionalProperties":false,"description":"Static manifest an adapter declares for its harness: identity, kind, capabilities, auth modes, and access profiles.","properties":{"access_profiles_supported":{"default":[],"description":"Access profiles the adapter can enforce.","items":{"description":"Active filesystem/command access profile for a run: readonly (no writes), workspace_write (use the harness's native workspace-write policy), full (unrestricted; requires the per-repo trust allow for a run an operator starts at a surface, not for an execution.delegated run), inherit_native (defer to the harness's own native settings).","enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"type":"array"},"adapter_version":{"description":"Version of the Claudexor adapter itself.","type":"string"},"auth_modes":{"default":[],"description":"Auth modes the harness supports (availability only, not readiness).","items":{"enum":["local_session","api_key","none"],"type":"string"},"type":"array"},"capabilities":{"additionalProperties":false,"description":"Declared harness capabilities the engine actually consumes for intent gating, routing, knob support, and disclosure.","properties":{"browser_tool":{"default":false,"description":"The adapter can inject a browser-automation MCP server (Playwright MCP) the harness drives as browser_* tools; never injected when web policy is off.","type":"boolean"},"create_from_scratch":{"default":false,"description":"The harness can scaffold new projects (create_from_scratch intent).","type":"boolean"},"effort_levels":{"default":[],"description":"Ordered (weakest to strongest) reasoning-effort levels this harness accepts across all its models; empty means effort is not a tunable surface.","items":{"description":"Cross-harness reasoning-effort level as a lowercase slug (open vocabulary, mirroring the vendor contract); adapters advertise the levels they accept per model, ordered weakest to strongest by the vendor itself, and a shared normalizer passes advertised levels through, clamps inside the vendor order, places a word the vendor order lacks by the shared preference order (none < minimal < low < medium < high < xhigh < max < ultra) onto an advertised level, and refuses words neither order places.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"type":"array"},"effort_levels_verified_against":{"default":null,"description":"Vendor CLI version the effort ladders were last verified against; null = never verified / not applicable.","type":["string","null"]},"implement":{"default":false,"description":"The harness can implement code changes (implement intent).","type":"boolean"},"implementation_transport":{"default":"workspace","description":"Typed producer/consumer transport used when implement=true.","enum":["workspace","git_patch_envelope"],"type":"string"},"interactive":{"default":false,"description":"The adapter can surface interactive user questions (interaction_requested events) and deliver typed answers back into the live session.","type":"boolean"},"json_schema_output":{"default":false,"description":"The harness can constrain its final message to a caller-supplied JSON Schema (native structured-output flag).","type":"boolean"},"known_models":{"default":[],"description":"Manifest-declared model ids/aliases this harness accepts (bare string = every credential route; object form scopes a model to specific routes), used as the model truth source when the adapter has no live inventory and judged under model_inventory_absence: an authoritative harness refuses an explicit model outside it, an advisory harness forwards it with a note.","items":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"id":{"description":"Model id/alias.","minLength":1,"type":"string"},"routes":{"description":"Credential routes this model is available on.","items":{"enum":["local_session","api_key"],"type":"string"},"minItems":1,"type":"array"}},"required":["id","routes"],"type":"object"}]},"type":"array"},"known_models_verified_against":{"default":null,"description":"Vendor CLI version the known_models hints were last verified against; null = never verified / not applicable.","type":["string","null"]},"max_turns":{"default":false,"description":"Honors HarnessRunSpec.max_turns (e.g. a native --max-turns flag).","type":"boolean"},"model_effort_levels":{"additionalProperties":{"additionalProperties":false,"description":"Reasoning-effort vocabulary a single model advertises.","properties":{"default":{"anyOf":[{"description":"Cross-harness reasoning-effort level as a lowercase slug (open vocabulary, mirroring the vendor contract); adapters advertise the levels they accept per model, ordered weakest to strongest by the vendor itself, and a shared normalizer passes advertised levels through, clamps inside the vendor order, places a word the vendor order lacks by the shared preference order (none < minimal < low < medium < high < xhigh < max < ultra) onto an advertised level, and refuses words neither order places.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},{"type":"null"}],"default":null,"description":"The effort level the vendor uses for this model when none is requested."},"levels":{"default":[],"description":"Ordered (weakest to strongest) reasoning-effort levels this model advertises, in the vendor's own order.","items":{"description":"Cross-harness reasoning-effort level as a lowercase slug (open vocabulary, mirroring the vendor contract); adapters advertise the levels they accept per model, ordered weakest to strongest by the vendor itself, and a shared normalizer passes advertised levels through, clamps inside the vendor order, places a word the vendor order lacks by the shared preference order (none < minimal < low < medium < high < xhigh < max < ultra) onto an advertised level, and refuses words neither order places.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"type":"array"}},"type":"object"},"default":{},"description":"Per-model advertised reasoning-effort vocabulary keyed by model id; a model absent here falls back to the harness-wide effort_levels union.","type":"object"},"model_inventory_absence":{"description":"Whether an absence from this harness's model lists (the live models() answer and the manifest known_models alike) proves a model is ABSENT; omitted = authoritative (an unlisted model is refused). advisory = absence is not proof, so an explicit model is forwarded to the vendor and disclosed instead of refused.","enum":["authoritative","advisory"],"type":"string"},"model_inventory_routes":{"description":"Credential routes supported by the adapter's live models() producer; omitted preserves all-route support. Other routes use manifest known_models, never another account's live inventory.","items":{"enum":["local_session","api_key"],"type":"string"},"minItems":1,"type":"array"},"plan":{"default":false,"description":"The harness can produce plans (plan intent).","type":"boolean"},"processing_preferences":{"description":"Service preferences translated by this adapter; model/account support is separate.","items":{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},"type":"array"},"read_files":{"default":false,"description":"The harness can read project files.","type":"boolean"},"review":{"default":false,"description":"The harness can act as a reviewer (review intent).","type":"boolean"},"structured_output_channel":{"default":"final_message","description":"Where a schema-constrained answer surfaces: side_tool (rides a tool; final message stays markdown) or final_message (constrains the final message itself).","enum":["side_tool","final_message"],"type":"string"},"synthesize":{"default":false,"description":"The harness can synthesize across candidate outputs (synthesize intent).","type":"boolean"},"tool_lists":{"default":false,"description":"Honors tool_permission_policy allow/deny lists (e.g. a native --allowedTools flag).","type":"boolean"},"verify":{"default":false,"description":"The harness can act as the FinalVerifier (verify intent).","type":"boolean"},"web_policy":{"default":"none","description":"How a harness can honor the external web policy: native (a native config surface), tools (permissioned tools the adapter can allow/deny), uncontrolled (can reach the web but exposes no enforceable switch), or none (no web access at all).","enum":["native","tools","uncontrolled","none"],"type":"string"},"work_report_transport":{"default":"unsupported","description":"How the harness carries the D-16 WorkReport envelope: constrained (native schema transport), validated (instructed terminal metadata), or unsupported (work_state stays unverified).","enum":["constrained","validated","unsupported"],"type":"string"}},"type":"object"},"capability_profile":{"additionalProperties":false,"default":{},"description":"Structured per-harness facts the engine consumes: auth routing, isolation containment, readonly mechanism, finite attachment inputs, MCP injection, live input into a running session, and translated prompt-cache lifetimes.","properties":{"access_control":{"additionalProperties":false,"default":{},"description":"Declared access-control facts for a harness.","properties":{"auxiliary_writable_roots":{"default":false,"description":"The adapter applies HarnessRunSpec.auxiliary_writable_roots natively under workspace_write, and a later spec carrying none receives no earlier grant; false = such a lane refuses (explicit pool) or is filtered (auto pool).","type":"boolean"},"readonly_mechanism":{"default":"none","description":"How read-only access is enforced for a harness: a filesystem sandbox, permission denial, a tool allowlist, or none (read-only intent is advisory).","enum":["fs_sandbox","permission_deny","tool_allowlist","none"],"type":"string"},"write_mechanism":{"default":"none","description":"How workspace_write access is CONFINED for a harness: a filesystem/network base sandbox (codex seatbelt; the harness's native automatic reviewer may still admit individual actions outside it, so fs_sandbox does not mean every admitted action stays inside), a tool-permission policy with no FS/network fence (claude — an allowed shell is unconfined), or none (write intent is advisory).","enum":["fs_sandbox","tool_policy","none"],"type":"string"}},"type":"object"},"attachment_inputs":{"default":[],"items":{"additionalProperties":false,"description":"Finite MIME, size, count and transport limits declared by one adapter.","properties":{"kind":{"description":"Kind of attached resource: image input or generic file bytes.","enum":["image","file"],"type":"string"},"max_bytes":{"exclusiveMinimum":0,"type":"integer"},"max_count":{"exclusiveMinimum":0,"type":"integer"},"mime_types":{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"transport":{"description":"Native adapter transport used for one supported attachment class.","enum":["file_path","base64_stream","base64_inline","text_inline"],"type":"string"}},"required":["kind","mime_types","max_bytes","max_count","transport"],"type":"object"},"type":"array"},"auth":{"additionalProperties":false,"default":{},"description":"Declared auth routing facts for a harness.","properties":{"credential_profile_policies":{"description":"Platform-specific profile identity/cardinality/cleanup policy; absent uses the backward-compatible profile-scoped, unbounded, Claudexor-owned defaults.","items":{"additionalProperties":false,"description":"Platform-specific identity scope, enabled-profile cardinality, and credential cleanup ownership for one auth source.","properties":{"cleanup_owner":{"description":"Who owns cleanup of the credential when its Claudexor profile binding is removed.","enum":["claudexor","vendor"],"type":"string"},"identity_scope":{"description":"Identity boundary selected by a credential profile: the named profile itself or the host OS user/login vault.","enum":["profile","os_user"],"type":"string"},"max_enabled_profiles":{"anyOf":[{"exclusiveMinimum":0,"type":"integer"},{"type":"null"}],"description":"Maximum enabled profile bindings on these platforms; null means unbounded."},"platforms":{"description":"Nonempty host-platform set governed by this policy row.","items":{"description":"Host platform used to resolve credential and managed-login policy.","enum":["darwin","linux","win32"],"type":"string"},"minItems":1,"type":"array"},"source":{"description":"Concrete credential source used or probed by a harness.","enum":["native_session","oauth_token_env","api_key_env","api_key_flag","provider_auth_file","none"],"type":"string"}},"required":["source","platforms","identity_scope","max_enabled_profiles","cleanup_owner"],"type":"object"},"type":"array"},"credential_transports":{"default":[],"description":"Declared credential transports per auth source.","items":{"additionalProperties":false,"description":"How a credential from one auth source physically reaches the harness process.","properties":{"kind":{"description":"Mechanism that carries a credential to the harness process (config file, env var, OAuth token env, OS keychain, HTTP header, or none).","enum":["config_file","env_var","oauth_token_env","os_keychain","http_header","none"],"type":"string"},"platforms":{"description":"Host platforms on which this physical credential transport applies; absent means every supported platform for backward compatibility.","items":{"description":"Host platform used to resolve credential and managed-login policy.","enum":["darwin","linux","win32"],"type":"string"},"minItems":1,"type":"array"},"relocatable_by":{"default":[],"description":"Relocation levers that can move this transport into a scoped environment.","items":{"description":"Which relocation lever moves the credential into a scoped environment (HOME, a config dir override, env injection, or none).","enum":["HOME","CONFIG_DIR","ENV","none"],"type":"string"},"type":"array"},"source":{"description":"Concrete credential source used or probed by a harness.","enum":["native_session","oauth_token_env","api_key_env","api_key_flag","provider_auth_file","none"],"type":"string"}},"required":["source","kind"],"type":"object"},"type":"array"},"managed_login":{"anyOf":[{"additionalProperties":false,"description":"Managed-login input requirement; command, argv, flow, and time window remain owned by the native-login registry.","properties":{"stdin":{"description":"Input transport the vendor login command requires.","enum":["none","pipe","terminal"],"type":"string"}},"required":["stdin"],"type":"object"},{"type":"null"}],"description":"Managed subscription-login input requirement; null means this harness defines no managed login, absent is a legacy manifest."},"preferred_source":{"anyOf":[{"description":"Concrete credential source used or probed by a harness.","enum":["native_session","oauth_token_env","api_key_env","api_key_flag","provider_auth_file","none"],"type":"string"},{"type":"null"}],"default":null,"description":"Auth source the adapter prefers; null when it has no preference."},"supported_sources":{"default":[],"description":"Auth sources this harness supports.","items":{"description":"Concrete credential source used or probed by a harness.","enum":["native_session","oauth_token_env","api_key_env","api_key_flag","provider_auth_file","none"],"type":"string"},"type":"array"}},"type":"object"},"input_limits":{"items":{"additionalProperties":false,"description":"Adapter-owned observed input bound, not a predictive refusal or a model-window claim.","properties":{"limit":{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"},"verified_against":{"description":"Native runtime version against which the bound was observed.","minLength":1,"type":"string"}},"required":["scope","unit","limit","source","verified_against"],"type":"object"},"type":"array"},"isolation":{"additionalProperties":false,"default":{},"description":"Declared isolation containment facts for a harness.","properties":{"supported_containment":{"default":["env_or_file_injection"],"description":"Containment mechanisms the adapter can run under.","items":{"description":"Isolation containment level an adapter supports for run environments, from env/file injection through scoped-HOME keychain bridging or a private per-profile keychain to process sandboxes and containers.","enum":["env_or_file_injection","scoped_home_keychain_bridge","private_per_profile_keychain","host_user_context","process_sandbox","container"],"type":"string"},"type":"array"}},"type":"object"},"live_input":{"default":"none","description":"How a live message enters a running session: mid_turn (consumed inside the active turn), next_tool_boundary (queued until the same turn's next tool boundary), none (no truthful channel; the engine answers unsupported).","enum":["mid_turn","next_tool_boundary","none"],"type":"string"},"mcp_injection":{"default":false,"description":"The adapter can inject engine-owned MCP servers into the harness sandbox (browser tool, delegation belt); false = browser MCP is refused and Delegate degrades to ordinary Agent with a durable typed receipt.","type":"boolean"},"mcp_injection_requires_full_access":{"default":false,"description":"An injected MCP server can only reach the daemon (belt) at full access; below it the harness sandbox cancels the call. true => Delegate below full access degrades to ordinary Agent with a durable typed receipt.","type":"boolean"},"prompt_cache_ttls":{"description":"Prompt-cache lifetimes this adapter translates into native controls; a requested lifetime outside the list (or with the list absent) is disclosed as ignored.","items":{"description":"Native prompt-cache lifetime for the main conversation and helper requests of a harness that declares it. Omission sends no override: native defaults, profile settings and the inherited environment stay in effect.","enum":["5m","1h"],"type":"string"},"type":"array"}},"type":"object"},"display_name":{"description":"Human display name of the harness.","type":"string"},"id":{"description":"Harness id (codex, claude, cursor, opencode, raw-api, ...).","minLength":1,"type":"string"},"kind":{"description":"Kind of harness adapter: a local vendor CLI, a remote API, or a fake used for tests.","enum":["local_cli","remote_api","fake"],"type":"string"},"provider_family":{"default":"unknown","description":"Vendor/provider family a harness routes to, used for route-diversity reasoning; open-ended via \"unknown\".","enum":["openai","anthropic","google","cursor","opencode","xai","local","unknown"],"type":"string"},"version":{"description":"Vendor CLI/API version, when discovered.","type":"string"}},"required":["id","display_name","kind","capabilities"],"type":"object"},{"type":"null"}],"description":"The harness's declared manifest, when available."},"readiness":{"default":[],"description":"Display-ready readiness checks, daemon-normalized from the raw evidence.","items":{"additionalProperties":false,"description":"One display-ready readiness check row (daemon-normalized).","properties":{"detail":{"default":null,"description":"Redacted human-readable evidence for the outcome.","type":["string","null"]},"id":{"description":"Stable machine id of the check (adapter probe id or auth source).","type":"string"},"kind":{"description":"What KIND of readiness this is: binary presence, credential source, isolated smoke, configured-model validity, or a generic capability probe.","enum":["binary","auth","smoke","model","probe"],"type":"string"},"status":{"description":"Outcome; skip = not run / not applicable.","enum":["pass","fail","skip"],"type":"string"},"title":{"description":"Human display name of the check.","type":"string"}},"required":["id","kind","title","status"],"type":"object"},"type":"array"},"reasons":{"default":[],"description":"Human-readable reasons for degraded/unavailable status.","items":{"type":"string"},"type":"array"},"routableIntents":{"default":[],"description":"Intents the harness is actually routable for right now (doctor-gated); the server-side availability truth surfaces must read instead of re-deriving.","items":{"type":"string"},"type":"array"},"setupLogin":{"anyOf":[{"additionalProperties":false,"description":"Effective setup-login flow for this harness on the current host.","properties":{"mode":{"description":"in_app requests the daemon-hosted login flow; external_terminal requests the existing client PTY flow.","enum":["in_app","external_terminal"],"type":"string"}},"required":["mode"],"type":"object"},{"type":"null"}],"description":"Effective setup-login flow for this harness on the current host; current producers emit null or an object, while omission identifies a legacy row."},"status":{"description":"Doctor verdict for a harness: ok (usable), degraded (usable with limitations), or unavailable.","enum":["ok","degraded","unavailable"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"profiles":{"description":"Every registered credential profile paired with its doctor readiness projection and non-secret identity.","items":{"additionalProperties":false,"properties":{"identity":{"anyOf":[{"additionalProperties":false,"description":"Non-secret {email, plan} identity of one account, derived daemon-side from a sanctioned scoped credential source or an allowlisted harness CLI status observation; never carries raw status or token material.","properties":{"email":{"description":"Login email of the account (codex id_token `email`, claude oauthAccount `emailAddress`, or an allowlisted harness CLI status observation).","minLength":1,"type":"string"},"plan":{"description":"Subscription/plan label (codex `chatgpt_plan_type` / claude oauthAccount `organizationType`).","minLength":1,"type":"string"}},"type":"object"},{"type":"null"}],"default":null,"description":"Non-secret {email, plan} of this profile, derived daemon-side from its scoped credential source or allowlisted harness CLI status observation; null when absent/undisclosed."},"profile":{"additionalProperties":false,"description":"Durable non-secret named binding for one harness; credential material may live in Claudexor-owned scoped state, a managed secret store, or a platform-declared vendor/OS-user store, never in this row.","properties":{"created_at":{"anyOf":[{"description":"ISO-8601 timestamp string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"When the profile was registered; null for hand-written config entries."},"credential_kind":{"description":"Binding kind for a profile: Claudexor-owned scoped vendor state, a managed OAuth secret, or a managed API-key secret; a vendor OS-user credential may remain outside that state.","enum":["config_dir_login","oauth_token","api_key"],"type":"string"},"display_name":{"description":"Human label shown wherever the profile appears.","minLength":1,"type":"string"},"enabled":{"default":true,"description":"Disabled profiles are never routable.","type":"boolean"},"harness_id":{"description":"Harness family this profile belongs to.","minLength":1,"type":"string"},"isolation_locator":{"default":null,"description":"Canonical absolute path to Claudexor-owned scoped vendor state for config_dir_login bindings; null for secret-ref kinds.","type":["string","null"]},"profile_id":{"description":"Stable user-chosen profile identifier (unique per harness).","minLength":1,"type":"string"},"secret_ref":{"default":null,"description":"Namespaced secret-store name (e.g. claude_oauth:work) for oauth_token/api_key profiles; null for config_dir_login.","type":["string","null"]}},"required":["profile_id","harness_id","display_name","credential_kind"],"type":"object"},"status":{"additionalProperties":false,"description":"Doctor-owned readiness projection for one credential profile; never durable config.","properties":{"availability":{"enum":["available","unavailable","unknown"],"type":"string"},"detail":{"description":"Redacted human-readable probe evidence.","type":"string"},"harness_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"last_verified_at":{"anyOf":[{"description":"ISO-8601 timestamp string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"When the verification verdict was established, by the method named in verification_source; null = never verified."},"profile_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"stale":{"description":"True only for a bounded stale last-known-good observation; stale is never a fresh passed verification.","type":"boolean"},"stale_age_ms":{"description":"Age in milliseconds of the bounded stale observation, when stale is true.","minimum":0,"type":"integer"},"stale_basis":{"description":"Basis of a stale observation: last_positive_after_timeout = the status probe did not answer within its budget and this row store's last positive status answer, still inside its bounded interval, stands in; unpinned pool admission alone may consume it. Absent = the generic last-known-good grace, consumable only by an already selected route.","enum":["last_positive_after_timeout"],"type":"string"},"verification":{"enum":["passed","failed","not_run"],"type":"string"},"verification_source":{"default":"local_store","description":"How the verification verdict was reached: local_store = the binding's required local state or managed secret is present (says nothing about a token being live); vendor = the vendor answered under the exact binding environment and effective platform credential policy.","enum":["local_store","vendor"],"type":"string"}},"required":["profile_id","harness_id","availability","verification"],"type":"object"}},"required":["profile","status"],"type":"object"},"type":"array"},"quota":{"additionalProperties":false,"description":"Current quota snapshots without a fabricated aggregate.","properties":{"absences":{"default":[],"description":"Every registered subject reports a snapshot or a typed absence; a refresh gap may coexist with a stale last-known snapshot.","items":{"additionalProperties":false,"description":"A registered subject's typed quota observation gap; may accompany stale last-known data.","properties":{"detail":{"default":null,"type":["string","null"]},"observed_at":{"format":"date-time","type":"string"},"reason":{"description":"Why a registered subject has no fresh quota snapshot, in the source's own vocabulary.","enum":["not_logged_in","transport_unavailable","platform_unsupported","refresh_failed","no_source","auth_revoked","rate_limited","probe_skipped_rate_limited","poll_paced","credential_profile_ambiguous"],"type":"string"},"retry_after_ms":{"minimum":0,"type":"integer"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"}},"required":["subject","reason","observed_at"],"type":"object"},"type":"array"},"refresh_skipped":{"items":{"additionalProperties":false,"description":"One subject a refresh cycle did not re-fetch because its poll rate-limit cooldown is active, or a retained legacy vendor floor when subject is absent; its snapshots/absences in the same response are last-known registry data.","properties":{"not_before":{"format":"date-time","type":"string"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"},"vendor":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["vendor","not_before"],"type":"object"},"type":"array"},"refreshed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"resources":{"items":{"additionalProperties":false,"properties":{"balances":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"amount":{"type":["string","null"]},"currency":{"type":["string","null"]},"decimal_places":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"fee_included":{"description":"Whether the reported amount includes fees; null means the source did not establish this.","type":["boolean","null"]},"has_balance":{"type":["boolean","null"]},"id":{"type":"string"},"label":{"type":"string"},"period":{"additionalProperties":false,"properties":{"ends_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"starts_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}},"required":["starts_at","ends_at"],"type":"object"},"scope":{"enum":["personal","team"],"type":"string"},"unit":{"type":"string"},"unlimited":{"type":["boolean","null"]},"usage_kind":{"enum":["included","bonus","on_demand","total"],"type":"string"}},"required":["id","label","amount","unit","currency","decimal_places","has_balance","unlimited"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"diagnostics":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"code":{"type":"string"},"detail":{"type":["string","null"]}},"required":["code","detail"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"resets":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"available_count":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"description":{"type":["string","null"]},"eligible":{"type":["boolean","null"]},"grants":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"available_count":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"clears":{"items":{"type":"string"},"type":"array"},"description":{"type":["string","null"]},"expires_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"id":{"type":"string"},"label":{"type":"string"},"starts_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"total_count":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"usable_now":{"type":["boolean","null"]}},"required":["id","label","description","available_count","total_count","usable_now","starts_at","expires_at","clears"],"type":"object"},"type":"array"},{"type":"null"}]},"id":{"type":"string"},"kind":{"enum":["granted_reset","session_refill"],"type":"string"},"label":{"type":"string"},"reason":{"type":["string","null"]},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"usable_now":{"type":["boolean","null"]},"weekly_limit_applies":{"type":"boolean"}},"required":["id","kind","label","description","available_count","eligible","usable_now","reason","resets_at","weekly_limit_applies","grants"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"spending":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"currency":{"type":["string","null"]},"decimal_places":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"enabled":{"type":["boolean","null"]},"fee_included":{"description":"Whether the reported amount includes fees; null means the source did not establish this.","type":["boolean","null"]},"id":{"type":"string"},"label":{"type":"string"},"limit":{"type":["string","null"]},"period":{"additionalProperties":false,"properties":{"ends_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"starts_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}},"required":["starts_at","ends_at"],"type":"object"},"reason":{"type":["string","null"]},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"scope":{"enum":["personal","team"],"type":"string"},"unit":{"type":"string"},"usage_kind":{"enum":["included","bonus","on_demand","total"],"type":"string"},"used":{"type":["string","null"]}},"required":["id","label","enabled","used","limit","unit","currency","decimal_places","resets_at","reason"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"target":{"additionalProperties":false,"properties":{"harness":{"minLength":1,"type":"string"},"profile_id":{"minLength":1,"type":"string"}},"required":["harness","profile_id"],"type":"object"}},"required":["target","balances","spending","resets","diagnostics"],"type":"object"},"type":"array"},"snapshots":{"items":{"additionalProperties":false,"description":"One vendor-owned quota snapshot plus its derived availability projection.","properties":{"availability":{"additionalProperties":false,"description":"Typed server-owned availability projection derived at the /v2/quota and atomic Accounts response boundaries; absent from raw journal/projection storage.","properties":{"blocking_constraints":{"description":"Ids of the constraints that produced a non-available state.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"model_scoped_exhaustions":{"description":"Every spent/cooling model-scoped window, listed regardless of state so consumers see partial exhaustion without re-deriving constraint scope.","items":{"additionalProperties":false,"description":"A spent or cooling window that applies only to the named models or declared model-id prefixes. Without a requested model only a window that DECLARES it governs the unspecified-model route can exhaust the subject; when the request names a model it covers, it blocks that request too (and is then also listed in blocking_constraints). resets_at is its earliest known release instant (null = unknown).","properties":{"applies_to_model_prefixes":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"applies_to_models":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"constraint_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}},"required":["constraint_id","applies_to_models","resets_at"],"type":"object"},"type":"array"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Earliest known instant at which any blocking constraint may release; null when nothing blocks or no reset is known."},"state":{"description":"Spendability verdict for one snapshot: exhausted = a spent window blocks every applicable request; cooldown = an applicable window is only rate-limit-cooling; available = nothing applicable blocks.","enum":["available","exhausted","cooldown"],"type":"string"}},"required":["state","blocking_constraints","resets_at","model_scoped_exhaustions"],"type":"object"},"constraints":{"items":{"additionalProperties":false,"description":"One independent vendor quota window; without model ids or declared prefixes it applies to every model, and null usage stays unknown.","properties":{"applies_to_model_prefixes":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"applies_to_models":{"anyOf":[{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},{"type":"null"}]},"applies_to_request_kinds":{"description":"Vendor-declared operation scope. Absent applies to both text and image; model scope still applies independently.","items":{"enum":["text","image"],"type":"string"},"minItems":1,"type":"array"},"applies_to_unspecified_model":{"type":"boolean"},"cooldown_until":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null},"id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"label":{"minLength":1,"type":"string"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"used_ratio":{"anyOf":[{"maximum":1,"minimum":0,"type":"number"},{"type":"null"}]},"window_seconds":{"anyOf":[{"exclusiveMinimum":0,"type":"number"},{"type":"null"}]}},"required":["id","label","used_ratio","window_seconds","resets_at"],"type":"object"},"type":"array"},"freshness":{"description":"Freshness of a quota snapshot at read time.","enum":["fresh","stale","unknown"],"type":"string"},"observed_at":{"format":"date-time","type":"string"},"snapshot_id":{"description":"Server-derived stable snapshot identity for consumers; absent from raw journal evidence and optional for legacy responses.","minLength":1,"type":"string"},"source":{"description":"Machine-readable source of quota evidence, classified by schema-owned traits.","enum":["codex_app_server","codex_rollout","claude_statusline","claude_api_retry","claude_oauth_usage","agy_command_usage","cursor_rate_limit","grok_rate_limit","claude_rate_limit_event","codex_app_server_event","codex_image_response"],"type":"string"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"}},"required":["subject","constraints","source","observed_at","freshness"],"type":"object"},"type":"array"}},"required":["snapshots","refreshed_at","resources"],"type":"object"},"quotaEventCursor":{"description":"Opaque global-journal cursor fencing the returned quota response; pass it verbatim as Last-Event-ID only for the dedicated quota event observer, never the general stream.","maxLength":4096,"minLength":1,"type":"string"},"routingEvidence":{"additionalProperties":false,"description":"Model-scoped routing evidence; absent when the engine predates the read or the read failed.","properties":{"capabilities":{"description":"Temporary capability marks; absent from engines that predate them. A mark clears on a success there or a catalog or credential change; after expires_at one operation may probe the account.","items":{"additionalProperties":false,"description":"A temporary capability mark for one account and one model. It only orders auto selection: the account stays enabled and usable as a last fallback.","properties":{"account_fingerprint":{"description":"Provider account identity the mark is bound to; null when the adapter has none.","type":["string","null"]},"expires_at":{"description":"Probe becomes eligible at this time; not a vendor reset.","minLength":1,"type":"string"},"harness_id":{"description":"Harness family of the account.","minLength":1,"type":"string"},"observed_at":{"description":"Start of this mark's episode, when its row was created (a recognized refusal, or the service elsewhere that confirmed an unrecognized one); renewals and probes keep it.","minLength":1,"type":"string"},"profile_id":{"description":"Account row that refused this model before generation started.","minLength":1,"type":"string"},"provider_reason":{"description":"Latest refusal diagnostic, redacted and at most 1024 characters: the provider's reason for a recognized refusal, the engine's message and vendor code otherwise.","type":"string"},"requested_model":{"description":"Model the refused request named.","type":"string"},"state":{"description":"provisional = refused here; confirmed = another account then served the correlated retry; probe_due = expired, the next selection may probe it; probing = one operation holds that probe.","enum":["provisional","confirmed","probe_due","probing"],"type":"string"}},"required":["harness_id","profile_id","requested_model","account_fingerprint","provider_reason","observed_at","expires_at","state"],"type":"object"},"type":"array"},"lastService":{"description":"Latest observed service per registered account and requested model, most recent service first.","items":{"additionalProperties":false,"description":"The latest observed service of one account for one requested model under its current credential binding.","properties":{"harness_id":{"description":"Harness family of the account.","minLength":1,"type":"string"},"observed_at":{"description":"When the account was observed serving that request.","minLength":1,"type":"string"},"profile_id":{"description":"Account row that served the request.","minLength":1,"type":"string"},"requested_model":{"description":"Model the run asked for; null = the harness default model.","type":["string","null"]}},"required":["harness_id","profile_id","requested_model","observed_at"],"type":"object"},"type":"array"},"refusals":{"description":"Live pre-progress refusal observations, each scoped to one requested model.","items":{"additionalProperties":false,"description":"A bounded, self-expiring typed observation that an account refused a started session before any progress; it orders the account pool and never excludes a row.","properties":{"expires_at":{"description":"Self-expiry instant (observation retention, not a vendor reset time); after this the observation is ignored.","minLength":1,"type":"string"},"harness_id":{"description":"Harness family the observed account belongs to.","minLength":1,"type":"string"},"observed_at":{"description":"When the pre-progress refusal was observed.","minLength":1,"type":"string"},"profile_id":{"description":"Account row whose started session was refused before progress.","minLength":1,"type":"string"},"requested_model":{"description":"Model the run asked this account for; null = the harness default model.","type":["string","null"]}},"required":["harness_id","profile_id","requested_model","observed_at","expires_at"],"type":"object"},"type":"array"}},"required":["refusals","lastService"],"type":"object"},"routingEvidenceProblem":{"description":"One diagnostic when the routing-evidence read failed; the account listing is still authoritative.","type":"string"}},"required":["profiles","harnesses","git","quota","quotaEventCursor"],"type":"object"}],"description":"Accounts listing or atomic snapshot joined with model-scoped routing evidence.","type":"object"}},{"annotations":{"readOnlyHint":true},"description":"Read typed account balances, spending, reset offers and quota. refresh:true requests provider data; target selects one exact registered account, including a disabled portable profile. No login or spending-policy change.","inputSchema":{"additionalProperties":false,"properties":{"model":{"type":"string"},"refresh":{"type":"boolean"},"target":{"additionalProperties":false,"properties":{"harness":{"minLength":1,"type":"string"},"profile_id":{"minLength":1,"type":"string"}},"required":["harness","profile_id"],"type":"object"}},"type":"object"},"name":"claudexor_account_resources","outputSchema":{"additionalProperties":false,"description":"Current quota snapshots without a fabricated aggregate.","properties":{"absences":{"default":[],"description":"Every registered subject reports a snapshot or a typed absence; a refresh gap may coexist with a stale last-known snapshot.","items":{"additionalProperties":false,"description":"A registered subject's typed quota observation gap; may accompany stale last-known data.","properties":{"detail":{"default":null,"type":["string","null"]},"observed_at":{"format":"date-time","type":"string"},"reason":{"description":"Why a registered subject has no fresh quota snapshot, in the source's own vocabulary.","enum":["not_logged_in","transport_unavailable","platform_unsupported","refresh_failed","no_source","auth_revoked","rate_limited","probe_skipped_rate_limited","poll_paced","credential_profile_ambiguous"],"type":"string"},"retry_after_ms":{"minimum":0,"type":"integer"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"}},"required":["subject","reason","observed_at"],"type":"object"},"type":"array"},"refresh_skipped":{"items":{"additionalProperties":false,"description":"One subject a refresh cycle did not re-fetch because its poll rate-limit cooldown is active, or a retained legacy vendor floor when subject is absent; its snapshots/absences in the same response are last-known registry data.","properties":{"not_before":{"format":"date-time","type":"string"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"},"vendor":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["vendor","not_before"],"type":"object"},"type":"array"},"refreshed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"resources":{"items":{"additionalProperties":false,"properties":{"balances":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"amount":{"type":["string","null"]},"currency":{"type":["string","null"]},"decimal_places":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"fee_included":{"description":"Whether the reported amount includes fees; null means the source did not establish this.","type":["boolean","null"]},"has_balance":{"type":["boolean","null"]},"id":{"type":"string"},"label":{"type":"string"},"period":{"additionalProperties":false,"properties":{"ends_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"starts_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}},"required":["starts_at","ends_at"],"type":"object"},"scope":{"enum":["personal","team"],"type":"string"},"unit":{"type":"string"},"unlimited":{"type":["boolean","null"]},"usage_kind":{"enum":["included","bonus","on_demand","total"],"type":"string"}},"required":["id","label","amount","unit","currency","decimal_places","has_balance","unlimited"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"diagnostics":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"code":{"type":"string"},"detail":{"type":["string","null"]}},"required":["code","detail"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"resets":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"available_count":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"description":{"type":["string","null"]},"eligible":{"type":["boolean","null"]},"grants":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"available_count":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"clears":{"items":{"type":"string"},"type":"array"},"description":{"type":["string","null"]},"expires_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"id":{"type":"string"},"label":{"type":"string"},"starts_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"total_count":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"usable_now":{"type":["boolean","null"]}},"required":["id","label","description","available_count","total_count","usable_now","starts_at","expires_at","clears"],"type":"object"},"type":"array"},{"type":"null"}]},"id":{"type":"string"},"kind":{"enum":["granted_reset","session_refill"],"type":"string"},"label":{"type":"string"},"reason":{"type":["string","null"]},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"usable_now":{"type":["boolean","null"]},"weekly_limit_applies":{"type":"boolean"}},"required":["id","kind","label","description","available_count","eligible","usable_now","reason","resets_at","weekly_limit_applies","grants"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"spending":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"currency":{"type":["string","null"]},"decimal_places":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"enabled":{"type":["boolean","null"]},"fee_included":{"description":"Whether the reported amount includes fees; null means the source did not establish this.","type":["boolean","null"]},"id":{"type":"string"},"label":{"type":"string"},"limit":{"type":["string","null"]},"period":{"additionalProperties":false,"properties":{"ends_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"starts_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}},"required":["starts_at","ends_at"],"type":"object"},"reason":{"type":["string","null"]},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"scope":{"enum":["personal","team"],"type":"string"},"unit":{"type":"string"},"usage_kind":{"enum":["included","bonus","on_demand","total"],"type":"string"},"used":{"type":["string","null"]}},"required":["id","label","enabled","used","limit","unit","currency","decimal_places","resets_at","reason"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"target":{"additionalProperties":false,"properties":{"harness":{"minLength":1,"type":"string"},"profile_id":{"minLength":1,"type":"string"}},"required":["harness","profile_id"],"type":"object"}},"required":["target","balances","spending","resets","diagnostics"],"type":"object"},"type":"array"},"snapshots":{"items":{"additionalProperties":false,"description":"One vendor-owned quota snapshot plus its derived availability projection.","properties":{"availability":{"additionalProperties":false,"description":"Typed server-owned availability projection derived at the /v2/quota and atomic Accounts response boundaries; absent from raw journal/projection storage.","properties":{"blocking_constraints":{"description":"Ids of the constraints that produced a non-available state.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"model_scoped_exhaustions":{"description":"Every spent/cooling model-scoped window, listed regardless of state so consumers see partial exhaustion without re-deriving constraint scope.","items":{"additionalProperties":false,"description":"A spent or cooling window that applies only to the named models or declared model-id prefixes. Without a requested model only a window that DECLARES it governs the unspecified-model route can exhaust the subject; when the request names a model it covers, it blocks that request too (and is then also listed in blocking_constraints). resets_at is its earliest known release instant (null = unknown).","properties":{"applies_to_model_prefixes":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"applies_to_models":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"constraint_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}},"required":["constraint_id","applies_to_models","resets_at"],"type":"object"},"type":"array"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Earliest known instant at which any blocking constraint may release; null when nothing blocks or no reset is known."},"state":{"description":"Spendability verdict for one snapshot: exhausted = a spent window blocks every applicable request; cooldown = an applicable window is only rate-limit-cooling; available = nothing applicable blocks.","enum":["available","exhausted","cooldown"],"type":"string"}},"required":["state","blocking_constraints","resets_at","model_scoped_exhaustions"],"type":"object"},"constraints":{"items":{"additionalProperties":false,"description":"One independent vendor quota window; without model ids or declared prefixes it applies to every model, and null usage stays unknown.","properties":{"applies_to_model_prefixes":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"applies_to_models":{"anyOf":[{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},{"type":"null"}]},"applies_to_request_kinds":{"description":"Vendor-declared operation scope. Absent applies to both text and image; model scope still applies independently.","items":{"enum":["text","image"],"type":"string"},"minItems":1,"type":"array"},"applies_to_unspecified_model":{"type":"boolean"},"cooldown_until":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null},"id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"label":{"minLength":1,"type":"string"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"used_ratio":{"anyOf":[{"maximum":1,"minimum":0,"type":"number"},{"type":"null"}]},"window_seconds":{"anyOf":[{"exclusiveMinimum":0,"type":"number"},{"type":"null"}]}},"required":["id","label","used_ratio","window_seconds","resets_at"],"type":"object"},"type":"array"},"freshness":{"description":"Freshness of a quota snapshot at read time.","enum":["fresh","stale","unknown"],"type":"string"},"observed_at":{"format":"date-time","type":"string"},"snapshot_id":{"description":"Server-derived stable snapshot identity for consumers; absent from raw journal evidence and optional for legacy responses.","minLength":1,"type":"string"},"source":{"description":"Machine-readable source of quota evidence, classified by schema-owned traits.","enum":["codex_app_server","codex_rollout","claude_statusline","claude_api_retry","claude_oauth_usage","agy_command_usage","cursor_rate_limit","grok_rate_limit","claude_rate_limit_event","codex_app_server_event","codex_image_response"],"type":"string"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"}},"required":["subject","constraints","source","observed_at","freshness"],"type":"object"},"type":"array"}},"required":["snapshots","refreshed_at","resources"],"type":"object"}},{"annotations":{"destructiveHint":true,"idempotentHint":true,"readOnlyHint":false},"description":"Explicitly consume a selected account reset, outside inference capacity. Supply target, offer_id, optional grant_id and idempotency_key. Retain the original key and request after a timeout and repeat them to recover; never replace the key automatically. Or supply operation_id to read a receipt. Provider outcome and resource readback are separate; Claude already_used is not proof of this operation's success.","inputSchema":{"additionalProperties":false,"oneOf":[{"not":{"required":["operation_id"]},"required":["target","offer_id","idempotency_key"]},{"not":{"anyOf":[{"required":["target"]},{"required":["offer_id"]},{"required":["grant_id"]},{"required":["idempotency_key"]}]},"required":["operation_id"]}],"properties":{"grant_id":{"minLength":1,"type":"string"},"idempotency_key":{"minLength":1,"type":"string"},"offer_id":{"minLength":1,"type":"string"},"operation_id":{"minLength":1,"type":"string"},"target":{"additionalProperties":false,"properties":{"harness":{"minLength":1,"type":"string"},"profile_id":{"minLength":1,"type":"string"}},"required":["harness","profile_id"],"type":"object"}},"type":"object"},"name":"claudexor_account_reset","outputSchema":{"additionalProperties":false,"properties":{"completed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"created_at":{"format":"date-time","type":"string"},"detail":{"type":["string","null"]},"id":{"type":"string"},"outcome":{"enum":["pending","reset","already_redeemed","already_used","nothing_to_reset","no_credit","not_eligible","cooldown","unavailable","unknown"],"type":"string"},"readback":{"additionalProperties":false,"properties":{"attempted_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"detail":{"type":["string","null"]},"state":{"enum":["pending","fresh","failed"],"type":"string"}},"required":["state","attempted_at","detail"],"type":"object"},"request":{"additionalProperties":false,"properties":{"grant_id":{"minLength":1,"type":"string"},"offer_id":{"minLength":1,"type":"string"},"target":{"additionalProperties":false,"properties":{"harness":{"minLength":1,"type":"string"},"profile_id":{"minLength":1,"type":"string"}},"required":["harness","profile_id"],"type":"object"}},"required":["target","offer_id"],"type":"object"},"resources":{"anyOf":[{"additionalProperties":false,"description":"Current quota snapshots without a fabricated aggregate.","properties":{"absences":{"default":[],"description":"Every registered subject reports a snapshot or a typed absence; a refresh gap may coexist with a stale last-known snapshot.","items":{"additionalProperties":false,"description":"A registered subject's typed quota observation gap; may accompany stale last-known data.","properties":{"detail":{"default":null,"type":["string","null"]},"observed_at":{"format":"date-time","type":"string"},"reason":{"description":"Why a registered subject has no fresh quota snapshot, in the source's own vocabulary.","enum":["not_logged_in","transport_unavailable","platform_unsupported","refresh_failed","no_source","auth_revoked","rate_limited","probe_skipped_rate_limited","poll_paced","credential_profile_ambiguous"],"type":"string"},"retry_after_ms":{"minimum":0,"type":"integer"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"}},"required":["subject","reason","observed_at"],"type":"object"},"type":"array"},"refresh_skipped":{"items":{"additionalProperties":false,"description":"One subject a refresh cycle did not re-fetch because its poll rate-limit cooldown is active, or a retained legacy vendor floor when subject is absent; its snapshots/absences in the same response are last-known registry data.","properties":{"not_before":{"format":"date-time","type":"string"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"},"vendor":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["vendor","not_before"],"type":"object"},"type":"array"},"refreshed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"resources":{"items":{"additionalProperties":false,"properties":{"balances":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"amount":{"type":["string","null"]},"currency":{"type":["string","null"]},"decimal_places":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"fee_included":{"description":"Whether the reported amount includes fees; null means the source did not establish this.","type":["boolean","null"]},"has_balance":{"type":["boolean","null"]},"id":{"type":"string"},"label":{"type":"string"},"period":{"additionalProperties":false,"properties":{"ends_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"starts_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}},"required":["starts_at","ends_at"],"type":"object"},"scope":{"enum":["personal","team"],"type":"string"},"unit":{"type":"string"},"unlimited":{"type":["boolean","null"]},"usage_kind":{"enum":["included","bonus","on_demand","total"],"type":"string"}},"required":["id","label","amount","unit","currency","decimal_places","has_balance","unlimited"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"diagnostics":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"code":{"type":"string"},"detail":{"type":["string","null"]}},"required":["code","detail"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"resets":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"available_count":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"description":{"type":["string","null"]},"eligible":{"type":["boolean","null"]},"grants":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"available_count":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"clears":{"items":{"type":"string"},"type":"array"},"description":{"type":["string","null"]},"expires_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"id":{"type":"string"},"label":{"type":"string"},"starts_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"total_count":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"usable_now":{"type":["boolean","null"]}},"required":["id","label","description","available_count","total_count","usable_now","starts_at","expires_at","clears"],"type":"object"},"type":"array"},{"type":"null"}]},"id":{"type":"string"},"kind":{"enum":["granted_reset","session_refill"],"type":"string"},"label":{"type":"string"},"reason":{"type":["string","null"]},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"usable_now":{"type":["boolean","null"]},"weekly_limit_applies":{"type":"boolean"}},"required":["id","kind","label","description","available_count","eligible","usable_now","reason","resets_at","weekly_limit_applies","grants"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"spending":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"currency":{"type":["string","null"]},"decimal_places":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"enabled":{"type":["boolean","null"]},"fee_included":{"description":"Whether the reported amount includes fees; null means the source did not establish this.","type":["boolean","null"]},"id":{"type":"string"},"label":{"type":"string"},"limit":{"type":["string","null"]},"period":{"additionalProperties":false,"properties":{"ends_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"starts_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}},"required":["starts_at","ends_at"],"type":"object"},"reason":{"type":["string","null"]},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"scope":{"enum":["personal","team"],"type":"string"},"unit":{"type":"string"},"usage_kind":{"enum":["included","bonus","on_demand","total"],"type":"string"},"used":{"type":["string","null"]}},"required":["id","label","enabled","used","limit","unit","currency","decimal_places","resets_at","reason"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"target":{"additionalProperties":false,"properties":{"harness":{"minLength":1,"type":"string"},"profile_id":{"minLength":1,"type":"string"}},"required":["harness","profile_id"],"type":"object"}},"required":["target","balances","spending","resets","diagnostics"],"type":"object"},"type":"array"},"snapshots":{"items":{"additionalProperties":false,"description":"One vendor-owned quota snapshot plus its derived availability projection.","properties":{"availability":{"additionalProperties":false,"description":"Typed server-owned availability projection derived at the /v2/quota and atomic Accounts response boundaries; absent from raw journal/projection storage.","properties":{"blocking_constraints":{"description":"Ids of the constraints that produced a non-available state.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"model_scoped_exhaustions":{"description":"Every spent/cooling model-scoped window, listed regardless of state so consumers see partial exhaustion without re-deriving constraint scope.","items":{"additionalProperties":false,"description":"A spent or cooling window that applies only to the named models or declared model-id prefixes. Without a requested model only a window that DECLARES it governs the unspecified-model route can exhaust the subject; when the request names a model it covers, it blocks that request too (and is then also listed in blocking_constraints). resets_at is its earliest known release instant (null = unknown).","properties":{"applies_to_model_prefixes":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"applies_to_models":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"constraint_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}},"required":["constraint_id","applies_to_models","resets_at"],"type":"object"},"type":"array"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Earliest known instant at which any blocking constraint may release; null when nothing blocks or no reset is known."},"state":{"description":"Spendability verdict for one snapshot: exhausted = a spent window blocks every applicable request; cooldown = an applicable window is only rate-limit-cooling; available = nothing applicable blocks.","enum":["available","exhausted","cooldown"],"type":"string"}},"required":["state","blocking_constraints","resets_at","model_scoped_exhaustions"],"type":"object"},"constraints":{"items":{"additionalProperties":false,"description":"One independent vendor quota window; without model ids or declared prefixes it applies to every model, and null usage stays unknown.","properties":{"applies_to_model_prefixes":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"applies_to_models":{"anyOf":[{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},{"type":"null"}]},"applies_to_request_kinds":{"description":"Vendor-declared operation scope. Absent applies to both text and image; model scope still applies independently.","items":{"enum":["text","image"],"type":"string"},"minItems":1,"type":"array"},"applies_to_unspecified_model":{"type":"boolean"},"cooldown_until":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null},"id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"label":{"minLength":1,"type":"string"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"used_ratio":{"anyOf":[{"maximum":1,"minimum":0,"type":"number"},{"type":"null"}]},"window_seconds":{"anyOf":[{"exclusiveMinimum":0,"type":"number"},{"type":"null"}]}},"required":["id","label","used_ratio","window_seconds","resets_at"],"type":"object"},"type":"array"},"freshness":{"description":"Freshness of a quota snapshot at read time.","enum":["fresh","stale","unknown"],"type":"string"},"observed_at":{"format":"date-time","type":"string"},"snapshot_id":{"description":"Server-derived stable snapshot identity for consumers; absent from raw journal evidence and optional for legacy responses.","minLength":1,"type":"string"},"source":{"description":"Machine-readable source of quota evidence, classified by schema-owned traits.","enum":["codex_app_server","codex_rollout","claude_statusline","claude_api_retry","claude_oauth_usage","agy_command_usage","cursor_rate_limit","grok_rate_limit","claude_rate_limit_event","codex_app_server_event","codex_image_response"],"type":"string"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"}},"required":["subject","constraints","source","observed_at","freshness"],"type":"object"},"type":"array"}},"required":["snapshots","refreshed_at","resources"],"type":"object"},{"type":"null"}],"description":"Current quota snapshots without a fabricated aggregate."},"state":{"enum":["running","completed"],"type":"string"}},"required":["id","request","state","created_at","completed_at","outcome","detail","readback","resources"],"type":"object"}},{"annotations":{"readOnlyHint":true},"description":"List recent daemon-tracked Claudexor runs (recovery: find a lost runId).","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"claudexor_runs"},{"annotations":{"readOnlyHint":true},"description":"Inspect a daemon-tracked run: status, summary, decision verdict, and the derived applyEligibility (what unblocks apply).","inputSchema":{"additionalProperties":false,"properties":{"runId":{"description":"Daemon run id (from a run tool's runId trailer or claudexor_runs).","minLength":1,"type":"string"}},"required":["runId"],"type":"object"},"name":"claudexor_inspect","outputSchema":{"additionalProperties":false,"description":"Structured MCP result for Claudexor durable-run read tools (inspect/status/result).","properties":{"applyEligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived apply-gate verdict; null for read-only runs or when no patch exists."},"attemptExecution":{"items":{"additionalProperties":false,"description":"Compact projection of existing attempt execution and amount evidence.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"harnessId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"processing":{"additionalProperties":false,"description":"Requested intent, submitted native control, and observed execution are independent facts. A submitted flag never proves observed service; mixed or missing session observations remain explicit.","properties":{"observed":{"enum":["standard","fast","economy","mixed","unknown"],"type":"string"},"observedNative":{"items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"reason":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"requested":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"submitted":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"submittedNative":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."}},"required":["requested","submitted","submittedNative","observed","observedNative","reason","source"],"type":"object"},"processingCostBasis":{"additionalProperties":false,"description":"Mode-qualified billing evidence for an existing cost record. Authentication alone does not establish included premium service; credits, cash, and token valuation stay distinct.","properties":{"debit":{"const":"unobserved","description":"The route reports no actual cash or purchased-credit debit. Included service still admits the work, but its cash stays unknown instead of zero and is outside the finite cap; absence keeps proven ordinary inclusion as zero cash.","type":"string"},"kind":{"enum":["included","paid_credits","cash","valuation","unknown"],"type":"string"},"nativeMode":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"}},"required":["nativeMode","kind","source"],"type":"object"},"usageCost":{"additionalProperties":false,"description":"Observed usage components. An amount of unknown meaning is not charged cash; separately proven included service can still establish exact zero incremental cash unless its route reports no actual debit.","properties":{"cashKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"cashUsd":{"minimum":0,"type":"number"},"unknownUsd":{"minimum":0,"type":"number"},"valuationKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"minimum":0,"type":"number"}},"required":["cashUsd","valuationUsd","unknownUsd","cashKnowledge","valuationKnowledge"],"type":"object"}},"required":["attemptId","harnessId"],"type":"object"},"type":"array"},"budget":{"anyOf":[{"additionalProperties":false,"description":"Budget snapshot for a run: cap, spend, and provenance.","properties":{"cashKnowledge":{"description":"Cash certainty from the ledger; explicit unknown keeps spendUsd null independently of valuation.","enum":["exact","estimated","unknown"],"type":"string"},"controllableSpendUsd":{"default":null,"description":"Cash governed by the finite cap: settled amounts on routes Claudexor controls; null when that cash is unknown. spendUsd can still be null when an included subscription reports no actual debit.","type":["number","null"]},"estimated":{"default":false,"description":"True when settled cash is estimated rather than exact; subscription valuation confidence is reported separately.","type":"boolean"},"evidence":{"default":"complete","description":"Integrity of the canonical events this spend fallback read: 'incomplete' when malformed/non-object event lines were skipped, 'unavailable' when the events file was unreadable, else 'complete'. A non-complete value means the projected spend may disagree with disk truth.","enum":["complete","incomplete","unavailable"],"type":"string"},"paidBudget":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"unlimited","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"finite","type":"string"},"maxUsd":{"minimum":0,"type":"number"}},"required":["kind","maxUsd"],"type":"object"}],"default":{"kind":"unlimited"},"description":"Incremental-cash budget: explicitly unlimited or a finite non-negative USD cap."},"remainingUsd":{"default":null,"description":"Remaining finite cap after controllableSpendUsd; null when no cap or unknown.","type":["number","null"]},"source":{"default":"unknown","description":"Where the snapshot came from: the decision record, live events, settings, or unknown.","enum":["decision","events","settings","unknown"],"type":"string"},"spendUsd":{"default":null,"description":"CASH spend so far in USD; null when unknown.","type":["number","null"]},"valuationKnowledge":{"default":"unknown","description":"Confidence of valuationUsd: 'estimated' when token-derived, 'unknown' when no usage was reported (valuationUsd is then null), 'exact' when natively priced.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"default":null,"description":"Subscription valuation in USD (separate from billed cash); null when unknown — never a fabricated $0 (QA-023c).","type":["number","null"]}},"type":"object"},{"type":"null"}],"default":null,"description":"Run budget snapshot (cash + subscription valuation, QA-023c); null when unavailable."},"continueFrom":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Predecessor run this run continues; null for an ordinary run, omitted when the detail did not project it."},"continuity":{"description":"Per-try continuation receipts (carrier, cause, accounts, model) from the run's event log; omitted when not projected.","items":{"additionalProperties":false,"description":"Receipt of one continued try: carrier, cause, accounts, memory, model attestation.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"carrier":{"description":"Carrier of a continued try: native (the vendor's own session, same account), native_moved (the session file made visible in the next account's store, then resumed there), packet (a fresh session re-grounded by an evidence index), or fresh (nothing to carry — a replay of the original prompt).","enum":["native","native_moved","packet","fresh"],"type":"string"},"cause":{"description":"Typed reason the previous process stopped: a vendor limit (next account eligible), the whole pool spent, a pinned account's limit, a transport death (crash, timeout, watchdog), a confirmed native tool permission refusal, context exhaustion, the wall-clock deadline, a cancel, a daemon/host restart, a model that asked for input, or another typed cause.","enum":["vendor_limit","pool_exhausted","pinned_limit","transport","permission_denied","context_exhausted","wall_clock","cancelled","host_restart","input_required","other"],"type":"string"},"from":{"additionalProperties":false,"properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"profileId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"runId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["runId","attemptId","profileId"],"type":"object"},"identityCheck":{"description":"Whether the resumed vendor session was the one requested, judged at the earliest handshake (codex thread/resume before turn/start; claude system/init): matched, mismatch caught before the child could act, mismatch caught after it may have acted, or not applicable (no resume was requested, or a harness without the continuity capability answered with another session id, which is recorded as before).","enum":["matched_before_effects","mismatch_before_effects","mismatch_after_possible_effects","not_applicable"],"type":"string"},"inputDelivery":{"description":"Whether the predecessor's last input (its turn prompt or an admitted steering message) is known to be in the vendor history: confirmed, uncertain (carried in the notice as a reference to reconcile, never replayed blindly), or not applicable.","enum":["confirmed","uncertain","not_applicable"],"type":"string"},"instructions":{"description":"as_sent: the successor's instructions equal the predecessor's; vendor_snapshot: they differ, and the vendor may resend its recorded system prompt instead (claude records it on the first request).","enum":["as_sent","vendor_snapshot"],"type":"string"},"memory":{"description":"Its own fact: a native resume carries the whole history (full); a packet re-brief is partial; a native resume that lost history (e.g. a rejected compacted item) is partial/unknown.","enum":["full","partial","unknown"],"type":"string"},"modelMismatch":{"type":["boolean","null"]},"observedModel":{"description":"THIS try's attested model (never borrowed from another try).","type":["string","null"]},"reingestedTokens":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"description":"Input + cache-creation tokens of the first resumed request, when known."},"to":{"additionalProperties":false,"properties":{"profileId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["profileId"],"type":"object"},"tryIndex":{"description":"Native try within the attempt; joins the receipt to its try.","minimum":0,"type":"integer"},"workspace":{"description":"Whether the continued try runs in the predecessor's execution root.","enum":["same_root","different_root"],"type":"string"}},"required":["tryIndex","attemptId","carrier","cause","from","to","workspace","memory","instructions","reingestedTokens","observedModel","modelMismatch","identityCheck","inputDelivery"],"type":"object"},"type":"array"},"council":{"anyOf":[{"additionalProperties":false,"description":"Council membership + merge disclosure for a --council plan run.","properties":{"degraded":{"default":false,"description":"True when fewer contract-accepted drafts than requested, including any retained unverified contribution; failures remain disclosed per member.","type":"boolean"},"drafted":{"description":"Members with contract-accepted drafts; excludes retained unverified inputs and is not a work-completion or verification count.","minimum":0,"type":"integer"},"members":{"default":[],"description":"Per-member role and outcome.","items":{"additionalProperties":false,"description":"One council member's role and draft/merge outcome.","properties":{"error":{"default":null,"description":"First redacted draft error; null unless the member failed.","type":["string","null"]},"harnessId":{"description":"Harness that drafted (or merged) this member's plan.","minLength":1,"type":"string"},"role":{"description":"primary = the merger that synthesizes the unified plan; member = draft only.","enum":["primary","member"],"type":"string"},"status":{"description":"Draft outcome: drafted = contract-accepted input; merged = accepted draft and successful merge; failed stays failed even when its unverified text helped the merger.","enum":["drafted","failed","merged"],"type":"string"}},"required":["harnessId","role","status"],"type":"object"},"type":"array"},"mergedBy":{"default":null,"description":"Harness that produced the unified plan (the primary); null if the merge failed.","type":["string","null"]},"requested":{"description":"Requested member count (n; at least 2, up to the configured Council cap).","exclusiveMinimum":0,"type":"integer"}},"required":["requested","drafted"],"type":"object"},{"type":"null"}],"default":null,"description":"Council membership + merge disclosure (QA-023b); null for solo/non-plan runs."},"decisionStatus":{"default":null,"description":"The arbitration decision status, when the run reached arbitration.","type":["string","null"]},"deferredMessage":{"anyOf":[{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"},{"type":"null"}],"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved."},"delegatedFromRunId":{"default":null,"description":"Claudexor Delegate parent id; null for ordinary runs and native subagents.","type":["string","null"]},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.","properties":{"effective":{"default":false,"type":"boolean"},"reason":{"default":"not_requested","enum":["pending","not_requested","injected_unused","used","runtime_unavailable","manifest_unsupported","access_profile_incompatible","partially_degraded","startup_failed"],"type":"string"},"remediation":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null},"requested":{"default":false,"type":"boolean"},"used":{"default":false,"type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Typed Delegate receipt; null when unavailable or legacy."},"detailProblem":{"anyOf":[{"additionalProperties":false,"description":"Typed failure of a post-run detail read whose durable run result still survives.","properties":{"code":{"description":"Stable machine code of the detail problem, if any.","type":["string","null"]},"message":{"description":"Human-readable description of the detail problem.","type":"string"},"retryable":{"description":"Whether retrying the detail read may help.","type":["boolean","null"]}},"required":["code","message","retryable"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed post-terminal detail-read problem (the durable run handle survives); null when the detail read succeeded."},"failure":{"anyOf":[{"additionalProperties":false,"description":"Typed failure record for a run: phase, category, evidence references, and suggested next actions.","properties":{"attemptId":{"default":null,"description":"Attempt involved in the failure, when known.","type":["string","null"]},"captureFailure":{"additionalProperties":false,"properties":{"bufferBudgetBytes":{"minimum":0,"type":"integer"},"causeCode":{"type":"string"},"cleanup":{"additionalProperties":false,"properties":{"code":{"type":["string","null"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"code":{"enum":["capture_output_exceeded","capture_output_incomplete","capture_preview_truncated","capture_failed"],"type":"string"},"drain":{"const":"truncated","type":"string"},"message":{"type":"string"},"stream":{"enum":["stdout","stderr"],"type":"string"}},"required":["code","message"],"type":"object"},"category":{"default":"unknown","description":"Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness.","enum":["validation","project","auth","harness_unavailable","harness_error","config_error","budget","policy","cancelled","internal","unknown"],"type":"string"},"code":{"anyOf":[{"description":"Machine-readable failure sub-code within a RunFailure category, including historical delegated-run failures and active access-profile refusals.","enum":["finite_zero","hard_cap","estimate_headroom","unknown_paid_in_flight","budget_overshoot","cost_unverifiable","delegation_child_drain_timeout","subscription_window_exhausted","credential_pool_exhausted","input_too_large","vendor_cli_too_old","credential_source_unconfirmed","delegated_home_unavailable","delegated_confinement_unavailable","delegated_evidence_incomplete","access_profile_incompatible","auxiliary_writable_roots_unsupported","retired_access_profile"],"type":"string"},{"type":"null"}],"default":null,"description":"Machine-readable failure sub-code within the category; null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage."},"eventRefs":{"default":[],"description":"Event references relevant to the failure.","items":{"type":"string"},"type":"array"},"harnessId":{"default":null,"description":"Harness involved in the failure, when known.","type":["string","null"]},"logRefs":{"default":[],"description":"Log artifact paths relevant to the failure.","items":{"type":"string"},"type":"array"},"nextActions":{"default":[],"description":"Suggested operator next actions.","items":{"type":"string"},"type":"array"},"phase":{"default":"unknown","description":"Pipeline phase where the failure happened.","type":"string"},"poolAttempts":{"default":[],"description":"Every failed execution try in order, each with its own account and error text; empty when no try failed (and for records written before this field existed).","items":{"additionalProperties":false,"description":"Per-try account attribution of a failed execution try (diagnostic evidence only).","properties":{"attemptId":{"description":"Attempt the try belongs to.","minLength":1,"type":"string"},"category":{"description":"Typed failure category of the try; untyped errors are unknown_harness_error.","enum":["timeout","rate_limited","auth_failed","capability_refused","process_crash","config_error","unknown_harness_error"],"type":"string"},"error":{"description":"The try's own error text with its original wording and whitespace, redacted.","type":"string"},"harnessId":{"description":"Harness the try ran on.","minLength":1,"type":"string"},"observedAt":{"description":"When the try's first error was observed.","format":"date-time","type":"string"},"phase":{"description":"How far the try got: before a typed session start, after start but before agent progress, or after progress.","enum":["pre_start","pre_progress","after_progress"],"type":"string"},"profileDisplayName":{"description":"The row's display name at try time (redacted); null for the default route.","type":["string","null"]},"profileId":{"description":"Account row the try ran on; null = the harness default route.","type":["string","null"]},"requestedModel":{"description":"Model the try asked for; null = the harness default model.","type":["string","null"]},"tryIndex":{"description":"Zero-based try index within the attempt.","minimum":0,"type":"integer"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"description":"The vendor's own typed failure for this try, when the adapter attached one."}},"required":["harnessId","profileId","profileDisplayName","requestedModel","attemptId","tryIndex","observedAt","phase","category","error","vendorFailure"],"type":"object"},"type":"array"},"rawDetailRef":{"default":null,"description":"Artifact path holding the raw (redacted) failure detail.","type":["string","null"]},"requestRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"actual":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"kind":{"const":"input_too_large","type":"string"},"limit":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"native_code":{"minLength":1,"type":"string"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"}},"required":["scope","unit","limit","source","kind","actual","native_code"],"type":"object"},{"additionalProperties":false,"properties":{"binary_path":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"installed_version":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"kind":{"const":"vendor_cli_too_old","type":"string"},"native_code":{"const":"claude_code_version_too_old","type":"string"},"source":{"const":"claude_stdout","type":"string"}},"required":["kind","native_code","source","binary_path","installed_version"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"credential_source_unconfirmed","type":"string"},"native_code":{"const":"grok_credential_source_unconfirmed","type":"string"},"reported_source":{"description":"Redacted credential source the vendor's startup frame reported.","maxLength":80,"type":"string"},"source":{"const":"grok_init","type":"string"}},"required":["kind","native_code","source","reported_source"],"type":"object"}],"description":"Vendor-attested request refusal that stops retries and account rotation on its harness; input, executable and credential-source causes carry their own evidence."},"resetsAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the refused window reopens (a spent subscription quota window), or null when the failure has no such time. Callers schedule a retry off this field, never off safeMessage."},"runDir":{"default":null,"description":"Run artifact directory.","type":["string","null"]},"safeMessage":{"description":"Redacted human-readable failure message.","type":"string"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"default":null,"description":"The vendor's own typed failure for the attempt this record speaks for, or null when no vendor-typed evidence exists (every harness without such a channel, and any unreadable record). Facts only: carries no remedy."}},"required":["safeMessage"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed terminal failure detail and recovery actions; null for non-failed runs."},"outcomeBanner":{"default":null,"description":"Server-owned outcome headline (D18); null while non-terminal.","type":["string","null"]},"outcomeFacts":{"anyOf":[{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},{"type":"null"}],"default":null,"description":"The D8 terminal outcome axes (checks/review/reason/noChanges), when terminal."},"parentRunId":{"default":null,"description":"Server-owned ordinary parent/follow-up run id, when present.","type":["string","null"]},"pendingInteractions":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Count of questions still awaiting answers, when known."},"planReadiness":{"anyOf":[{"additionalProperties":false,"description":"Server-derived readiness of a plan run (one derivation owner; D17).","properties":{"questionCount":{"default":0,"minimum":0,"type":"integer"},"state":{"description":"Derived plan readiness: ready (block parsed, zero open questions), needs_answers (open questions remain), unverified (no parseable block — the planner ignored the format).","enum":["ready","needs_answers","unverified"],"type":"string"}},"required":["state"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived plan readiness (plan runs only, D17); null otherwise."},"resumable":{"anyOf":[{"additionalProperties":false,"description":"Terminal facts of a stopped run that can be continued: cause, limit evidence, available carriers, the native session and the workspace.","properties":{"carriers":{"description":"Continuity representations still available (NOT quota readiness; readiness is described by the limit facts).","items":{"description":"A continuity representation still available for a stopped run.","enum":["native","native_moved","packet"],"type":"string"},"type":"array"},"cause":{"description":"Typed reason the previous process stopped: a vendor limit (next account eligible), the whole pool spent, a pinned account's limit, a transport death (crash, timeout, watchdog), a confirmed native tool permission refusal, context exhaustion, the wall-clock deadline, a cancel, a daemon/host restart, a model that asked for input, or another typed cause.","enum":["vendor_limit","pool_exhausted","pinned_limit","transport","permission_denied","context_exhausted","wall_clock","cancelled","host_restart","input_required","other"],"type":"string"},"limitCode":{"description":"The typed vendor limit code that ended the work, when any.","type":["string","null"]},"limitEvidence":{"anyOf":[{"description":"window: the vendor named the spent window (a reset instant or a constraint id); unspecified: a typed limit without a window — a bare backoff frame is transport, not a limit.","enum":["window","unspecified"],"type":"string"},{"type":"null"}],"description":"window: the vendor named the spent window (a reset instant or a constraint id); unspecified: a typed limit without a window — a bare backoff frame is transport, not a limit."},"limitWindow":{"description":"The vendor's own name for the spent window (e.g. five_hour, seven_day_opus), when known.","type":["string","null"]},"resetsAt":{"description":"When the spent vendor window reopens, only from a vendor signal; never fabricated.","type":["string","null"]},"session":{"anyOf":[{"additionalProperties":false,"properties":{"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"holderProfileId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"nativeSessionId":{"minLength":1,"type":"string"}},"required":["harness","nativeSessionId","holderProfileId"],"type":"object"},{"type":"null"}],"description":"The native session a continuation can resume, when one exists."},"workspace":{"additionalProperties":false,"description":"Where the stopped work's tree is: the live root, a retained envelope, or gone.","properties":{"kind":{"enum":["in_place","retained_envelope","none"],"type":"string"},"root":{"type":["string","null"]}},"required":["kind","root"],"type":"object"}},"required":["cause","resetsAt","limitWindow","limitEvidence","carriers","limitCode","session","workspace"],"type":"object"},{"type":"null"}],"description":"Terminal facts of stopped unfinished work that claudexor_run_continue can continue (cause, resetsAt, carriers, session, workspace); null when the work finished or the run is not terminal, omitted when not projected."},"retainedEnvelope":{"anyOf":[{"additionalProperties":false,"description":"An isolated envelope kept for continuation: continue it with continueFrom, or release it with the discard decision.","properties":{"bytes":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"description":"Disk use of the kept envelope (tree + scoped home); null when not measured."},"cause":{"anyOf":[{"description":"Typed reason the previous process stopped: a vendor limit (next account eligible), the whole pool spent, a pinned account's limit, a transport death (crash, timeout, watchdog), a confirmed native tool permission refusal, context exhaustion, the wall-clock deadline, a cancel, a daemon/host restart, a model that asked for input, or another typed cause.","enum":["vendor_limit","pool_exhausted","pinned_limit","transport","permission_denied","context_exhausted","wall_clock","cancelled","host_restart","input_required","other"],"type":"string"},{"type":"null"}],"description":"Why the run stopped, when recorded."},"retainedAt":{"description":"When the envelope was kept.","type":"string"},"root":{"description":"Absolute path of the kept working tree.","type":"string"}},"required":["root","bytes","retainedAt","cause"],"type":"object"},{"type":"null"}],"description":"Isolated envelope kept for a successor (disk use visible); null when none, omitted when not projected."},"runDir":{"default":null,"description":"Artifact directory; null when absent.","type":["string","null"]},"runFacts":{"anyOf":[{"additionalProperties":false,"description":"Validated immutable terminal facts for one run.","properties":{"apply":{"additionalProperties":false,"description":"Terminal apply eligibility and operator-decision state.","properties":{"eligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Delivery-gate eligibility at terminalization; null when nothing is applyable."},"operator_decision_present":{"default":false,"description":"Whether a valid operator decision was present when the receipt was finalized.","type":"boolean"}},"type":"object"},"deliverable":{"additionalProperties":false,"description":"Canonical primary-output presence and identity for a terminal run.","properties":{"kind":{"anyOf":[{"enum":["answer","report","plan","patch","files","structured_output"],"type":"string"},{"type":"null"}],"description":"Kind of canonical primary deliverable; null when none exists."},"path":{"description":"Run-relative path of the canonical primary deliverable; null when absent.","type":["string","null"]},"present":{"description":"Whether the canonical primary deliverable exists.","type":"boolean"},"producer_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt that produced the deliverable, when known."}},"required":["present","kind","path"],"type":"object"},"gates":{"additionalProperties":false,"description":"Canonical gate configuration and terminal receipt projection.","properties":{"configured":{"description":"Whether the frozen task configured deterministic gates.","type":"boolean"},"executed":{"description":"Whether the terminal attempt executed the gate set.","type":"boolean"},"receipt_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt whose gate receipt decides this projection; null when no gates executed."},"required":{"description":"Number of configured required gates.","minimum":0,"type":"integer"},"state":{"description":"Terminal state of the configured deterministic gate set.","enum":["not_configured","passed","failed","skipped"],"type":"string"},"total":{"description":"Total configured deterministic gates.","minimum":0,"type":"integer"}},"required":["configured","required","total","executed","state"],"type":"object"},"generated_at":{"description":"When this immutable terminal receipt was finalized.","minLength":1,"type":"string"},"mode":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"outcome":{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},"participants":{"additionalProperties":false,"description":"Terminal participant graph plus its planner-lane count.","properties":{"attempts":{"default":[],"description":"Role-labelled participant roster.","items":{"additionalProperties":false,"description":"One role-labelled participant in the terminal run graph.","properties":{"attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Attempt id when the participant owns an orchestrator attempt; null for reviewer-panel members."},"deliverable_present":{"default":false,"description":"Whether this participant produced the deliverable its role requested.","type":"boolean"},"harness_id":{"description":"Harness that served this participant role.","minLength":1,"type":"string"},"role":{"description":"Canonical role of one participant in the terminal run graph.","enum":["planner","merge","candidate","scout","reducer","reviewer"],"type":"string"},"status":{"anyOf":[{"description":"Terminal outcome recorded for one run participant.","enum":["success","success_with_warnings","blocked","failed"],"type":"string"},{"type":"null"}],"default":null,"description":"Participant outcome when recorded; null for artifact-only reviewer membership."}},"required":["attempt_id","harness_id","role"],"type":"object"},"type":"array"},"planners":{"description":"Number of participants whose canonical role is planner.","minimum":0,"type":"integer"}},"required":["planners"],"type":"object"},"presentation":{"additionalProperties":false,"description":"Immutable terminal output state and primary artifact. Absent only on legacy RunFacts receipts.","properties":{"primary":{"anyOf":[{"additionalProperties":false,"description":"Primary user-facing artifact selected once during terminal preparation.","properties":{"kind":{"description":"Presentation kind of the terminal primary artifact.","enum":["answer","report","plan","patch","files","structured_output","diagnostic"],"type":"string"},"path":{"description":"Normalized run-relative path of the terminal primary artifact.","minLength":1,"type":"string"}},"required":["kind","path"],"type":"object"},{"type":"null"}],"description":"Selected terminal primary artifact, or null when the receipt announces readiness without a primary deliverable."},"state":{"description":"Terminal output readiness decided by the last valid output.ready receipt.","enum":["ready","diagnostic"],"type":"string"}},"required":["state","primary"],"type":"object"},"required_actions":{"default":[],"description":"Typed actions required to unblock this terminal outcome.","items":{"additionalProperties":false,"description":"One typed required operator action derived from a run's terminal outcome facts.","properties":{"detail":{"description":"Human-readable guidance for this action (English-only, INV-141).","type":"string"},"id":{"description":"Stable machine id for a required operator action on a blocked terminal run.","enum":["provide_required_input","complete_incomplete_work","resolve_review_block","fix_failed_checks","record_operator_decision"],"type":"string"}},"required":["id","detail"],"type":"object"},"type":"array"},"review":{"additionalProperties":false,"description":"Canonical terminal review verdict and blocking-finding identity.","properties":{"blocker_ids":{"default":[],"description":"Stable ids of accepted evidence-backed blocking findings.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"blockers":{"description":"Number of blocking findings.","minimum":0,"type":"integer"},"state":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"}},"required":["state","blockers"],"type":"object"},"run_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"schema_version":{"const":2,"description":"Schema version of the artifact; bumped on breaking ABI changes.","type":"number"},"task_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["schema_version","run_id","task_id","mode","outcome","deliverable","participants","gates","review","apply","generated_at"],"type":"object"},{"type":"null"}],"default":null,"description":"Validated canonical terminal RunFacts receipt; null while active, unavailable, or for legacy runs."},"runId":{"default":null,"description":"The daemon run id, when known.","type":["string","null"]},"secretLike":{"anyOf":[{"additionalProperties":false,"description":"What a run's saved copies hide: secret-like strings kept in the work, hidden on disk.","properties":{"answerMatches":{"description":"Strings hidden in the answer.","minimum":0,"type":"integer"},"binaryPaths":{"description":"Binary files whose payload the saved patch omits.","items":{"type":"string"},"type":"array"},"exactPatchRecorded":{"description":"For a redacted copy: whether the private exact patch object was recorded (false = deferred Apply answers patch_exact_bytes_unavailable); null for an exact copy.","type":["boolean","null"]},"files":{"description":"Changed files with hidden strings in the saved patch copy.","items":{"additionalProperties":false,"properties":{"kinds":{"description":"Content-rule ids that matched.","items":{"type":"string"},"type":"array"},"matches":{"description":"Strings hidden in that file's diff.","minimum":0,"type":"integer"},"path":{"description":"Changed file whose saved diff hides strings.","type":"string"}},"required":["path","matches","kinds"],"type":"object"},"type":"array"},"mediaWithheld":{"description":"Images that were not saved as produced outputs.","items":{"type":"string"},"type":"array"},"persistedPatch":{"description":"Whether the saved final/patch.diff is byte-exact or a display-only redacted copy.","enum":["exact","redacted"],"type":"string"},"totalMatches":{"description":"Strings hidden across patch and answer.","minimum":0,"type":"integer"}},"required":["totalMatches","answerMatches","files","binaryPaths","mediaWithheld","persistedPatch","exactPatchRecorded"],"type":"object"},{"type":"null"}],"default":null,"description":"INV-062 disclosure: secret-like strings kept in the work but hidden in saved copies (paths and counts only); null when nothing was hidden."},"status":{"default":null,"description":"The run's terminal or in-flight lifecycle state, when known.","type":["string","null"]},"summary":{"description":"Human-readable outcome/status text (same as the tool's text content).","type":"string"}},"required":["summary"],"type":"object"}},{"annotations":{"readOnlyHint":true},"description":"Read the current daemon-acknowledged state of a durable Claudexor run.","inputSchema":{"additionalProperties":false,"properties":{"runId":{"description":"Daemon run id (from a run tool's runId trailer or claudexor_runs).","minLength":1,"type":"string"}},"required":["runId"],"type":"object"},"name":"claudexor_run_status","outputSchema":{"additionalProperties":false,"description":"Structured MCP result for Claudexor durable-run read tools (inspect/status/result).","properties":{"applyEligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived apply-gate verdict; null for read-only runs or when no patch exists."},"attemptExecution":{"items":{"additionalProperties":false,"description":"Compact projection of existing attempt execution and amount evidence.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"harnessId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"processing":{"additionalProperties":false,"description":"Requested intent, submitted native control, and observed execution are independent facts. A submitted flag never proves observed service; mixed or missing session observations remain explicit.","properties":{"observed":{"enum":["standard","fast","economy","mixed","unknown"],"type":"string"},"observedNative":{"items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"reason":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"requested":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"submitted":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"submittedNative":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."}},"required":["requested","submitted","submittedNative","observed","observedNative","reason","source"],"type":"object"},"processingCostBasis":{"additionalProperties":false,"description":"Mode-qualified billing evidence for an existing cost record. Authentication alone does not establish included premium service; credits, cash, and token valuation stay distinct.","properties":{"debit":{"const":"unobserved","description":"The route reports no actual cash or purchased-credit debit. Included service still admits the work, but its cash stays unknown instead of zero and is outside the finite cap; absence keeps proven ordinary inclusion as zero cash.","type":"string"},"kind":{"enum":["included","paid_credits","cash","valuation","unknown"],"type":"string"},"nativeMode":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"}},"required":["nativeMode","kind","source"],"type":"object"},"usageCost":{"additionalProperties":false,"description":"Observed usage components. An amount of unknown meaning is not charged cash; separately proven included service can still establish exact zero incremental cash unless its route reports no actual debit.","properties":{"cashKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"cashUsd":{"minimum":0,"type":"number"},"unknownUsd":{"minimum":0,"type":"number"},"valuationKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"minimum":0,"type":"number"}},"required":["cashUsd","valuationUsd","unknownUsd","cashKnowledge","valuationKnowledge"],"type":"object"}},"required":["attemptId","harnessId"],"type":"object"},"type":"array"},"budget":{"anyOf":[{"additionalProperties":false,"description":"Budget snapshot for a run: cap, spend, and provenance.","properties":{"cashKnowledge":{"description":"Cash certainty from the ledger; explicit unknown keeps spendUsd null independently of valuation.","enum":["exact","estimated","unknown"],"type":"string"},"controllableSpendUsd":{"default":null,"description":"Cash governed by the finite cap: settled amounts on routes Claudexor controls; null when that cash is unknown. spendUsd can still be null when an included subscription reports no actual debit.","type":["number","null"]},"estimated":{"default":false,"description":"True when settled cash is estimated rather than exact; subscription valuation confidence is reported separately.","type":"boolean"},"evidence":{"default":"complete","description":"Integrity of the canonical events this spend fallback read: 'incomplete' when malformed/non-object event lines were skipped, 'unavailable' when the events file was unreadable, else 'complete'. A non-complete value means the projected spend may disagree with disk truth.","enum":["complete","incomplete","unavailable"],"type":"string"},"paidBudget":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"unlimited","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"finite","type":"string"},"maxUsd":{"minimum":0,"type":"number"}},"required":["kind","maxUsd"],"type":"object"}],"default":{"kind":"unlimited"},"description":"Incremental-cash budget: explicitly unlimited or a finite non-negative USD cap."},"remainingUsd":{"default":null,"description":"Remaining finite cap after controllableSpendUsd; null when no cap or unknown.","type":["number","null"]},"source":{"default":"unknown","description":"Where the snapshot came from: the decision record, live events, settings, or unknown.","enum":["decision","events","settings","unknown"],"type":"string"},"spendUsd":{"default":null,"description":"CASH spend so far in USD; null when unknown.","type":["number","null"]},"valuationKnowledge":{"default":"unknown","description":"Confidence of valuationUsd: 'estimated' when token-derived, 'unknown' when no usage was reported (valuationUsd is then null), 'exact' when natively priced.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"default":null,"description":"Subscription valuation in USD (separate from billed cash); null when unknown — never a fabricated $0 (QA-023c).","type":["number","null"]}},"type":"object"},{"type":"null"}],"default":null,"description":"Run budget snapshot (cash + subscription valuation, QA-023c); null when unavailable."},"continueFrom":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Predecessor run this run continues; null for an ordinary run, omitted when the detail did not project it."},"continuity":{"description":"Per-try continuation receipts (carrier, cause, accounts, model) from the run's event log; omitted when not projected.","items":{"additionalProperties":false,"description":"Receipt of one continued try: carrier, cause, accounts, memory, model attestation.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"carrier":{"description":"Carrier of a continued try: native (the vendor's own session, same account), native_moved (the session file made visible in the next account's store, then resumed there), packet (a fresh session re-grounded by an evidence index), or fresh (nothing to carry — a replay of the original prompt).","enum":["native","native_moved","packet","fresh"],"type":"string"},"cause":{"description":"Typed reason the previous process stopped: a vendor limit (next account eligible), the whole pool spent, a pinned account's limit, a transport death (crash, timeout, watchdog), a confirmed native tool permission refusal, context exhaustion, the wall-clock deadline, a cancel, a daemon/host restart, a model that asked for input, or another typed cause.","enum":["vendor_limit","pool_exhausted","pinned_limit","transport","permission_denied","context_exhausted","wall_clock","cancelled","host_restart","input_required","other"],"type":"string"},"from":{"additionalProperties":false,"properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"profileId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"runId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["runId","attemptId","profileId"],"type":"object"},"identityCheck":{"description":"Whether the resumed vendor session was the one requested, judged at the earliest handshake (codex thread/resume before turn/start; claude system/init): matched, mismatch caught before the child could act, mismatch caught after it may have acted, or not applicable (no resume was requested, or a harness without the continuity capability answered with another session id, which is recorded as before).","enum":["matched_before_effects","mismatch_before_effects","mismatch_after_possible_effects","not_applicable"],"type":"string"},"inputDelivery":{"description":"Whether the predecessor's last input (its turn prompt or an admitted steering message) is known to be in the vendor history: confirmed, uncertain (carried in the notice as a reference to reconcile, never replayed blindly), or not applicable.","enum":["confirmed","uncertain","not_applicable"],"type":"string"},"instructions":{"description":"as_sent: the successor's instructions equal the predecessor's; vendor_snapshot: they differ, and the vendor may resend its recorded system prompt instead (claude records it on the first request).","enum":["as_sent","vendor_snapshot"],"type":"string"},"memory":{"description":"Its own fact: a native resume carries the whole history (full); a packet re-brief is partial; a native resume that lost history (e.g. a rejected compacted item) is partial/unknown.","enum":["full","partial","unknown"],"type":"string"},"modelMismatch":{"type":["boolean","null"]},"observedModel":{"description":"THIS try's attested model (never borrowed from another try).","type":["string","null"]},"reingestedTokens":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"description":"Input + cache-creation tokens of the first resumed request, when known."},"to":{"additionalProperties":false,"properties":{"profileId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["profileId"],"type":"object"},"tryIndex":{"description":"Native try within the attempt; joins the receipt to its try.","minimum":0,"type":"integer"},"workspace":{"description":"Whether the continued try runs in the predecessor's execution root.","enum":["same_root","different_root"],"type":"string"}},"required":["tryIndex","attemptId","carrier","cause","from","to","workspace","memory","instructions","reingestedTokens","observedModel","modelMismatch","identityCheck","inputDelivery"],"type":"object"},"type":"array"},"council":{"anyOf":[{"additionalProperties":false,"description":"Council membership + merge disclosure for a --council plan run.","properties":{"degraded":{"default":false,"description":"True when fewer contract-accepted drafts than requested, including any retained unverified contribution; failures remain disclosed per member.","type":"boolean"},"drafted":{"description":"Members with contract-accepted drafts; excludes retained unverified inputs and is not a work-completion or verification count.","minimum":0,"type":"integer"},"members":{"default":[],"description":"Per-member role and outcome.","items":{"additionalProperties":false,"description":"One council member's role and draft/merge outcome.","properties":{"error":{"default":null,"description":"First redacted draft error; null unless the member failed.","type":["string","null"]},"harnessId":{"description":"Harness that drafted (or merged) this member's plan.","minLength":1,"type":"string"},"role":{"description":"primary = the merger that synthesizes the unified plan; member = draft only.","enum":["primary","member"],"type":"string"},"status":{"description":"Draft outcome: drafted = contract-accepted input; merged = accepted draft and successful merge; failed stays failed even when its unverified text helped the merger.","enum":["drafted","failed","merged"],"type":"string"}},"required":["harnessId","role","status"],"type":"object"},"type":"array"},"mergedBy":{"default":null,"description":"Harness that produced the unified plan (the primary); null if the merge failed.","type":["string","null"]},"requested":{"description":"Requested member count (n; at least 2, up to the configured Council cap).","exclusiveMinimum":0,"type":"integer"}},"required":["requested","drafted"],"type":"object"},{"type":"null"}],"default":null,"description":"Council membership + merge disclosure (QA-023b); null for solo/non-plan runs."},"decisionStatus":{"default":null,"description":"The arbitration decision status, when the run reached arbitration.","type":["string","null"]},"deferredMessage":{"anyOf":[{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"},{"type":"null"}],"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved."},"delegatedFromRunId":{"default":null,"description":"Claudexor Delegate parent id; null for ordinary runs and native subagents.","type":["string","null"]},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.","properties":{"effective":{"default":false,"type":"boolean"},"reason":{"default":"not_requested","enum":["pending","not_requested","injected_unused","used","runtime_unavailable","manifest_unsupported","access_profile_incompatible","partially_degraded","startup_failed"],"type":"string"},"remediation":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null},"requested":{"default":false,"type":"boolean"},"used":{"default":false,"type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Typed Delegate receipt; null when unavailable or legacy."},"detailProblem":{"anyOf":[{"additionalProperties":false,"description":"Typed failure of a post-run detail read whose durable run result still survives.","properties":{"code":{"description":"Stable machine code of the detail problem, if any.","type":["string","null"]},"message":{"description":"Human-readable description of the detail problem.","type":"string"},"retryable":{"description":"Whether retrying the detail read may help.","type":["boolean","null"]}},"required":["code","message","retryable"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed post-terminal detail-read problem (the durable run handle survives); null when the detail read succeeded."},"failure":{"anyOf":[{"additionalProperties":false,"description":"Typed failure record for a run: phase, category, evidence references, and suggested next actions.","properties":{"attemptId":{"default":null,"description":"Attempt involved in the failure, when known.","type":["string","null"]},"captureFailure":{"additionalProperties":false,"properties":{"bufferBudgetBytes":{"minimum":0,"type":"integer"},"causeCode":{"type":"string"},"cleanup":{"additionalProperties":false,"properties":{"code":{"type":["string","null"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"code":{"enum":["capture_output_exceeded","capture_output_incomplete","capture_preview_truncated","capture_failed"],"type":"string"},"drain":{"const":"truncated","type":"string"},"message":{"type":"string"},"stream":{"enum":["stdout","stderr"],"type":"string"}},"required":["code","message"],"type":"object"},"category":{"default":"unknown","description":"Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness.","enum":["validation","project","auth","harness_unavailable","harness_error","config_error","budget","policy","cancelled","internal","unknown"],"type":"string"},"code":{"anyOf":[{"description":"Machine-readable failure sub-code within a RunFailure category, including historical delegated-run failures and active access-profile refusals.","enum":["finite_zero","hard_cap","estimate_headroom","unknown_paid_in_flight","budget_overshoot","cost_unverifiable","delegation_child_drain_timeout","subscription_window_exhausted","credential_pool_exhausted","input_too_large","vendor_cli_too_old","credential_source_unconfirmed","delegated_home_unavailable","delegated_confinement_unavailable","delegated_evidence_incomplete","access_profile_incompatible","auxiliary_writable_roots_unsupported","retired_access_profile"],"type":"string"},{"type":"null"}],"default":null,"description":"Machine-readable failure sub-code within the category; null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage."},"eventRefs":{"default":[],"description":"Event references relevant to the failure.","items":{"type":"string"},"type":"array"},"harnessId":{"default":null,"description":"Harness involved in the failure, when known.","type":["string","null"]},"logRefs":{"default":[],"description":"Log artifact paths relevant to the failure.","items":{"type":"string"},"type":"array"},"nextActions":{"default":[],"description":"Suggested operator next actions.","items":{"type":"string"},"type":"array"},"phase":{"default":"unknown","description":"Pipeline phase where the failure happened.","type":"string"},"poolAttempts":{"default":[],"description":"Every failed execution try in order, each with its own account and error text; empty when no try failed (and for records written before this field existed).","items":{"additionalProperties":false,"description":"Per-try account attribution of a failed execution try (diagnostic evidence only).","properties":{"attemptId":{"description":"Attempt the try belongs to.","minLength":1,"type":"string"},"category":{"description":"Typed failure category of the try; untyped errors are unknown_harness_error.","enum":["timeout","rate_limited","auth_failed","capability_refused","process_crash","config_error","unknown_harness_error"],"type":"string"},"error":{"description":"The try's own error text with its original wording and whitespace, redacted.","type":"string"},"harnessId":{"description":"Harness the try ran on.","minLength":1,"type":"string"},"observedAt":{"description":"When the try's first error was observed.","format":"date-time","type":"string"},"phase":{"description":"How far the try got: before a typed session start, after start but before agent progress, or after progress.","enum":["pre_start","pre_progress","after_progress"],"type":"string"},"profileDisplayName":{"description":"The row's display name at try time (redacted); null for the default route.","type":["string","null"]},"profileId":{"description":"Account row the try ran on; null = the harness default route.","type":["string","null"]},"requestedModel":{"description":"Model the try asked for; null = the harness default model.","type":["string","null"]},"tryIndex":{"description":"Zero-based try index within the attempt.","minimum":0,"type":"integer"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"description":"The vendor's own typed failure for this try, when the adapter attached one."}},"required":["harnessId","profileId","profileDisplayName","requestedModel","attemptId","tryIndex","observedAt","phase","category","error","vendorFailure"],"type":"object"},"type":"array"},"rawDetailRef":{"default":null,"description":"Artifact path holding the raw (redacted) failure detail.","type":["string","null"]},"requestRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"actual":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"kind":{"const":"input_too_large","type":"string"},"limit":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"native_code":{"minLength":1,"type":"string"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"}},"required":["scope","unit","limit","source","kind","actual","native_code"],"type":"object"},{"additionalProperties":false,"properties":{"binary_path":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"installed_version":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"kind":{"const":"vendor_cli_too_old","type":"string"},"native_code":{"const":"claude_code_version_too_old","type":"string"},"source":{"const":"claude_stdout","type":"string"}},"required":["kind","native_code","source","binary_path","installed_version"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"credential_source_unconfirmed","type":"string"},"native_code":{"const":"grok_credential_source_unconfirmed","type":"string"},"reported_source":{"description":"Redacted credential source the vendor's startup frame reported.","maxLength":80,"type":"string"},"source":{"const":"grok_init","type":"string"}},"required":["kind","native_code","source","reported_source"],"type":"object"}],"description":"Vendor-attested request refusal that stops retries and account rotation on its harness; input, executable and credential-source causes carry their own evidence."},"resetsAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the refused window reopens (a spent subscription quota window), or null when the failure has no such time. Callers schedule a retry off this field, never off safeMessage."},"runDir":{"default":null,"description":"Run artifact directory.","type":["string","null"]},"safeMessage":{"description":"Redacted human-readable failure message.","type":"string"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"default":null,"description":"The vendor's own typed failure for the attempt this record speaks for, or null when no vendor-typed evidence exists (every harness without such a channel, and any unreadable record). Facts only: carries no remedy."}},"required":["safeMessage"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed terminal failure detail and recovery actions; null for non-failed runs."},"outcomeBanner":{"default":null,"description":"Server-owned outcome headline (D18); null while non-terminal.","type":["string","null"]},"outcomeFacts":{"anyOf":[{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},{"type":"null"}],"default":null,"description":"The D8 terminal outcome axes (checks/review/reason/noChanges), when terminal."},"parentRunId":{"default":null,"description":"Server-owned ordinary parent/follow-up run id, when present.","type":["string","null"]},"pendingInteractions":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Count of questions still awaiting answers, when known."},"planReadiness":{"anyOf":[{"additionalProperties":false,"description":"Server-derived readiness of a plan run (one derivation owner; D17).","properties":{"questionCount":{"default":0,"minimum":0,"type":"integer"},"state":{"description":"Derived plan readiness: ready (block parsed, zero open questions), needs_answers (open questions remain), unverified (no parseable block — the planner ignored the format).","enum":["ready","needs_answers","unverified"],"type":"string"}},"required":["state"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived plan readiness (plan runs only, D17); null otherwise."},"resumable":{"anyOf":[{"additionalProperties":false,"description":"Terminal facts of a stopped run that can be continued: cause, limit evidence, available carriers, the native session and the workspace.","properties":{"carriers":{"description":"Continuity representations still available (NOT quota readiness; readiness is described by the limit facts).","items":{"description":"A continuity representation still available for a stopped run.","enum":["native","native_moved","packet"],"type":"string"},"type":"array"},"cause":{"description":"Typed reason the previous process stopped: a vendor limit (next account eligible), the whole pool spent, a pinned account's limit, a transport death (crash, timeout, watchdog), a confirmed native tool permission refusal, context exhaustion, the wall-clock deadline, a cancel, a daemon/host restart, a model that asked for input, or another typed cause.","enum":["vendor_limit","pool_exhausted","pinned_limit","transport","permission_denied","context_exhausted","wall_clock","cancelled","host_restart","input_required","other"],"type":"string"},"limitCode":{"description":"The typed vendor limit code that ended the work, when any.","type":["string","null"]},"limitEvidence":{"anyOf":[{"description":"window: the vendor named the spent window (a reset instant or a constraint id); unspecified: a typed limit without a window — a bare backoff frame is transport, not a limit.","enum":["window","unspecified"],"type":"string"},{"type":"null"}],"description":"window: the vendor named the spent window (a reset instant or a constraint id); unspecified: a typed limit without a window — a bare backoff frame is transport, not a limit."},"limitWindow":{"description":"The vendor's own name for the spent window (e.g. five_hour, seven_day_opus), when known.","type":["string","null"]},"resetsAt":{"description":"When the spent vendor window reopens, only from a vendor signal; never fabricated.","type":["string","null"]},"session":{"anyOf":[{"additionalProperties":false,"properties":{"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"holderProfileId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"nativeSessionId":{"minLength":1,"type":"string"}},"required":["harness","nativeSessionId","holderProfileId"],"type":"object"},{"type":"null"}],"description":"The native session a continuation can resume, when one exists."},"workspace":{"additionalProperties":false,"description":"Where the stopped work's tree is: the live root, a retained envelope, or gone.","properties":{"kind":{"enum":["in_place","retained_envelope","none"],"type":"string"},"root":{"type":["string","null"]}},"required":["kind","root"],"type":"object"}},"required":["cause","resetsAt","limitWindow","limitEvidence","carriers","limitCode","session","workspace"],"type":"object"},{"type":"null"}],"description":"Terminal facts of stopped unfinished work that claudexor_run_continue can continue (cause, resetsAt, carriers, session, workspace); null when the work finished or the run is not terminal, omitted when not projected."},"retainedEnvelope":{"anyOf":[{"additionalProperties":false,"description":"An isolated envelope kept for continuation: continue it with continueFrom, or release it with the discard decision.","properties":{"bytes":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"description":"Disk use of the kept envelope (tree + scoped home); null when not measured."},"cause":{"anyOf":[{"description":"Typed reason the previous process stopped: a vendor limit (next account eligible), the whole pool spent, a pinned account's limit, a transport death (crash, timeout, watchdog), a confirmed native tool permission refusal, context exhaustion, the wall-clock deadline, a cancel, a daemon/host restart, a model that asked for input, or another typed cause.","enum":["vendor_limit","pool_exhausted","pinned_limit","transport","permission_denied","context_exhausted","wall_clock","cancelled","host_restart","input_required","other"],"type":"string"},{"type":"null"}],"description":"Why the run stopped, when recorded."},"retainedAt":{"description":"When the envelope was kept.","type":"string"},"root":{"description":"Absolute path of the kept working tree.","type":"string"}},"required":["root","bytes","retainedAt","cause"],"type":"object"},{"type":"null"}],"description":"Isolated envelope kept for a successor (disk use visible); null when none, omitted when not projected."},"runDir":{"default":null,"description":"Artifact directory; null when absent.","type":["string","null"]},"runFacts":{"anyOf":[{"additionalProperties":false,"description":"Validated immutable terminal facts for one run.","properties":{"apply":{"additionalProperties":false,"description":"Terminal apply eligibility and operator-decision state.","properties":{"eligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Delivery-gate eligibility at terminalization; null when nothing is applyable."},"operator_decision_present":{"default":false,"description":"Whether a valid operator decision was present when the receipt was finalized.","type":"boolean"}},"type":"object"},"deliverable":{"additionalProperties":false,"description":"Canonical primary-output presence and identity for a terminal run.","properties":{"kind":{"anyOf":[{"enum":["answer","report","plan","patch","files","structured_output"],"type":"string"},{"type":"null"}],"description":"Kind of canonical primary deliverable; null when none exists."},"path":{"description":"Run-relative path of the canonical primary deliverable; null when absent.","type":["string","null"]},"present":{"description":"Whether the canonical primary deliverable exists.","type":"boolean"},"producer_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt that produced the deliverable, when known."}},"required":["present","kind","path"],"type":"object"},"gates":{"additionalProperties":false,"description":"Canonical gate configuration and terminal receipt projection.","properties":{"configured":{"description":"Whether the frozen task configured deterministic gates.","type":"boolean"},"executed":{"description":"Whether the terminal attempt executed the gate set.","type":"boolean"},"receipt_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt whose gate receipt decides this projection; null when no gates executed."},"required":{"description":"Number of configured required gates.","minimum":0,"type":"integer"},"state":{"description":"Terminal state of the configured deterministic gate set.","enum":["not_configured","passed","failed","skipped"],"type":"string"},"total":{"description":"Total configured deterministic gates.","minimum":0,"type":"integer"}},"required":["configured","required","total","executed","state"],"type":"object"},"generated_at":{"description":"When this immutable terminal receipt was finalized.","minLength":1,"type":"string"},"mode":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"outcome":{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},"participants":{"additionalProperties":false,"description":"Terminal participant graph plus its planner-lane count.","properties":{"attempts":{"default":[],"description":"Role-labelled participant roster.","items":{"additionalProperties":false,"description":"One role-labelled participant in the terminal run graph.","properties":{"attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Attempt id when the participant owns an orchestrator attempt; null for reviewer-panel members."},"deliverable_present":{"default":false,"description":"Whether this participant produced the deliverable its role requested.","type":"boolean"},"harness_id":{"description":"Harness that served this participant role.","minLength":1,"type":"string"},"role":{"description":"Canonical role of one participant in the terminal run graph.","enum":["planner","merge","candidate","scout","reducer","reviewer"],"type":"string"},"status":{"anyOf":[{"description":"Terminal outcome recorded for one run participant.","enum":["success","success_with_warnings","blocked","failed"],"type":"string"},{"type":"null"}],"default":null,"description":"Participant outcome when recorded; null for artifact-only reviewer membership."}},"required":["attempt_id","harness_id","role"],"type":"object"},"type":"array"},"planners":{"description":"Number of participants whose canonical role is planner.","minimum":0,"type":"integer"}},"required":["planners"],"type":"object"},"presentation":{"additionalProperties":false,"description":"Immutable terminal output state and primary artifact. Absent only on legacy RunFacts receipts.","properties":{"primary":{"anyOf":[{"additionalProperties":false,"description":"Primary user-facing artifact selected once during terminal preparation.","properties":{"kind":{"description":"Presentation kind of the terminal primary artifact.","enum":["answer","report","plan","patch","files","structured_output","diagnostic"],"type":"string"},"path":{"description":"Normalized run-relative path of the terminal primary artifact.","minLength":1,"type":"string"}},"required":["kind","path"],"type":"object"},{"type":"null"}],"description":"Selected terminal primary artifact, or null when the receipt announces readiness without a primary deliverable."},"state":{"description":"Terminal output readiness decided by the last valid output.ready receipt.","enum":["ready","diagnostic"],"type":"string"}},"required":["state","primary"],"type":"object"},"required_actions":{"default":[],"description":"Typed actions required to unblock this terminal outcome.","items":{"additionalProperties":false,"description":"One typed required operator action derived from a run's terminal outcome facts.","properties":{"detail":{"description":"Human-readable guidance for this action (English-only, INV-141).","type":"string"},"id":{"description":"Stable machine id for a required operator action on a blocked terminal run.","enum":["provide_required_input","complete_incomplete_work","resolve_review_block","fix_failed_checks","record_operator_decision"],"type":"string"}},"required":["id","detail"],"type":"object"},"type":"array"},"review":{"additionalProperties":false,"description":"Canonical terminal review verdict and blocking-finding identity.","properties":{"blocker_ids":{"default":[],"description":"Stable ids of accepted evidence-backed blocking findings.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"blockers":{"description":"Number of blocking findings.","minimum":0,"type":"integer"},"state":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"}},"required":["state","blockers"],"type":"object"},"run_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"schema_version":{"const":2,"description":"Schema version of the artifact; bumped on breaking ABI changes.","type":"number"},"task_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["schema_version","run_id","task_id","mode","outcome","deliverable","participants","gates","review","apply","generated_at"],"type":"object"},{"type":"null"}],"default":null,"description":"Validated canonical terminal RunFacts receipt; null while active, unavailable, or for legacy runs."},"runId":{"default":null,"description":"The daemon run id, when known.","type":["string","null"]},"secretLike":{"anyOf":[{"additionalProperties":false,"description":"What a run's saved copies hide: secret-like strings kept in the work, hidden on disk.","properties":{"answerMatches":{"description":"Strings hidden in the answer.","minimum":0,"type":"integer"},"binaryPaths":{"description":"Binary files whose payload the saved patch omits.","items":{"type":"string"},"type":"array"},"exactPatchRecorded":{"description":"For a redacted copy: whether the private exact patch object was recorded (false = deferred Apply answers patch_exact_bytes_unavailable); null for an exact copy.","type":["boolean","null"]},"files":{"description":"Changed files with hidden strings in the saved patch copy.","items":{"additionalProperties":false,"properties":{"kinds":{"description":"Content-rule ids that matched.","items":{"type":"string"},"type":"array"},"matches":{"description":"Strings hidden in that file's diff.","minimum":0,"type":"integer"},"path":{"description":"Changed file whose saved diff hides strings.","type":"string"}},"required":["path","matches","kinds"],"type":"object"},"type":"array"},"mediaWithheld":{"description":"Images that were not saved as produced outputs.","items":{"type":"string"},"type":"array"},"persistedPatch":{"description":"Whether the saved final/patch.diff is byte-exact or a display-only redacted copy.","enum":["exact","redacted"],"type":"string"},"totalMatches":{"description":"Strings hidden across patch and answer.","minimum":0,"type":"integer"}},"required":["totalMatches","answerMatches","files","binaryPaths","mediaWithheld","persistedPatch","exactPatchRecorded"],"type":"object"},{"type":"null"}],"default":null,"description":"INV-062 disclosure: secret-like strings kept in the work but hidden in saved copies (paths and counts only); null when nothing was hidden."},"status":{"default":null,"description":"The run's terminal or in-flight lifecycle state, when known.","type":["string","null"]},"summary":{"description":"Human-readable outcome/status text (same as the tool's text content).","type":"string"}},"required":["summary"],"type":"object"}},{"annotations":{"readOnlyHint":true},"description":"Read a durable run's terminal result and apply eligibility; non-terminal runs report their current state without pretending to be complete.","inputSchema":{"additionalProperties":false,"properties":{"runId":{"description":"Daemon run id (from a run tool's runId trailer or claudexor_runs).","minLength":1,"type":"string"}},"required":["runId"],"type":"object"},"name":"claudexor_run_result","outputSchema":{"additionalProperties":false,"description":"Structured MCP result for Claudexor durable-run read tools (inspect/status/result).","properties":{"applyEligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived apply-gate verdict; null for read-only runs or when no patch exists."},"attemptExecution":{"items":{"additionalProperties":false,"description":"Compact projection of existing attempt execution and amount evidence.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"harnessId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"processing":{"additionalProperties":false,"description":"Requested intent, submitted native control, and observed execution are independent facts. A submitted flag never proves observed service; mixed or missing session observations remain explicit.","properties":{"observed":{"enum":["standard","fast","economy","mixed","unknown"],"type":"string"},"observedNative":{"items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"reason":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"requested":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"submitted":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"submittedNative":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."}},"required":["requested","submitted","submittedNative","observed","observedNative","reason","source"],"type":"object"},"processingCostBasis":{"additionalProperties":false,"description":"Mode-qualified billing evidence for an existing cost record. Authentication alone does not establish included premium service; credits, cash, and token valuation stay distinct.","properties":{"debit":{"const":"unobserved","description":"The route reports no actual cash or purchased-credit debit. Included service still admits the work, but its cash stays unknown instead of zero and is outside the finite cap; absence keeps proven ordinary inclusion as zero cash.","type":"string"},"kind":{"enum":["included","paid_credits","cash","valuation","unknown"],"type":"string"},"nativeMode":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"}},"required":["nativeMode","kind","source"],"type":"object"},"usageCost":{"additionalProperties":false,"description":"Observed usage components. An amount of unknown meaning is not charged cash; separately proven included service can still establish exact zero incremental cash unless its route reports no actual debit.","properties":{"cashKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"cashUsd":{"minimum":0,"type":"number"},"unknownUsd":{"minimum":0,"type":"number"},"valuationKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"minimum":0,"type":"number"}},"required":["cashUsd","valuationUsd","unknownUsd","cashKnowledge","valuationKnowledge"],"type":"object"}},"required":["attemptId","harnessId"],"type":"object"},"type":"array"},"budget":{"anyOf":[{"additionalProperties":false,"description":"Budget snapshot for a run: cap, spend, and provenance.","properties":{"cashKnowledge":{"description":"Cash certainty from the ledger; explicit unknown keeps spendUsd null independently of valuation.","enum":["exact","estimated","unknown"],"type":"string"},"controllableSpendUsd":{"default":null,"description":"Cash governed by the finite cap: settled amounts on routes Claudexor controls; null when that cash is unknown. spendUsd can still be null when an included subscription reports no actual debit.","type":["number","null"]},"estimated":{"default":false,"description":"True when settled cash is estimated rather than exact; subscription valuation confidence is reported separately.","type":"boolean"},"evidence":{"default":"complete","description":"Integrity of the canonical events this spend fallback read: 'incomplete' when malformed/non-object event lines were skipped, 'unavailable' when the events file was unreadable, else 'complete'. A non-complete value means the projected spend may disagree with disk truth.","enum":["complete","incomplete","unavailable"],"type":"string"},"paidBudget":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"unlimited","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"finite","type":"string"},"maxUsd":{"minimum":0,"type":"number"}},"required":["kind","maxUsd"],"type":"object"}],"default":{"kind":"unlimited"},"description":"Incremental-cash budget: explicitly unlimited or a finite non-negative USD cap."},"remainingUsd":{"default":null,"description":"Remaining finite cap after controllableSpendUsd; null when no cap or unknown.","type":["number","null"]},"source":{"default":"unknown","description":"Where the snapshot came from: the decision record, live events, settings, or unknown.","enum":["decision","events","settings","unknown"],"type":"string"},"spendUsd":{"default":null,"description":"CASH spend so far in USD; null when unknown.","type":["number","null"]},"valuationKnowledge":{"default":"unknown","description":"Confidence of valuationUsd: 'estimated' when token-derived, 'unknown' when no usage was reported (valuationUsd is then null), 'exact' when natively priced.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"default":null,"description":"Subscription valuation in USD (separate from billed cash); null when unknown — never a fabricated $0 (QA-023c).","type":["number","null"]}},"type":"object"},{"type":"null"}],"default":null,"description":"Run budget snapshot (cash + subscription valuation, QA-023c); null when unavailable."},"continueFrom":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Predecessor run this run continues; null for an ordinary run, omitted when the detail did not project it."},"continuity":{"description":"Per-try continuation receipts (carrier, cause, accounts, model) from the run's event log; omitted when not projected.","items":{"additionalProperties":false,"description":"Receipt of one continued try: carrier, cause, accounts, memory, model attestation.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"carrier":{"description":"Carrier of a continued try: native (the vendor's own session, same account), native_moved (the session file made visible in the next account's store, then resumed there), packet (a fresh session re-grounded by an evidence index), or fresh (nothing to carry — a replay of the original prompt).","enum":["native","native_moved","packet","fresh"],"type":"string"},"cause":{"description":"Typed reason the previous process stopped: a vendor limit (next account eligible), the whole pool spent, a pinned account's limit, a transport death (crash, timeout, watchdog), a confirmed native tool permission refusal, context exhaustion, the wall-clock deadline, a cancel, a daemon/host restart, a model that asked for input, or another typed cause.","enum":["vendor_limit","pool_exhausted","pinned_limit","transport","permission_denied","context_exhausted","wall_clock","cancelled","host_restart","input_required","other"],"type":"string"},"from":{"additionalProperties":false,"properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"profileId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"runId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["runId","attemptId","profileId"],"type":"object"},"identityCheck":{"description":"Whether the resumed vendor session was the one requested, judged at the earliest handshake (codex thread/resume before turn/start; claude system/init): matched, mismatch caught before the child could act, mismatch caught after it may have acted, or not applicable (no resume was requested, or a harness without the continuity capability answered with another session id, which is recorded as before).","enum":["matched_before_effects","mismatch_before_effects","mismatch_after_possible_effects","not_applicable"],"type":"string"},"inputDelivery":{"description":"Whether the predecessor's last input (its turn prompt or an admitted steering message) is known to be in the vendor history: confirmed, uncertain (carried in the notice as a reference to reconcile, never replayed blindly), or not applicable.","enum":["confirmed","uncertain","not_applicable"],"type":"string"},"instructions":{"description":"as_sent: the successor's instructions equal the predecessor's; vendor_snapshot: they differ, and the vendor may resend its recorded system prompt instead (claude records it on the first request).","enum":["as_sent","vendor_snapshot"],"type":"string"},"memory":{"description":"Its own fact: a native resume carries the whole history (full); a packet re-brief is partial; a native resume that lost history (e.g. a rejected compacted item) is partial/unknown.","enum":["full","partial","unknown"],"type":"string"},"modelMismatch":{"type":["boolean","null"]},"observedModel":{"description":"THIS try's attested model (never borrowed from another try).","type":["string","null"]},"reingestedTokens":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"description":"Input + cache-creation tokens of the first resumed request, when known."},"to":{"additionalProperties":false,"properties":{"profileId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["profileId"],"type":"object"},"tryIndex":{"description":"Native try within the attempt; joins the receipt to its try.","minimum":0,"type":"integer"},"workspace":{"description":"Whether the continued try runs in the predecessor's execution root.","enum":["same_root","different_root"],"type":"string"}},"required":["tryIndex","attemptId","carrier","cause","from","to","workspace","memory","instructions","reingestedTokens","observedModel","modelMismatch","identityCheck","inputDelivery"],"type":"object"},"type":"array"},"council":{"anyOf":[{"additionalProperties":false,"description":"Council membership + merge disclosure for a --council plan run.","properties":{"degraded":{"default":false,"description":"True when fewer contract-accepted drafts than requested, including any retained unverified contribution; failures remain disclosed per member.","type":"boolean"},"drafted":{"description":"Members with contract-accepted drafts; excludes retained unverified inputs and is not a work-completion or verification count.","minimum":0,"type":"integer"},"members":{"default":[],"description":"Per-member role and outcome.","items":{"additionalProperties":false,"description":"One council member's role and draft/merge outcome.","properties":{"error":{"default":null,"description":"First redacted draft error; null unless the member failed.","type":["string","null"]},"harnessId":{"description":"Harness that drafted (or merged) this member's plan.","minLength":1,"type":"string"},"role":{"description":"primary = the merger that synthesizes the unified plan; member = draft only.","enum":["primary","member"],"type":"string"},"status":{"description":"Draft outcome: drafted = contract-accepted input; merged = accepted draft and successful merge; failed stays failed even when its unverified text helped the merger.","enum":["drafted","failed","merged"],"type":"string"}},"required":["harnessId","role","status"],"type":"object"},"type":"array"},"mergedBy":{"default":null,"description":"Harness that produced the unified plan (the primary); null if the merge failed.","type":["string","null"]},"requested":{"description":"Requested member count (n; at least 2, up to the configured Council cap).","exclusiveMinimum":0,"type":"integer"}},"required":["requested","drafted"],"type":"object"},{"type":"null"}],"default":null,"description":"Council membership + merge disclosure (QA-023b); null for solo/non-plan runs."},"decisionStatus":{"default":null,"description":"The arbitration decision status, when the run reached arbitration.","type":["string","null"]},"deferredMessage":{"anyOf":[{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"},{"type":"null"}],"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved."},"delegatedFromRunId":{"default":null,"description":"Claudexor Delegate parent id; null for ordinary runs and native subagents.","type":["string","null"]},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.","properties":{"effective":{"default":false,"type":"boolean"},"reason":{"default":"not_requested","enum":["pending","not_requested","injected_unused","used","runtime_unavailable","manifest_unsupported","access_profile_incompatible","partially_degraded","startup_failed"],"type":"string"},"remediation":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null},"requested":{"default":false,"type":"boolean"},"used":{"default":false,"type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Typed Delegate receipt; null when unavailable or legacy."},"detailProblem":{"anyOf":[{"additionalProperties":false,"description":"Typed failure of a post-run detail read whose durable run result still survives.","properties":{"code":{"description":"Stable machine code of the detail problem, if any.","type":["string","null"]},"message":{"description":"Human-readable description of the detail problem.","type":"string"},"retryable":{"description":"Whether retrying the detail read may help.","type":["boolean","null"]}},"required":["code","message","retryable"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed post-terminal detail-read problem (the durable run handle survives); null when the detail read succeeded."},"failure":{"anyOf":[{"additionalProperties":false,"description":"Typed failure record for a run: phase, category, evidence references, and suggested next actions.","properties":{"attemptId":{"default":null,"description":"Attempt involved in the failure, when known.","type":["string","null"]},"captureFailure":{"additionalProperties":false,"properties":{"bufferBudgetBytes":{"minimum":0,"type":"integer"},"causeCode":{"type":"string"},"cleanup":{"additionalProperties":false,"properties":{"code":{"type":["string","null"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"code":{"enum":["capture_output_exceeded","capture_output_incomplete","capture_preview_truncated","capture_failed"],"type":"string"},"drain":{"const":"truncated","type":"string"},"message":{"type":"string"},"stream":{"enum":["stdout","stderr"],"type":"string"}},"required":["code","message"],"type":"object"},"category":{"default":"unknown","description":"Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness.","enum":["validation","project","auth","harness_unavailable","harness_error","config_error","budget","policy","cancelled","internal","unknown"],"type":"string"},"code":{"anyOf":[{"description":"Machine-readable failure sub-code within a RunFailure category, including historical delegated-run failures and active access-profile refusals.","enum":["finite_zero","hard_cap","estimate_headroom","unknown_paid_in_flight","budget_overshoot","cost_unverifiable","delegation_child_drain_timeout","subscription_window_exhausted","credential_pool_exhausted","input_too_large","vendor_cli_too_old","credential_source_unconfirmed","delegated_home_unavailable","delegated_confinement_unavailable","delegated_evidence_incomplete","access_profile_incompatible","auxiliary_writable_roots_unsupported","retired_access_profile"],"type":"string"},{"type":"null"}],"default":null,"description":"Machine-readable failure sub-code within the category; null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage."},"eventRefs":{"default":[],"description":"Event references relevant to the failure.","items":{"type":"string"},"type":"array"},"harnessId":{"default":null,"description":"Harness involved in the failure, when known.","type":["string","null"]},"logRefs":{"default":[],"description":"Log artifact paths relevant to the failure.","items":{"type":"string"},"type":"array"},"nextActions":{"default":[],"description":"Suggested operator next actions.","items":{"type":"string"},"type":"array"},"phase":{"default":"unknown","description":"Pipeline phase where the failure happened.","type":"string"},"poolAttempts":{"default":[],"description":"Every failed execution try in order, each with its own account and error text; empty when no try failed (and for records written before this field existed).","items":{"additionalProperties":false,"description":"Per-try account attribution of a failed execution try (diagnostic evidence only).","properties":{"attemptId":{"description":"Attempt the try belongs to.","minLength":1,"type":"string"},"category":{"description":"Typed failure category of the try; untyped errors are unknown_harness_error.","enum":["timeout","rate_limited","auth_failed","capability_refused","process_crash","config_error","unknown_harness_error"],"type":"string"},"error":{"description":"The try's own error text with its original wording and whitespace, redacted.","type":"string"},"harnessId":{"description":"Harness the try ran on.","minLength":1,"type":"string"},"observedAt":{"description":"When the try's first error was observed.","format":"date-time","type":"string"},"phase":{"description":"How far the try got: before a typed session start, after start but before agent progress, or after progress.","enum":["pre_start","pre_progress","after_progress"],"type":"string"},"profileDisplayName":{"description":"The row's display name at try time (redacted); null for the default route.","type":["string","null"]},"profileId":{"description":"Account row the try ran on; null = the harness default route.","type":["string","null"]},"requestedModel":{"description":"Model the try asked for; null = the harness default model.","type":["string","null"]},"tryIndex":{"description":"Zero-based try index within the attempt.","minimum":0,"type":"integer"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"description":"The vendor's own typed failure for this try, when the adapter attached one."}},"required":["harnessId","profileId","profileDisplayName","requestedModel","attemptId","tryIndex","observedAt","phase","category","error","vendorFailure"],"type":"object"},"type":"array"},"rawDetailRef":{"default":null,"description":"Artifact path holding the raw (redacted) failure detail.","type":["string","null"]},"requestRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"actual":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"kind":{"const":"input_too_large","type":"string"},"limit":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"native_code":{"minLength":1,"type":"string"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"}},"required":["scope","unit","limit","source","kind","actual","native_code"],"type":"object"},{"additionalProperties":false,"properties":{"binary_path":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"installed_version":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"kind":{"const":"vendor_cli_too_old","type":"string"},"native_code":{"const":"claude_code_version_too_old","type":"string"},"source":{"const":"claude_stdout","type":"string"}},"required":["kind","native_code","source","binary_path","installed_version"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"credential_source_unconfirmed","type":"string"},"native_code":{"const":"grok_credential_source_unconfirmed","type":"string"},"reported_source":{"description":"Redacted credential source the vendor's startup frame reported.","maxLength":80,"type":"string"},"source":{"const":"grok_init","type":"string"}},"required":["kind","native_code","source","reported_source"],"type":"object"}],"description":"Vendor-attested request refusal that stops retries and account rotation on its harness; input, executable and credential-source causes carry their own evidence."},"resetsAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the refused window reopens (a spent subscription quota window), or null when the failure has no such time. Callers schedule a retry off this field, never off safeMessage."},"runDir":{"default":null,"description":"Run artifact directory.","type":["string","null"]},"safeMessage":{"description":"Redacted human-readable failure message.","type":"string"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"default":null,"description":"The vendor's own typed failure for the attempt this record speaks for, or null when no vendor-typed evidence exists (every harness without such a channel, and any unreadable record). Facts only: carries no remedy."}},"required":["safeMessage"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed terminal failure detail and recovery actions; null for non-failed runs."},"outcomeBanner":{"default":null,"description":"Server-owned outcome headline (D18); null while non-terminal.","type":["string","null"]},"outcomeFacts":{"anyOf":[{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},{"type":"null"}],"default":null,"description":"The D8 terminal outcome axes (checks/review/reason/noChanges), when terminal."},"parentRunId":{"default":null,"description":"Server-owned ordinary parent/follow-up run id, when present.","type":["string","null"]},"pendingInteractions":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Count of questions still awaiting answers, when known."},"planReadiness":{"anyOf":[{"additionalProperties":false,"description":"Server-derived readiness of a plan run (one derivation owner; D17).","properties":{"questionCount":{"default":0,"minimum":0,"type":"integer"},"state":{"description":"Derived plan readiness: ready (block parsed, zero open questions), needs_answers (open questions remain), unverified (no parseable block — the planner ignored the format).","enum":["ready","needs_answers","unverified"],"type":"string"}},"required":["state"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived plan readiness (plan runs only, D17); null otherwise."},"resumable":{"anyOf":[{"additionalProperties":false,"description":"Terminal facts of a stopped run that can be continued: cause, limit evidence, available carriers, the native session and the workspace.","properties":{"carriers":{"description":"Continuity representations still available (NOT quota readiness; readiness is described by the limit facts).","items":{"description":"A continuity representation still available for a stopped run.","enum":["native","native_moved","packet"],"type":"string"},"type":"array"},"cause":{"description":"Typed reason the previous process stopped: a vendor limit (next account eligible), the whole pool spent, a pinned account's limit, a transport death (crash, timeout, watchdog), a confirmed native tool permission refusal, context exhaustion, the wall-clock deadline, a cancel, a daemon/host restart, a model that asked for input, or another typed cause.","enum":["vendor_limit","pool_exhausted","pinned_limit","transport","permission_denied","context_exhausted","wall_clock","cancelled","host_restart","input_required","other"],"type":"string"},"limitCode":{"description":"The typed vendor limit code that ended the work, when any.","type":["string","null"]},"limitEvidence":{"anyOf":[{"description":"window: the vendor named the spent window (a reset instant or a constraint id); unspecified: a typed limit without a window — a bare backoff frame is transport, not a limit.","enum":["window","unspecified"],"type":"string"},{"type":"null"}],"description":"window: the vendor named the spent window (a reset instant or a constraint id); unspecified: a typed limit without a window — a bare backoff frame is transport, not a limit."},"limitWindow":{"description":"The vendor's own name for the spent window (e.g. five_hour, seven_day_opus), when known.","type":["string","null"]},"resetsAt":{"description":"When the spent vendor window reopens, only from a vendor signal; never fabricated.","type":["string","null"]},"session":{"anyOf":[{"additionalProperties":false,"properties":{"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"holderProfileId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"nativeSessionId":{"minLength":1,"type":"string"}},"required":["harness","nativeSessionId","holderProfileId"],"type":"object"},{"type":"null"}],"description":"The native session a continuation can resume, when one exists."},"workspace":{"additionalProperties":false,"description":"Where the stopped work's tree is: the live root, a retained envelope, or gone.","properties":{"kind":{"enum":["in_place","retained_envelope","none"],"type":"string"},"root":{"type":["string","null"]}},"required":["kind","root"],"type":"object"}},"required":["cause","resetsAt","limitWindow","limitEvidence","carriers","limitCode","session","workspace"],"type":"object"},{"type":"null"}],"description":"Terminal facts of stopped unfinished work that claudexor_run_continue can continue (cause, resetsAt, carriers, session, workspace); null when the work finished or the run is not terminal, omitted when not projected."},"retainedEnvelope":{"anyOf":[{"additionalProperties":false,"description":"An isolated envelope kept for continuation: continue it with continueFrom, or release it with the discard decision.","properties":{"bytes":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"description":"Disk use of the kept envelope (tree + scoped home); null when not measured."},"cause":{"anyOf":[{"description":"Typed reason the previous process stopped: a vendor limit (next account eligible), the whole pool spent, a pinned account's limit, a transport death (crash, timeout, watchdog), a confirmed native tool permission refusal, context exhaustion, the wall-clock deadline, a cancel, a daemon/host restart, a model that asked for input, or another typed cause.","enum":["vendor_limit","pool_exhausted","pinned_limit","transport","permission_denied","context_exhausted","wall_clock","cancelled","host_restart","input_required","other"],"type":"string"},{"type":"null"}],"description":"Why the run stopped, when recorded."},"retainedAt":{"description":"When the envelope was kept.","type":"string"},"root":{"description":"Absolute path of the kept working tree.","type":"string"}},"required":["root","bytes","retainedAt","cause"],"type":"object"},{"type":"null"}],"description":"Isolated envelope kept for a successor (disk use visible); null when none, omitted when not projected."},"runDir":{"default":null,"description":"Artifact directory; null when absent.","type":["string","null"]},"runFacts":{"anyOf":[{"additionalProperties":false,"description":"Validated immutable terminal facts for one run.","properties":{"apply":{"additionalProperties":false,"description":"Terminal apply eligibility and operator-decision state.","properties":{"eligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Delivery-gate eligibility at terminalization; null when nothing is applyable."},"operator_decision_present":{"default":false,"description":"Whether a valid operator decision was present when the receipt was finalized.","type":"boolean"}},"type":"object"},"deliverable":{"additionalProperties":false,"description":"Canonical primary-output presence and identity for a terminal run.","properties":{"kind":{"anyOf":[{"enum":["answer","report","plan","patch","files","structured_output"],"type":"string"},{"type":"null"}],"description":"Kind of canonical primary deliverable; null when none exists."},"path":{"description":"Run-relative path of the canonical primary deliverable; null when absent.","type":["string","null"]},"present":{"description":"Whether the canonical primary deliverable exists.","type":"boolean"},"producer_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt that produced the deliverable, when known."}},"required":["present","kind","path"],"type":"object"},"gates":{"additionalProperties":false,"description":"Canonical gate configuration and terminal receipt projection.","properties":{"configured":{"description":"Whether the frozen task configured deterministic gates.","type":"boolean"},"executed":{"description":"Whether the terminal attempt executed the gate set.","type":"boolean"},"receipt_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt whose gate receipt decides this projection; null when no gates executed."},"required":{"description":"Number of configured required gates.","minimum":0,"type":"integer"},"state":{"description":"Terminal state of the configured deterministic gate set.","enum":["not_configured","passed","failed","skipped"],"type":"string"},"total":{"description":"Total configured deterministic gates.","minimum":0,"type":"integer"}},"required":["configured","required","total","executed","state"],"type":"object"},"generated_at":{"description":"When this immutable terminal receipt was finalized.","minLength":1,"type":"string"},"mode":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"outcome":{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},"participants":{"additionalProperties":false,"description":"Terminal participant graph plus its planner-lane count.","properties":{"attempts":{"default":[],"description":"Role-labelled participant roster.","items":{"additionalProperties":false,"description":"One role-labelled participant in the terminal run graph.","properties":{"attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Attempt id when the participant owns an orchestrator attempt; null for reviewer-panel members."},"deliverable_present":{"default":false,"description":"Whether this participant produced the deliverable its role requested.","type":"boolean"},"harness_id":{"description":"Harness that served this participant role.","minLength":1,"type":"string"},"role":{"description":"Canonical role of one participant in the terminal run graph.","enum":["planner","merge","candidate","scout","reducer","reviewer"],"type":"string"},"status":{"anyOf":[{"description":"Terminal outcome recorded for one run participant.","enum":["success","success_with_warnings","blocked","failed"],"type":"string"},{"type":"null"}],"default":null,"description":"Participant outcome when recorded; null for artifact-only reviewer membership."}},"required":["attempt_id","harness_id","role"],"type":"object"},"type":"array"},"planners":{"description":"Number of participants whose canonical role is planner.","minimum":0,"type":"integer"}},"required":["planners"],"type":"object"},"presentation":{"additionalProperties":false,"description":"Immutable terminal output state and primary artifact. Absent only on legacy RunFacts receipts.","properties":{"primary":{"anyOf":[{"additionalProperties":false,"description":"Primary user-facing artifact selected once during terminal preparation.","properties":{"kind":{"description":"Presentation kind of the terminal primary artifact.","enum":["answer","report","plan","patch","files","structured_output","diagnostic"],"type":"string"},"path":{"description":"Normalized run-relative path of the terminal primary artifact.","minLength":1,"type":"string"}},"required":["kind","path"],"type":"object"},{"type":"null"}],"description":"Selected terminal primary artifact, or null when the receipt announces readiness without a primary deliverable."},"state":{"description":"Terminal output readiness decided by the last valid output.ready receipt.","enum":["ready","diagnostic"],"type":"string"}},"required":["state","primary"],"type":"object"},"required_actions":{"default":[],"description":"Typed actions required to unblock this terminal outcome.","items":{"additionalProperties":false,"description":"One typed required operator action derived from a run's terminal outcome facts.","properties":{"detail":{"description":"Human-readable guidance for this action (English-only, INV-141).","type":"string"},"id":{"description":"Stable machine id for a required operator action on a blocked terminal run.","enum":["provide_required_input","complete_incomplete_work","resolve_review_block","fix_failed_checks","record_operator_decision"],"type":"string"}},"required":["id","detail"],"type":"object"},"type":"array"},"review":{"additionalProperties":false,"description":"Canonical terminal review verdict and blocking-finding identity.","properties":{"blocker_ids":{"default":[],"description":"Stable ids of accepted evidence-backed blocking findings.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"blockers":{"description":"Number of blocking findings.","minimum":0,"type":"integer"},"state":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"}},"required":["state","blockers"],"type":"object"},"run_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"schema_version":{"const":2,"description":"Schema version of the artifact; bumped on breaking ABI changes.","type":"number"},"task_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["schema_version","run_id","task_id","mode","outcome","deliverable","participants","gates","review","apply","generated_at"],"type":"object"},{"type":"null"}],"default":null,"description":"Validated canonical terminal RunFacts receipt; null while active, unavailable, or for legacy runs."},"runId":{"default":null,"description":"The daemon run id, when known.","type":["string","null"]},"secretLike":{"anyOf":[{"additionalProperties":false,"description":"What a run's saved copies hide: secret-like strings kept in the work, hidden on disk.","properties":{"answerMatches":{"description":"Strings hidden in the answer.","minimum":0,"type":"integer"},"binaryPaths":{"description":"Binary files whose payload the saved patch omits.","items":{"type":"string"},"type":"array"},"exactPatchRecorded":{"description":"For a redacted copy: whether the private exact patch object was recorded (false = deferred Apply answers patch_exact_bytes_unavailable); null for an exact copy.","type":["boolean","null"]},"files":{"description":"Changed files with hidden strings in the saved patch copy.","items":{"additionalProperties":false,"properties":{"kinds":{"description":"Content-rule ids that matched.","items":{"type":"string"},"type":"array"},"matches":{"description":"Strings hidden in that file's diff.","minimum":0,"type":"integer"},"path":{"description":"Changed file whose saved diff hides strings.","type":"string"}},"required":["path","matches","kinds"],"type":"object"},"type":"array"},"mediaWithheld":{"description":"Images that were not saved as produced outputs.","items":{"type":"string"},"type":"array"},"persistedPatch":{"description":"Whether the saved final/patch.diff is byte-exact or a display-only redacted copy.","enum":["exact","redacted"],"type":"string"},"totalMatches":{"description":"Strings hidden across patch and answer.","minimum":0,"type":"integer"}},"required":["totalMatches","answerMatches","files","binaryPaths","mediaWithheld","persistedPatch","exactPatchRecorded"],"type":"object"},{"type":"null"}],"default":null,"description":"INV-062 disclosure: secret-like strings kept in the work but hidden in saved copies (paths and counts only); null when nothing was hidden."},"status":{"default":null,"description":"The run's terminal or in-flight lifecycle state, when known.","type":["string","null"]},"summary":{"description":"Human-readable outcome/status text (same as the tool's text content).","type":"string"}},"required":["summary"],"type":"object"}},{"annotations":{"destructiveHint":true,"idempotentHint":true,"readOnlyHint":false},"description":"Request cancellation of a daemon-owned run; success is returned only after the control API acknowledges the durable command. The same call holds the run's next message (claudexor_next_message) that is not accepted yet, also after the run ended; an already accepted successor fails next_message_dispatched with its job handle and keeps running. If that hold cannot be saved, the call fails next_message_hold_failed (retryable) after any cancel was applied; the next message is still not sent, and a retried cancel records the hold.","inputSchema":{"additionalProperties":false,"properties":{"runId":{"description":"Daemon run id (from a run tool's runId trailer or claudexor_runs).","minLength":1,"type":"string"}},"required":["runId"],"type":"object"},"name":"claudexor_run_cancel"},{"annotations":{"readOnlyHint":true},"description":"List the complete daemon-persisted questions still awaiting answers for a run, including bodies claudexor_run_wait omitted; the text content carries the same JSON.","inputSchema":{"additionalProperties":false,"properties":{"runId":{"description":"Daemon run id (from a run tool's runId trailer or claudexor_runs).","minLength":1,"type":"string"}},"required":["runId"],"type":"object"},"name":"claudexor_run_interactions"},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Answer a daemon-persisted run interaction; success (status delivered) is reported only after the control API acknowledges the journal mutation. Refusals keep their typed status as the failure code: not_found, already_resolved (never proof that this answer landed) or rejected. Answers have no replay key and are not retried.","inputSchema":{"additionalProperties":false,"properties":{"answers":{"items":{"additionalProperties":false,"properties":{"freeText":{"type":"string"},"questionId":{"minLength":1,"type":"string"},"selectedLabels":{"items":{"type":"string"},"type":"array"}},"required":["questionId","selectedLabels"],"type":"object"},"minItems":1,"type":"array"},"interactionId":{"minLength":1,"type":"string"},"runId":{"minLength":1,"type":"string"}},"required":["runId","interactionId","answers"],"type":"object"},"name":"claudexor_answer_interaction"},{"annotations":{"idempotentHint":true,"readOnlyHint":true},"description":"Dry-check whether a run's patch would apply cleanly to its original project (no mutation).","inputSchema":{"additionalProperties":false,"properties":{"runId":{"description":"Daemon run id (from a run tool's runId trailer or claudexor_runs).","minLength":1,"type":"string"}},"required":["runId"],"type":"object"},"name":"claudexor_apply_check"},{"annotations":{"idempotentHint":true,"readOnlyHint":true},"description":"Inspect, validate, or export one durable journal partition through v2.","inputSchema":{"additionalProperties":false,"properties":{"action":{"enum":["inspect","validate","export"],"type":"string"},"partition":{"minLength":1,"type":"string"}},"required":["action","partition"],"type":"object"},"name":"claudexor_journal_recovery"},{"annotations":{"destructiveHint":true,"idempotentHint":true,"readOnlyHint":false},"description":"Quarantine a corrupt partition and start a fresh epoch after exact confirmation.","inputSchema":{"additionalProperties":false,"properties":{"confirmation":{"enum":["quarantine_and_start_fresh"],"type":"string"},"expectedFingerprint":{"pattern":"^[a-f0-9]{64}$","type":"string"},"partition":{"minLength":1,"type":"string"}},"required":["partition","expectedFingerprint","confirmation"],"type":"object"},"name":"claudexor_quarantine_journal"}],"ttlMs":0}}}
{"at":"2026-11-23T05:01:14.893Z","dir":"sent","era":"initialize","message":{"id":1,"jsonrpc":"2.0","method":"initialize","params":{"capabilities":{},"clientInfo":{"name":"didrun-lab","version":"0.1.0"},"protocolVersion":"2025-11-25"}}}
{"at":"2026-11-23T05:01:16.639Z","dir":"received","era":"initialize","message":{"id":1,"jsonrpc":"2.0","result":{"capabilities":{"tools":{"listChanged":true}},"protocolVersion":"2025-11-25","serverInfo":{"name":"claudexor","version":"4.8.1"}}}}
{"at":"2026-11-23T05:01:16.639Z","dir":"sent","era":"initialize","message":{"jsonrpc":"2.0","method":"notifications/initialized"}}
{"at":"2026-11-23T05:01:16.639Z","dir":"sent","era":"initialize","message":{"id":2,"jsonrpc":"2.0","method":"tools/list","params":{}}}
{"at":"2026-11-23T05:01:16.653Z","dir":"received","era":"initialize","message":{"id":2,"jsonrpc":"2.0","result":{"tools":[{"annotations":{"readOnlyHint":true},"description":"Enqueue a read-only Claudexor answer; pass deepScan:true for a bounded multi-scout research sweep with synthesis. Returns a durable run handle, not terminal output; use claudexor_run_status/result for the final answer.","inputSchema":{"additionalProperties":false,"properties":{"access":{"description":"Optional access profile for this run.","enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"attachments":{"description":"Immutable resource references from upload finalize. Paths, base64 and internal resolved attachments are rejected; ordinary lane admission still applies.","items":{"additionalProperties":false,"description":"Reference to an immutable daemon-owned uploaded resource.","properties":{"resourceId":{"description":"Immutable daemon resource id returned by upload finalize.","minLength":1,"type":"string"}},"required":["resourceId"],"type":"object"},"type":"array"},"credentialProfileId":{"description":"Strict credential profile for this run; never falls back to another account.","minLength":1,"pattern":"\\S","type":"string"},"deepScan":{"description":"Widen the answer into a bounded multi-scout research sweep with synthesis.","type":"boolean"},"effort":{"description":"Optional effort override for the primary harness. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"execution":{"additionalProperties":false,"properties":{"auxiliaryWritableRoots":{"description":"Exact existing absolute directories, created by the caller, that an Agent run with effective workspace_write may also write (service caches or scratch outside the execution tree). [] grants nothing extra; so does omission, except that a continueFrom successor omitting execution inherits its predecessor's whole execution group. Requires a lane whose capability_profile.access_control.auxiliary_writable_roots is true; the files are never part of the project result.","items":{"minLength":1,"type":"string"},"type":"array"},"delegated":{"type":"boolean"},"isolation":{"enum":["envelope","live"],"type":"string"},"scopePaths":{"description":"Selected relative files/directories; '.' selects the whole folder. No implicit whole-folder claim.","items":{"minLength":1,"type":"string"},"type":"array"},"workspaceKind":{"description":"directory needs no Git initialization.","enum":["git","directory"],"type":"string"},"workspaceRoot":{"description":"Actual existing delegated execution directory; stable project identity remains repoPath.","type":"string"}},"type":"object"},"externalContextPolicy":{"description":"Alias of web for control-api parity.","enum":["off","auto","cached","live"],"type":"string"},"harness":{"description":"Optional harness id to force for this one-shot run.","minLength":1,"type":"string"},"idempotencyKey":{"description":"Caller-owned key for this exact launch; requires an explicit repoPath. After an unknown response, repeat the same key and arguments to recover the accepted job or run (a queued job returns its jobId); a different request with the same key conflicts. Recovery assumes the same registered project root still exists: a missing or moved root is refused (project_root_missing) and nothing is replayed or started. Omit for an intentional new launch.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"maxSeconds":{"description":"Initial run time limit in seconds. Explicit limits default to hard unless timeLimitMode is soft.","maximum":604800,"minimum":1,"type":"integer"},"model":{"description":"Optional model override for the primary harness.","minLength":1,"type":"string"},"n":{"description":"Optional best-of-N width for candidate races (or deep-scan scout width).","minimum":1,"type":"integer"},"paidBudget":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"unlimited","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"finite","type":"string"},"maxUsd":{"minimum":0,"type":"number"}},"required":["kind","maxUsd"],"type":"object"}],"description":"Incremental-cash budget: explicitly unlimited or a finite non-negative USD cap."},"primaryHarness":{"description":"Optional primary harness id for this run.","minLength":1,"type":"string"},"processingPreference":{"description":"Advisory service preference; omission inherits captured settings and explicit Standard requests ordinary service.","enum":["standard","fast","economy"],"type":"string"},"prompt":{"description":"The user task or question to run through Claudexor.","minLength":1,"pattern":"\\S","type":"string"},"repoPath":{"description":"Absolute path of the target project. Defaults to the MCP server cwd; required with idempotencyKey.","type":"string"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"},"timeLimitMode":{"description":"With maxSeconds: soft warns and continues; hard cancels on expiry.","enum":["soft","hard"],"type":"string"},"web":{"description":"External context policy for this run.","enum":["off","auto","cached","live"],"type":"string"}},"required":["prompt"],"type":"object"},"name":"claudexor_ask","outputSchema":{"additionalProperties":false,"description":"Structured MCP tool result for Claudexor run tools.","properties":{"applyEligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"description":"Apply-gate verdict for mutating runs; null for read-only routes or when no patch exists."},"attemptExecution":{"items":{"additionalProperties":false,"description":"Compact projection of existing attempt execution and amount evidence.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"harnessId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"processing":{"additionalProperties":false,"description":"Requested intent, submitted native control, and observed execution are independent facts. A submitted flag never proves observed service; mixed or missing session observations remain explicit.","properties":{"observed":{"enum":["standard","fast","economy","mixed","unknown"],"type":"string"},"observedNative":{"items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"reason":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"requested":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"submitted":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"submittedNative":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."}},"required":["requested","submitted","submittedNative","observed","observedNative","reason","source"],"type":"object"},"processingCostBasis":{"additionalProperties":false,"description":"Mode-qualified billing evidence for an existing cost record. Authentication alone does not establish included premium service; credits, cash, and token valuation stay distinct.","properties":{"debit":{"const":"unobserved","description":"The route reports no actual cash or purchased-credit debit. Included service still admits the work, but its cash stays unknown instead of zero and is outside the finite cap; absence keeps proven ordinary inclusion as zero cash.","type":"string"},"kind":{"enum":["included","paid_credits","cash","valuation","unknown"],"type":"string"},"nativeMode":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"}},"required":["nativeMode","kind","source"],"type":"object"},"usageCost":{"additionalProperties":false,"description":"Observed usage components. An amount of unknown meaning is not charged cash; separately proven included service can still establish exact zero incremental cash unless its route reports no actual debit.","properties":{"cashKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"cashUsd":{"minimum":0,"type":"number"},"unknownUsd":{"minimum":0,"type":"number"},"valuationKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"minimum":0,"type":"number"}},"required":["cashUsd","valuationUsd","unknownUsd","cashKnowledge","valuationKnowledge"],"type":"object"}},"required":["attemptId","harnessId"],"type":"object"},"type":"array"},"council":{"anyOf":[{"additionalProperties":false,"description":"Council membership + merge disclosure for a --council plan run.","properties":{"degraded":{"default":false,"description":"True when fewer contract-accepted drafts than requested, including any retained unverified contribution; failures remain disclosed per member.","type":"boolean"},"drafted":{"description":"Members with contract-accepted drafts; excludes retained unverified inputs and is not a work-completion or verification count.","minimum":0,"type":"integer"},"members":{"default":[],"description":"Per-member role and outcome.","items":{"additionalProperties":false,"description":"One council member's role and draft/merge outcome.","properties":{"error":{"default":null,"description":"First redacted draft error; null unless the member failed.","type":["string","null"]},"harnessId":{"description":"Harness that drafted (or merged) this member's plan.","minLength":1,"type":"string"},"role":{"description":"primary = the merger that synthesizes the unified plan; member = draft only.","enum":["primary","member"],"type":"string"},"status":{"description":"Draft outcome: drafted = contract-accepted input; merged = accepted draft and successful merge; failed stays failed even when its unverified text helped the merger.","enum":["drafted","failed","merged"],"type":"string"}},"required":["harnessId","role","status"],"type":"object"},"type":"array"},"mergedBy":{"default":null,"description":"Harness that produced the unified plan (the primary); null if the merge failed.","type":["string","null"]},"requested":{"description":"Requested member count (n; at least 2, up to the configured Council cap).","exclusiveMinimum":0,"type":"integer"}},"required":["requested","drafted"],"type":"object"},{"type":"null"}],"default":null,"description":"Council membership + merge disclosure (QA-023b); null for solo/non-plan tools or deferred handles."},"deferredMessage":{"anyOf":[{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"},{"type":"null"}],"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved."},"delegatedFromRunId":{"default":null,"type":["string","null"]},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.","properties":{"effective":{"default":false,"type":"boolean"},"reason":{"default":"not_requested","enum":["pending","not_requested","injected_unused","used","runtime_unavailable","manifest_unsupported","access_profile_incompatible","partially_degraded","startup_failed"],"type":"string"},"remediation":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null},"requested":{"default":false,"type":"boolean"},"used":{"default":false,"type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output."},"detailProblem":{"anyOf":[{"additionalProperties":false,"description":"Typed failure of a post-run detail read whose durable run result still survives.","properties":{"code":{"description":"Stable machine code of the detail problem, if any.","type":["string","null"]},"message":{"description":"Human-readable description of the detail problem.","type":"string"},"retryable":{"description":"Whether retrying the detail read may help.","type":["boolean","null"]}},"required":["code","message","retryable"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed post-terminal detail-read problem (the run result survives; its detail projections are absent for this reason); null when the detail read succeeded."},"failure":{"anyOf":[{"additionalProperties":false,"description":"Typed failure record for a run: phase, category, evidence references, and suggested next actions.","properties":{"attemptId":{"default":null,"description":"Attempt involved in the failure, when known.","type":["string","null"]},"captureFailure":{"additionalProperties":false,"properties":{"bufferBudgetBytes":{"minimum":0,"type":"integer"},"causeCode":{"type":"string"},"cleanup":{"additionalProperties":false,"properties":{"code":{"type":["string","null"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"code":{"enum":["capture_output_exceeded","capture_output_incomplete","capture_preview_truncated","capture_failed"],"type":"string"},"drain":{"const":"truncated","type":"string"},"message":{"type":"string"},"stream":{"enum":["stdout","stderr"],"type":"string"}},"required":["code","message"],"type":"object"},"category":{"default":"unknown","description":"Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness.","enum":["validation","project","auth","harness_unavailable","harness_error","config_error","budget","policy","cancelled","internal","unknown"],"type":"string"},"code":{"anyOf":[{"description":"Machine-readable failure sub-code within a RunFailure category, including historical delegated-run failures and active access-profile refusals.","enum":["finite_zero","hard_cap","estimate_headroom","unknown_paid_in_flight","budget_overshoot","cost_unverifiable","delegation_child_drain_timeout","subscription_window_exhausted","credential_pool_exhausted","input_too_large","vendor_cli_too_old","credential_source_unconfirmed","delegated_home_unavailable","delegated_confinement_unavailable","delegated_evidence_incomplete","access_profile_incompatible","auxiliary_writable_roots_unsupported","retired_access_profile"],"type":"string"},{"type":"null"}],"default":null,"description":"Machine-readable failure sub-code within the category; null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage."},"eventRefs":{"default":[],"description":"Event references relevant to the failure.","items":{"type":"string"},"type":"array"},"harnessId":{"default":null,"description":"Harness involved in the failure, when known.","type":["string","null"]},"logRefs":{"default":[],"description":"Log artifact paths relevant to the failure.","items":{"type":"string"},"type":"array"},"nextActions":{"default":[],"description":"Suggested operator next actions.","items":{"type":"string"},"type":"array"},"phase":{"default":"unknown","description":"Pipeline phase where the failure happened.","type":"string"},"poolAttempts":{"default":[],"description":"Every failed execution try in order, each with its own account and error text; empty when no try failed (and for records written before this field existed).","items":{"additionalProperties":false,"description":"Per-try account attribution of a failed execution try (diagnostic evidence only).","properties":{"attemptId":{"description":"Attempt the try belongs to.","minLength":1,"type":"string"},"category":{"description":"Typed failure category of the try; untyped errors are unknown_harness_error.","enum":["timeout","rate_limited","auth_failed","capability_refused","process_crash","config_error","unknown_harness_error"],"type":"string"},"error":{"description":"The try's own error text with its original wording and whitespace, redacted.","type":"string"},"harnessId":{"description":"Harness the try ran on.","minLength":1,"type":"string"},"observedAt":{"description":"When the try's first error was observed.","format":"date-time","type":"string"},"phase":{"description":"How far the try got: before a typed session start, after start but before agent progress, or after progress.","enum":["pre_start","pre_progress","after_progress"],"type":"string"},"profileDisplayName":{"description":"The row's display name at try time (redacted); null for the default route.","type":["string","null"]},"profileId":{"description":"Account row the try ran on; null = the harness default route.","type":["string","null"]},"requestedModel":{"description":"Model the try asked for; null = the harness default model.","type":["string","null"]},"tryIndex":{"description":"Zero-based try index within the attempt.","minimum":0,"type":"integer"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"description":"The vendor's own typed failure for this try, when the adapter attached one."}},"required":["harnessId","profileId","profileDisplayName","requestedModel","attemptId","tryIndex","observedAt","phase","category","error","vendorFailure"],"type":"object"},"type":"array"},"rawDetailRef":{"default":null,"description":"Artifact path holding the raw (redacted) failure detail.","type":["string","null"]},"requestRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"actual":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"kind":{"const":"input_too_large","type":"string"},"limit":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"native_code":{"minLength":1,"type":"string"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"}},"required":["scope","unit","limit","source","kind","actual","native_code"],"type":"object"},{"additionalProperties":false,"properties":{"binary_path":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"installed_version":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"kind":{"const":"vendor_cli_too_old","type":"string"},"native_code":{"const":"claude_code_version_too_old","type":"string"},"source":{"const":"claude_stdout","type":"string"}},"required":["kind","native_code","source","binary_path","installed_version"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"credential_source_unconfirmed","type":"string"},"native_code":{"const":"grok_credential_source_unconfirmed","type":"string"},"reported_source":{"description":"Redacted credential source the vendor's startup frame reported.","maxLength":80,"type":"string"},"source":{"const":"grok_init","type":"string"}},"required":["kind","native_code","source","reported_source"],"type":"object"}],"description":"Vendor-attested request refusal that stops retries and account rotation on its harness; input, executable and credential-source causes carry their own evidence."},"resetsAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the refused window reopens (a spent subscription quota window), or null when the failure has no such time. Callers schedule a retry off this field, never off safeMessage."},"runDir":{"default":null,"description":"Run artifact directory.","type":["string","null"]},"safeMessage":{"description":"Redacted human-readable failure message.","type":"string"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"default":null,"description":"The vendor's own typed failure for the attempt this record speaks for, or null when no vendor-typed evidence exists (every harness without such a channel, and any unreadable record). Facts only: carries no remedy."}},"required":["safeMessage"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed terminal failure detail and recovery actions; null for non-failed runs."},"jobId":{"default":null,"description":"Daemon job id of the accepted launch. While runId is null, pass it as runId to the status, wait and result tools; they report the canonical runId once the run binds.","type":["string","null"]},"outcomeBanner":{"default":null,"description":"Server-owned outcome headline (D18); the single honest one-line verdict, null while non-terminal or unavailable.","type":["string","null"]},"outcomeFacts":{"anyOf":[{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},{"type":"null"}],"default":null,"description":"The D8 terminal outcome axes (checks/review/reason/noChanges); null for non-terminal or read-only routes."},"parentRunId":{"default":null,"type":["string","null"]},"planReadiness":{"anyOf":[{"additionalProperties":false,"description":"Server-derived readiness of a plan run (one derivation owner; D17).","properties":{"questionCount":{"default":0,"minimum":0,"type":"integer"},"state":{"description":"Derived plan readiness: ready (block parsed, zero open questions), needs_answers (open questions remain), unverified (no parseable block — the planner ignored the format).","enum":["ready","needs_answers","unverified"],"type":"string"}},"required":["state"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived plan readiness for plan tools (D17); null for non-plan tools."},"runDir":{"description":"Artifact directory of the run; null when not persisted.","type":["string","null"]},"runFacts":{"anyOf":[{"additionalProperties":false,"description":"Validated immutable terminal facts for one run.","properties":{"apply":{"additionalProperties":false,"description":"Terminal apply eligibility and operator-decision state.","properties":{"eligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Delivery-gate eligibility at terminalization; null when nothing is applyable."},"operator_decision_present":{"default":false,"description":"Whether a valid operator decision was present when the receipt was finalized.","type":"boolean"}},"type":"object"},"deliverable":{"additionalProperties":false,"description":"Canonical primary-output presence and identity for a terminal run.","properties":{"kind":{"anyOf":[{"enum":["answer","report","plan","patch","files","structured_output"],"type":"string"},{"type":"null"}],"description":"Kind of canonical primary deliverable; null when none exists."},"path":{"description":"Run-relative path of the canonical primary deliverable; null when absent.","type":["string","null"]},"present":{"description":"Whether the canonical primary deliverable exists.","type":"boolean"},"producer_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt that produced the deliverable, when known."}},"required":["present","kind","path"],"type":"object"},"gates":{"additionalProperties":false,"description":"Canonical gate configuration and terminal receipt projection.","properties":{"configured":{"description":"Whether the frozen task configured deterministic gates.","type":"boolean"},"executed":{"description":"Whether the terminal attempt executed the gate set.","type":"boolean"},"receipt_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt whose gate receipt decides this projection; null when no gates executed."},"required":{"description":"Number of configured required gates.","minimum":0,"type":"integer"},"state":{"description":"Terminal state of the configured deterministic gate set.","enum":["not_configured","passed","failed","skipped"],"type":"string"},"total":{"description":"Total configured deterministic gates.","minimum":0,"type":"integer"}},"required":["configured","required","total","executed","state"],"type":"object"},"generated_at":{"description":"When this immutable terminal receipt was finalized.","minLength":1,"type":"string"},"mode":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"outcome":{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},"participants":{"additionalProperties":false,"description":"Terminal participant graph plus its planner-lane count.","properties":{"attempts":{"default":[],"description":"Role-labelled participant roster.","items":{"additionalProperties":false,"description":"One role-labelled participant in the terminal run graph.","properties":{"attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Attempt id when the participant owns an orchestrator attempt; null for reviewer-panel members."},"deliverable_present":{"default":false,"description":"Whether this participant produced the deliverable its role requested.","type":"boolean"},"harness_id":{"description":"Harness that served this participant role.","minLength":1,"type":"string"},"role":{"description":"Canonical role of one participant in the terminal run graph.","enum":["planner","merge","candidate","scout","reducer","reviewer"],"type":"string"},"status":{"anyOf":[{"description":"Terminal outcome recorded for one run participant.","enum":["success","success_with_warnings","blocked","failed"],"type":"string"},{"type":"null"}],"default":null,"description":"Participant outcome when recorded; null for artifact-only reviewer membership."}},"required":["attempt_id","harness_id","role"],"type":"object"},"type":"array"},"planners":{"description":"Number of participants whose canonical role is planner.","minimum":0,"type":"integer"}},"required":["planners"],"type":"object"},"presentation":{"additionalProperties":false,"description":"Immutable terminal output state and primary artifact. Absent only on legacy RunFacts receipts.","properties":{"primary":{"anyOf":[{"additionalProperties":false,"description":"Primary user-facing artifact selected once during terminal preparation.","properties":{"kind":{"description":"Presentation kind of the terminal primary artifact.","enum":["answer","report","plan","patch","files","structured_output","diagnostic"],"type":"string"},"path":{"description":"Normalized run-relative path of the terminal primary artifact.","minLength":1,"type":"string"}},"required":["kind","path"],"type":"object"},{"type":"null"}],"description":"Selected terminal primary artifact, or null when the receipt announces readiness without a primary deliverable."},"state":{"description":"Terminal output readiness decided by the last valid output.ready receipt.","enum":["ready","diagnostic"],"type":"string"}},"required":["state","primary"],"type":"object"},"required_actions":{"default":[],"description":"Typed actions required to unblock this terminal outcome.","items":{"additionalProperties":false,"description":"One typed required operator action derived from a run's terminal outcome facts.","properties":{"detail":{"description":"Human-readable guidance for this action (English-only, INV-141).","type":"string"},"id":{"description":"Stable machine id for a required operator action on a blocked terminal run.","enum":["provide_required_input","complete_incomplete_work","resolve_review_block","fix_failed_checks","record_operator_decision"],"type":"string"}},"required":["id","detail"],"type":"object"},"type":"array"},"review":{"additionalProperties":false,"description":"Canonical terminal review verdict and blocking-finding identity.","properties":{"blocker_ids":{"default":[],"description":"Stable ids of accepted evidence-backed blocking findings.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"blockers":{"description":"Number of blocking findings.","minimum":0,"type":"integer"},"state":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"}},"required":["state","blockers"],"type":"object"},"run_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"schema_version":{"const":2,"description":"Schema version of the artifact; bumped on breaking ABI changes.","type":"number"},"task_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["schema_version","run_id","task_id","mode","outcome","deliverable","participants","gates","review","apply","generated_at"],"type":"object"},{"type":"null"}],"default":null,"description":"Validated canonical terminal RunFacts receipt; null while active, unavailable, or for legacy runs."},"runId":{"description":"Daemon run id once the accepted job started a run (recovery handle for inspect/follow/apply/decision); null while the job is still queued or after it failed before a run started.","type":["string","null"]},"status":{"description":"Run lifecycle state (queued | running | succeeded | failed | cancelled | interrupted); null when an accepted job's state could not be read.","type":["string","null"]},"storeId":{"description":"Identity of the durable engine store that accepted this group member, stable across restarts.","minLength":1,"type":"string"},"summary":{"description":"Human-readable outcome summary (same text as the tool's text content).","type":"string"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"}},"required":["summary","runId","runDir","status","applyEligibility"],"type":"object"}},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Enqueue an Agent-mode Claudexor run. Internal model review is off by default; review:true selects a panel automatically, and an explicit reviewerPanel enables review. Returns a durable run handle plus any immediate start facts; use claudexor_run_status/result for the terminal WorkProduct.","inputSchema":{"additionalProperties":false,"properties":{"access":{"description":"Optional access profile for this run.","enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"attachments":{"description":"Immutable resource references from upload finalize. Paths, base64 and internal resolved attachments are rejected; ordinary lane admission still applies.","items":{"additionalProperties":false,"description":"Reference to an immutable daemon-owned uploaded resource.","properties":{"resourceId":{"description":"Immutable daemon resource id returned by upload finalize.","minLength":1,"type":"string"}},"required":["resourceId"],"type":"object"},"type":"array"},"credentialProfileId":{"description":"Strict credential profile for this run; never falls back to another account.","minLength":1,"pattern":"\\S","type":"string"},"effort":{"description":"Optional effort override for the primary harness. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"execution":{"additionalProperties":false,"properties":{"auxiliaryWritableRoots":{"description":"Exact existing absolute directories, created by the caller, that an Agent run with effective workspace_write may also write (service caches or scratch outside the execution tree). [] grants nothing extra; so does omission, except that a continueFrom successor omitting execution inherits its predecessor's whole execution group. Requires a lane whose capability_profile.access_control.auxiliary_writable_roots is true; the files are never part of the project result.","items":{"minLength":1,"type":"string"},"type":"array"},"delegated":{"type":"boolean"},"isolation":{"enum":["envelope","live"],"type":"string"},"scopePaths":{"description":"Selected relative files/directories; '.' selects the whole folder. No implicit whole-folder claim.","items":{"minLength":1,"type":"string"},"type":"array"},"workspaceKind":{"description":"directory needs no Git initialization.","enum":["git","directory"],"type":"string"},"workspaceRoot":{"description":"Actual existing delegated execution directory; stable project identity remains repoPath.","type":"string"}},"type":"object"},"externalContextPolicy":{"description":"Alias of web for control-api parity.","enum":["off","auto","cached","live"],"type":"string"},"harness":{"description":"Optional harness id to force for this one-shot run.","minLength":1,"type":"string"},"idempotencyKey":{"description":"Caller-owned key for this exact launch; requires an explicit repoPath. After an unknown response, repeat the same key and arguments to recover the accepted job or run (a queued job returns its jobId); a different request with the same key conflicts. Recovery assumes the same registered project root still exists: a missing or moved root is refused (project_root_missing) and nothing is replayed or started. Omit for an intentional new launch.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"maxSeconds":{"description":"Initial run time limit in seconds. Explicit limits default to hard unless timeLimitMode is soft.","maximum":604800,"minimum":1,"type":"integer"},"model":{"description":"Optional model override for the primary harness.","minLength":1,"type":"string"},"n":{"description":"Optional best-of-N width for candidate races (or deep-scan scout width).","minimum":1,"type":"integer"},"paidBudget":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"unlimited","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"finite","type":"string"},"maxUsd":{"minimum":0,"type":"number"}},"required":["kind","maxUsd"],"type":"object"}],"description":"Incremental-cash budget: explicitly unlimited or a finite non-negative USD cap."},"primaryHarness":{"description":"Optional primary harness id for this run.","minLength":1,"type":"string"},"processingPreference":{"description":"Advisory service preference; omission inherits captured settings and explicit Standard requests ordinary service.","enum":["standard","fast","economy"],"type":"string"},"prompt":{"description":"The user task or question to run through Claudexor.","minLength":1,"pattern":"\\S","type":"string"},"protectedPathApprovals":{"description":"Typed approvals for existing protected path edits.","items":{"additionalProperties":false,"properties":{"path":{"minLength":1,"type":"string"},"reason":{"minLength":1,"type":"string"}},"required":["path"],"type":"object"},"type":"array"},"repoPath":{"description":"Absolute path of the target project. Defaults to the MCP server cwd; required with idempotencyKey.","type":"string"},"review":{"description":"Enable internal model review. Ordinary Agent defaults to false; true selects reviewers automatically. An explicit reviewer panel or reviewer overrides also enable review. Best-of and until-clean retain review.","type":"boolean"},"reviewerEfforts":{"additionalProperties":false,"description":"Enable review with per-provider reviewer effort overrides.","properties":{"anthropic":{"description":"Reviewer effort for the anthropic family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"cursor":{"description":"Reviewer effort for the cursor family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"google":{"description":"Reviewer effort for the google family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"local":{"description":"Reviewer effort for the local family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"openai":{"description":"Reviewer effort for the openai family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"opencode":{"description":"Reviewer effort for the opencode family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"unknown":{"description":"Reviewer effort for the unknown family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"xai":{"description":"Reviewer effort for the xai family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"}},"type":"object"},"reviewerModels":{"additionalProperties":false,"description":"Enable review with per-provider reviewer model overrides.","properties":{"anthropic":{"minLength":1,"type":"string"},"cursor":{"minLength":1,"type":"string"},"google":{"minLength":1,"type":"string"},"local":{"minLength":1,"type":"string"},"openai":{"minLength":1,"type":"string"},"opencode":{"minLength":1,"type":"string"},"unknown":{"minLength":1,"type":"string"},"xai":{"minLength":1,"type":"string"}},"type":"object"},"reviewerPanel":{"description":"Enable review with explicit panel entries, preserving order and duplicates; no additional review flag is needed.","items":{"additionalProperties":false,"properties":{"credentialProfileId":{"description":"Optional strict credential profile id; absent uses the canonical account pool.","minLength":1,"type":"string"},"effort":{"description":"Effort for this reviewer entry. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"harness":{"minLength":1,"type":"string"},"model":{"minLength":1,"type":"string"},"processingPreference":{"description":"Advisory service preference; omission inherits captured settings and explicit Standard requests ordinary service.","enum":["standard","fast","economy"],"type":"string"}},"required":["harness"],"type":"object"},"minItems":1,"type":"array"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"},"tests":{"description":"Typed-argv deterministic gate commands for this run.","items":{"additionalProperties":false,"description":"Canonical deterministic command invocation; no implicit shell parsing.","properties":{"args":{"default":[],"description":"Exact argv passed to the executable.","items":{"type":"string"},"type":"array"},"cwd":{"description":"Optional project-relative working directory for the command.","type":"string"},"envAllowlist":{"default":[],"description":"Non-secret parent environment names explicitly forwarded to the command.","items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"program":{"description":"Executable invoked directly without an implicit shell.","minLength":1,"pattern":"\\S","type":"string"}},"required":["program"],"type":"object"},"type":"array"},"timeLimitMode":{"description":"With maxSeconds: soft warns and continues; hard cancels on expiry.","enum":["soft","hard"],"type":"string"},"web":{"description":"External context policy for this run.","enum":["off","auto","cached","live"],"type":"string"}},"required":["prompt"],"type":"object"},"name":"claudexor_run","outputSchema":{"additionalProperties":false,"description":"Structured MCP tool result for Claudexor run tools.","properties":{"applyEligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"description":"Apply-gate verdict for mutating runs; null for read-only routes or when no patch exists."},"attemptExecution":{"items":{"additionalProperties":false,"description":"Compact projection of existing attempt execution and amount evidence.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"harnessId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"processing":{"additionalProperties":false,"description":"Requested intent, submitted native control, and observed execution are independent facts. A submitted flag never proves observed service; mixed or missing session observations remain explicit.","properties":{"observed":{"enum":["standard","fast","economy","mixed","unknown"],"type":"string"},"observedNative":{"items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"reason":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"requested":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"submitted":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"submittedNative":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."}},"required":["requested","submitted","submittedNative","observed","observedNative","reason","source"],"type":"object"},"processingCostBasis":{"additionalProperties":false,"description":"Mode-qualified billing evidence for an existing cost record. Authentication alone does not establish included premium service; credits, cash, and token valuation stay distinct.","properties":{"debit":{"const":"unobserved","description":"The route reports no actual cash or purchased-credit debit. Included service still admits the work, but its cash stays unknown instead of zero and is outside the finite cap; absence keeps proven ordinary inclusion as zero cash.","type":"string"},"kind":{"enum":["included","paid_credits","cash","valuation","unknown"],"type":"string"},"nativeMode":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"}},"required":["nativeMode","kind","source"],"type":"object"},"usageCost":{"additionalProperties":false,"description":"Observed usage components. An amount of unknown meaning is not charged cash; separately proven included service can still establish exact zero incremental cash unless its route reports no actual debit.","properties":{"cashKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"cashUsd":{"minimum":0,"type":"number"},"unknownUsd":{"minimum":0,"type":"number"},"valuationKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"minimum":0,"type":"number"}},"required":["cashUsd","valuationUsd","unknownUsd","cashKnowledge","valuationKnowledge"],"type":"object"}},"required":["attemptId","harnessId"],"type":"object"},"type":"array"},"council":{"anyOf":[{"additionalProperties":false,"description":"Council membership + merge disclosure for a --council plan run.","properties":{"degraded":{"default":false,"description":"True when fewer contract-accepted drafts than requested, including any retained unverified contribution; failures remain disclosed per member.","type":"boolean"},"drafted":{"description":"Members with contract-accepted drafts; excludes retained unverified inputs and is not a work-completion or verification count.","minimum":0,"type":"integer"},"members":{"default":[],"description":"Per-member role and outcome.","items":{"additionalProperties":false,"description":"One council member's role and draft/merge outcome.","properties":{"error":{"default":null,"description":"First redacted draft error; null unless the member failed.","type":["string","null"]},"harnessId":{"description":"Harness that drafted (or merged) this member's plan.","minLength":1,"type":"string"},"role":{"description":"primary = the merger that synthesizes the unified plan; member = draft only.","enum":["primary","member"],"type":"string"},"status":{"description":"Draft outcome: drafted = contract-accepted input; merged = accepted draft and successful merge; failed stays failed even when its unverified text helped the merger.","enum":["drafted","failed","merged"],"type":"string"}},"required":["harnessId","role","status"],"type":"object"},"type":"array"},"mergedBy":{"default":null,"description":"Harness that produced the unified plan (the primary); null if the merge failed.","type":["string","null"]},"requested":{"description":"Requested member count (n; at least 2, up to the configured Council cap).","exclusiveMinimum":0,"type":"integer"}},"required":["requested","drafted"],"type":"object"},{"type":"null"}],"default":null,"description":"Council membership + merge disclosure (QA-023b); null for solo/non-plan tools or deferred handles."},"deferredMessage":{"anyOf":[{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"},{"type":"null"}],"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved."},"delegatedFromRunId":{"default":null,"type":["string","null"]},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.","properties":{"effective":{"default":false,"type":"boolean"},"reason":{"default":"not_requested","enum":["pending","not_requested","injected_unused","used","runtime_unavailable","manifest_unsupported","access_profile_incompatible","partially_degraded","startup_failed"],"type":"string"},"remediation":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null},"requested":{"default":false,"type":"boolean"},"used":{"default":false,"type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output."},"detailProblem":{"anyOf":[{"additionalProperties":false,"description":"Typed failure of a post-run detail read whose durable run result still survives.","properties":{"code":{"description":"Stable machine code of the detail problem, if any.","type":["string","null"]},"message":{"description":"Human-readable description of the detail problem.","type":"string"},"retryable":{"description":"Whether retrying the detail read may help.","type":["boolean","null"]}},"required":["code","message","retryable"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed post-terminal detail-read problem (the run result survives; its detail projections are absent for this reason); null when the detail read succeeded."},"failure":{"anyOf":[{"additionalProperties":false,"description":"Typed failure record for a run: phase, category, evidence references, and suggested next actions.","properties":{"attemptId":{"default":null,"description":"Attempt involved in the failure, when known.","type":["string","null"]},"captureFailure":{"additionalProperties":false,"properties":{"bufferBudgetBytes":{"minimum":0,"type":"integer"},"causeCode":{"type":"string"},"cleanup":{"additionalProperties":false,"properties":{"code":{"type":["string","null"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"code":{"enum":["capture_output_exceeded","capture_output_incomplete","capture_preview_truncated","capture_failed"],"type":"string"},"drain":{"const":"truncated","type":"string"},"message":{"type":"string"},"stream":{"enum":["stdout","stderr"],"type":"string"}},"required":["code","message"],"type":"object"},"category":{"default":"unknown","description":"Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness.","enum":["validation","project","auth","harness_unavailable","harness_error","config_error","budget","policy","cancelled","internal","unknown"],"type":"string"},"code":{"anyOf":[{"description":"Machine-readable failure sub-code within a RunFailure category, including historical delegated-run failures and active access-profile refusals.","enum":["finite_zero","hard_cap","estimate_headroom","unknown_paid_in_flight","budget_overshoot","cost_unverifiable","delegation_child_drain_timeout","subscription_window_exhausted","credential_pool_exhausted","input_too_large","vendor_cli_too_old","credential_source_unconfirmed","delegated_home_unavailable","delegated_confinement_unavailable","delegated_evidence_incomplete","access_profile_incompatible","auxiliary_writable_roots_unsupported","retired_access_profile"],"type":"string"},{"type":"null"}],"default":null,"description":"Machine-readable failure sub-code within the category; null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage."},"eventRefs":{"default":[],"description":"Event references relevant to the failure.","items":{"type":"string"},"type":"array"},"harnessId":{"default":null,"description":"Harness involved in the failure, when known.","type":["string","null"]},"logRefs":{"default":[],"description":"Log artifact paths relevant to the failure.","items":{"type":"string"},"type":"array"},"nextActions":{"default":[],"description":"Suggested operator next actions.","items":{"type":"string"},"type":"array"},"phase":{"default":"unknown","description":"Pipeline phase where the failure happened.","type":"string"},"poolAttempts":{"default":[],"description":"Every failed execution try in order, each with its own account and error text; empty when no try failed (and for records written before this field existed).","items":{"additionalProperties":false,"description":"Per-try account attribution of a failed execution try (diagnostic evidence only).","properties":{"attemptId":{"description":"Attempt the try belongs to.","minLength":1,"type":"string"},"category":{"description":"Typed failure category of the try; untyped errors are unknown_harness_error.","enum":["timeout","rate_limited","auth_failed","capability_refused","process_crash","config_error","unknown_harness_error"],"type":"string"},"error":{"description":"The try's own error text with its original wording and whitespace, redacted.","type":"string"},"harnessId":{"description":"Harness the try ran on.","minLength":1,"type":"string"},"observedAt":{"description":"When the try's first error was observed.","format":"date-time","type":"string"},"phase":{"description":"How far the try got: before a typed session start, after start but before agent progress, or after progress.","enum":["pre_start","pre_progress","after_progress"],"type":"string"},"profileDisplayName":{"description":"The row's display name at try time (redacted); null for the default route.","type":["string","null"]},"profileId":{"description":"Account row the try ran on; null = the harness default route.","type":["string","null"]},"requestedModel":{"description":"Model the try asked for; null = the harness default model.","type":["string","null"]},"tryIndex":{"description":"Zero-based try index within the attempt.","minimum":0,"type":"integer"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"description":"The vendor's own typed failure for this try, when the adapter attached one."}},"required":["harnessId","profileId","profileDisplayName","requestedModel","attemptId","tryIndex","observedAt","phase","category","error","vendorFailure"],"type":"object"},"type":"array"},"rawDetailRef":{"default":null,"description":"Artifact path holding the raw (redacted) failure detail.","type":["string","null"]},"requestRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"actual":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"kind":{"const":"input_too_large","type":"string"},"limit":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"native_code":{"minLength":1,"type":"string"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"}},"required":["scope","unit","limit","source","kind","actual","native_code"],"type":"object"},{"additionalProperties":false,"properties":{"binary_path":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"installed_version":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"kind":{"const":"vendor_cli_too_old","type":"string"},"native_code":{"const":"claude_code_version_too_old","type":"string"},"source":{"const":"claude_stdout","type":"string"}},"required":["kind","native_code","source","binary_path","installed_version"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"credential_source_unconfirmed","type":"string"},"native_code":{"const":"grok_credential_source_unconfirmed","type":"string"},"reported_source":{"description":"Redacted credential source the vendor's startup frame reported.","maxLength":80,"type":"string"},"source":{"const":"grok_init","type":"string"}},"required":["kind","native_code","source","reported_source"],"type":"object"}],"description":"Vendor-attested request refusal that stops retries and account rotation on its harness; input, executable and credential-source causes carry their own evidence."},"resetsAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the refused window reopens (a spent subscription quota window), or null when the failure has no such time. Callers schedule a retry off this field, never off safeMessage."},"runDir":{"default":null,"description":"Run artifact directory.","type":["string","null"]},"safeMessage":{"description":"Redacted human-readable failure message.","type":"string"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"default":null,"description":"The vendor's own typed failure for the attempt this record speaks for, or null when no vendor-typed evidence exists (every harness without such a channel, and any unreadable record). Facts only: carries no remedy."}},"required":["safeMessage"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed terminal failure detail and recovery actions; null for non-failed runs."},"jobId":{"default":null,"description":"Daemon job id of the accepted launch. While runId is null, pass it as runId to the status, wait and result tools; they report the canonical runId once the run binds.","type":["string","null"]},"outcomeBanner":{"default":null,"description":"Server-owned outcome headline (D18); the single honest one-line verdict, null while non-terminal or unavailable.","type":["string","null"]},"outcomeFacts":{"anyOf":[{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},{"type":"null"}],"default":null,"description":"The D8 terminal outcome axes (checks/review/reason/noChanges); null for non-terminal or read-only routes."},"parentRunId":{"default":null,"type":["string","null"]},"planReadiness":{"anyOf":[{"additionalProperties":false,"description":"Server-derived readiness of a plan run (one derivation owner; D17).","properties":{"questionCount":{"default":0,"minimum":0,"type":"integer"},"state":{"description":"Derived plan readiness: ready (block parsed, zero open questions), needs_answers (open questions remain), unverified (no parseable block — the planner ignored the format).","enum":["ready","needs_answers","unverified"],"type":"string"}},"required":["state"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived plan readiness for plan tools (D17); null for non-plan tools."},"runDir":{"description":"Artifact directory of the run; null when not persisted.","type":["string","null"]},"runFacts":{"anyOf":[{"additionalProperties":false,"description":"Validated immutable terminal facts for one run.","properties":{"apply":{"additionalProperties":false,"description":"Terminal apply eligibility and operator-decision state.","properties":{"eligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Delivery-gate eligibility at terminalization; null when nothing is applyable."},"operator_decision_present":{"default":false,"description":"Whether a valid operator decision was present when the receipt was finalized.","type":"boolean"}},"type":"object"},"deliverable":{"additionalProperties":false,"description":"Canonical primary-output presence and identity for a terminal run.","properties":{"kind":{"anyOf":[{"enum":["answer","report","plan","patch","files","structured_output"],"type":"string"},{"type":"null"}],"description":"Kind of canonical primary deliverable; null when none exists."},"path":{"description":"Run-relative path of the canonical primary deliverable; null when absent.","type":["string","null"]},"present":{"description":"Whether the canonical primary deliverable exists.","type":"boolean"},"producer_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt that produced the deliverable, when known."}},"required":["present","kind","path"],"type":"object"},"gates":{"additionalProperties":false,"description":"Canonical gate configuration and terminal receipt projection.","properties":{"configured":{"description":"Whether the frozen task configured deterministic gates.","type":"boolean"},"executed":{"description":"Whether the terminal attempt executed the gate set.","type":"boolean"},"receipt_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt whose gate receipt decides this projection; null when no gates executed."},"required":{"description":"Number of configured required gates.","minimum":0,"type":"integer"},"state":{"description":"Terminal state of the configured deterministic gate set.","enum":["not_configured","passed","failed","skipped"],"type":"string"},"total":{"description":"Total configured deterministic gates.","minimum":0,"type":"integer"}},"required":["configured","required","total","executed","state"],"type":"object"},"generated_at":{"description":"When this immutable terminal receipt was finalized.","minLength":1,"type":"string"},"mode":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"outcome":{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},"participants":{"additionalProperties":false,"description":"Terminal participant graph plus its planner-lane count.","properties":{"attempts":{"default":[],"description":"Role-labelled participant roster.","items":{"additionalProperties":false,"description":"One role-labelled participant in the terminal run graph.","properties":{"attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Attempt id when the participant owns an orchestrator attempt; null for reviewer-panel members."},"deliverable_present":{"default":false,"description":"Whether this participant produced the deliverable its role requested.","type":"boolean"},"harness_id":{"description":"Harness that served this participant role.","minLength":1,"type":"string"},"role":{"description":"Canonical role of one participant in the terminal run graph.","enum":["planner","merge","candidate","scout","reducer","reviewer"],"type":"string"},"status":{"anyOf":[{"description":"Terminal outcome recorded for one run participant.","enum":["success","success_with_warnings","blocked","failed"],"type":"string"},{"type":"null"}],"default":null,"description":"Participant outcome when recorded; null for artifact-only reviewer membership."}},"required":["attempt_id","harness_id","role"],"type":"object"},"type":"array"},"planners":{"description":"Number of participants whose canonical role is planner.","minimum":0,"type":"integer"}},"required":["planners"],"type":"object"},"presentation":{"additionalProperties":false,"description":"Immutable terminal output state and primary artifact. Absent only on legacy RunFacts receipts.","properties":{"primary":{"anyOf":[{"additionalProperties":false,"description":"Primary user-facing artifact selected once during terminal preparation.","properties":{"kind":{"description":"Presentation kind of the terminal primary artifact.","enum":["answer","report","plan","patch","files","structured_output","diagnostic"],"type":"string"},"path":{"description":"Normalized run-relative path of the terminal primary artifact.","minLength":1,"type":"string"}},"required":["kind","path"],"type":"object"},{"type":"null"}],"description":"Selected terminal primary artifact, or null when the receipt announces readiness without a primary deliverable."},"state":{"description":"Terminal output readiness decided by the last valid output.ready receipt.","enum":["ready","diagnostic"],"type":"string"}},"required":["state","primary"],"type":"object"},"required_actions":{"default":[],"description":"Typed actions required to unblock this terminal outcome.","items":{"additionalProperties":false,"description":"One typed required operator action derived from a run's terminal outcome facts.","properties":{"detail":{"description":"Human-readable guidance for this action (English-only, INV-141).","type":"string"},"id":{"description":"Stable machine id for a required operator action on a blocked terminal run.","enum":["provide_required_input","complete_incomplete_work","resolve_review_block","fix_failed_checks","record_operator_decision"],"type":"string"}},"required":["id","detail"],"type":"object"},"type":"array"},"review":{"additionalProperties":false,"description":"Canonical terminal review verdict and blocking-finding identity.","properties":{"blocker_ids":{"default":[],"description":"Stable ids of accepted evidence-backed blocking findings.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"blockers":{"description":"Number of blocking findings.","minimum":0,"type":"integer"},"state":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"}},"required":["state","blockers"],"type":"object"},"run_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"schema_version":{"const":2,"description":"Schema version of the artifact; bumped on breaking ABI changes.","type":"number"},"task_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["schema_version","run_id","task_id","mode","outcome","deliverable","participants","gates","review","apply","generated_at"],"type":"object"},{"type":"null"}],"default":null,"description":"Validated canonical terminal RunFacts receipt; null while active, unavailable, or for legacy runs."},"runId":{"description":"Daemon run id once the accepted job started a run (recovery handle for inspect/follow/apply/decision); null while the job is still queued or after it failed before a run started.","type":["string","null"]},"status":{"description":"Run lifecycle state (queued | running | succeeded | failed | cancelled | interrupted); null when an accepted job's state could not be read.","type":["string","null"]},"storeId":{"description":"Identity of the durable engine store that accepted this group member, stable across restarts.","minLength":1,"type":"string"},"summary":{"description":"Human-readable outcome summary (same text as the tool's text content).","type":"string"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"}},"required":["summary","runId","runDir","status","applyEligibility"],"type":"object"}},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Enqueue a best-of-N Claudexor run with cross-family review. Returns a durable run handle; use claudexor_run_status/result for terminal output.","inputSchema":{"additionalProperties":false,"properties":{"access":{"description":"Optional access profile for this run.","enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"attachments":{"description":"Immutable resource references from upload finalize. Paths, base64 and internal resolved attachments are rejected; ordinary lane admission still applies.","items":{"additionalProperties":false,"description":"Reference to an immutable daemon-owned uploaded resource.","properties":{"resourceId":{"description":"Immutable daemon resource id returned by upload finalize.","minLength":1,"type":"string"}},"required":["resourceId"],"type":"object"},"type":"array"},"credentialProfileId":{"description":"Strict credential profile for this run; never falls back to another account.","minLength":1,"pattern":"\\S","type":"string"},"effort":{"description":"Optional effort override for the primary harness. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"execution":{"additionalProperties":false,"properties":{"auxiliaryWritableRoots":{"description":"Exact existing absolute directories, created by the caller, that an Agent run with effective workspace_write may also write (service caches or scratch outside the execution tree). [] grants nothing extra; so does omission, except that a continueFrom successor omitting execution inherits its predecessor's whole execution group. Requires a lane whose capability_profile.access_control.auxiliary_writable_roots is true; the files are never part of the project result.","items":{"minLength":1,"type":"string"},"type":"array"},"delegated":{"type":"boolean"},"isolation":{"enum":["envelope","live"],"type":"string"},"scopePaths":{"description":"Selected relative files/directories; '.' selects the whole folder. No implicit whole-folder claim.","items":{"minLength":1,"type":"string"},"type":"array"},"workspaceKind":{"description":"directory needs no Git initialization.","enum":["git","directory"],"type":"string"},"workspaceRoot":{"description":"Actual existing delegated execution directory; stable project identity remains repoPath.","type":"string"}},"type":"object"},"externalContextPolicy":{"description":"Alias of web for control-api parity.","enum":["off","auto","cached","live"],"type":"string"},"harness":{"description":"Optional harness id to force for this one-shot run.","minLength":1,"type":"string"},"idempotencyKey":{"description":"Caller-owned key for this exact launch; requires an explicit repoPath. After an unknown response, repeat the same key and arguments to recover the accepted job or run (a queued job returns its jobId); a different request with the same key conflicts. Recovery assumes the same registered project root still exists: a missing or moved root is refused (project_root_missing) and nothing is replayed or started. Omit for an intentional new launch.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"maxSeconds":{"description":"Initial run time limit in seconds. Explicit limits default to hard unless timeLimitMode is soft.","maximum":604800,"minimum":1,"type":"integer"},"model":{"description":"Optional model override for the primary harness.","minLength":1,"type":"string"},"n":{"description":"Optional best-of-N width for candidate races (or deep-scan scout width).","minimum":2,"type":"integer"},"paidBudget":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"unlimited","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"finite","type":"string"},"maxUsd":{"minimum":0,"type":"number"}},"required":["kind","maxUsd"],"type":"object"}],"description":"Incremental-cash budget: explicitly unlimited or a finite non-negative USD cap."},"primaryHarness":{"description":"Optional primary harness id for this run.","minLength":1,"type":"string"},"processingPreference":{"description":"Advisory service preference; omission inherits captured settings and explicit Standard requests ordinary service.","enum":["standard","fast","economy"],"type":"string"},"prompt":{"description":"The user task or question to run through Claudexor.","minLength":1,"pattern":"\\S","type":"string"},"protectedPathApprovals":{"description":"Typed approvals for existing protected path edits.","items":{"additionalProperties":false,"properties":{"path":{"minLength":1,"type":"string"},"reason":{"minLength":1,"type":"string"}},"required":["path"],"type":"object"},"type":"array"},"repoPath":{"description":"Absolute path of the target project. Defaults to the MCP server cwd; required with idempotencyKey.","type":"string"},"review":{"description":"Enable internal model review. Ordinary Agent defaults to false; true selects reviewers automatically. An explicit reviewer panel or reviewer overrides also enable review. Best-of and until-clean retain review.","type":"boolean"},"reviewerEfforts":{"additionalProperties":false,"description":"Enable review with per-provider reviewer effort overrides.","properties":{"anthropic":{"description":"Reviewer effort for the anthropic family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"cursor":{"description":"Reviewer effort for the cursor family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"google":{"description":"Reviewer effort for the google family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"local":{"description":"Reviewer effort for the local family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"openai":{"description":"Reviewer effort for the openai family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"opencode":{"description":"Reviewer effort for the opencode family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"unknown":{"description":"Reviewer effort for the unknown family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"xai":{"description":"Reviewer effort for the xai family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"}},"type":"object"},"reviewerModels":{"additionalProperties":false,"description":"Enable review with per-provider reviewer model overrides.","properties":{"anthropic":{"minLength":1,"type":"string"},"cursor":{"minLength":1,"type":"string"},"google":{"minLength":1,"type":"string"},"local":{"minLength":1,"type":"string"},"openai":{"minLength":1,"type":"string"},"opencode":{"minLength":1,"type":"string"},"unknown":{"minLength":1,"type":"string"},"xai":{"minLength":1,"type":"string"}},"type":"object"},"reviewerPanel":{"description":"Enable review with explicit panel entries, preserving order and duplicates; no additional review flag is needed.","items":{"additionalProperties":false,"properties":{"credentialProfileId":{"description":"Optional strict credential profile id; absent uses the canonical account pool.","minLength":1,"type":"string"},"effort":{"description":"Effort for this reviewer entry. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"harness":{"minLength":1,"type":"string"},"model":{"minLength":1,"type":"string"},"processingPreference":{"description":"Advisory service preference; omission inherits captured settings and explicit Standard requests ordinary service.","enum":["standard","fast","economy"],"type":"string"}},"required":["harness"],"type":"object"},"minItems":1,"type":"array"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"},"tests":{"description":"Typed-argv deterministic gate commands for this run.","items":{"additionalProperties":false,"description":"Canonical deterministic command invocation; no implicit shell parsing.","properties":{"args":{"default":[],"description":"Exact argv passed to the executable.","items":{"type":"string"},"type":"array"},"cwd":{"description":"Optional project-relative working directory for the command.","type":"string"},"envAllowlist":{"default":[],"description":"Non-secret parent environment names explicitly forwarded to the command.","items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"program":{"description":"Executable invoked directly without an implicit shell.","minLength":1,"pattern":"\\S","type":"string"}},"required":["program"],"type":"object"},"type":"array"},"timeLimitMode":{"description":"With maxSeconds: soft warns and continues; hard cancels on expiry.","enum":["soft","hard"],"type":"string"},"web":{"description":"External context policy for this run.","enum":["off","auto","cached","live"],"type":"string"}},"required":["prompt"],"type":"object"},"name":"claudexor_best_of","outputSchema":{"additionalProperties":false,"description":"Structured MCP tool result for Claudexor run tools.","properties":{"applyEligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"description":"Apply-gate verdict for mutating runs; null for read-only routes or when no patch exists."},"attemptExecution":{"items":{"additionalProperties":false,"description":"Compact projection of existing attempt execution and amount evidence.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"harnessId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"processing":{"additionalProperties":false,"description":"Requested intent, submitted native control, and observed execution are independent facts. A submitted flag never proves observed service; mixed or missing session observations remain explicit.","properties":{"observed":{"enum":["standard","fast","economy","mixed","unknown"],"type":"string"},"observedNative":{"items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"reason":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"requested":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"submitted":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"submittedNative":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."}},"required":["requested","submitted","submittedNative","observed","observedNative","reason","source"],"type":"object"},"processingCostBasis":{"additionalProperties":false,"description":"Mode-qualified billing evidence for an existing cost record. Authentication alone does not establish included premium service; credits, cash, and token valuation stay distinct.","properties":{"debit":{"const":"unobserved","description":"The route reports no actual cash or purchased-credit debit. Included service still admits the work, but its cash stays unknown instead of zero and is outside the finite cap; absence keeps proven ordinary inclusion as zero cash.","type":"string"},"kind":{"enum":["included","paid_credits","cash","valuation","unknown"],"type":"string"},"nativeMode":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"}},"required":["nativeMode","kind","source"],"type":"object"},"usageCost":{"additionalProperties":false,"description":"Observed usage components. An amount of unknown meaning is not charged cash; separately proven included service can still establish exact zero incremental cash unless its route reports no actual debit.","properties":{"cashKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"cashUsd":{"minimum":0,"type":"number"},"unknownUsd":{"minimum":0,"type":"number"},"valuationKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"minimum":0,"type":"number"}},"required":["cashUsd","valuationUsd","unknownUsd","cashKnowledge","valuationKnowledge"],"type":"object"}},"required":["attemptId","harnessId"],"type":"object"},"type":"array"},"council":{"anyOf":[{"additionalProperties":false,"description":"Council membership + merge disclosure for a --council plan run.","properties":{"degraded":{"default":false,"description":"True when fewer contract-accepted drafts than requested, including any retained unverified contribution; failures remain disclosed per member.","type":"boolean"},"drafted":{"description":"Members with contract-accepted drafts; excludes retained unverified inputs and is not a work-completion or verification count.","minimum":0,"type":"integer"},"members":{"default":[],"description":"Per-member role and outcome.","items":{"additionalProperties":false,"description":"One council member's role and draft/merge outcome.","properties":{"error":{"default":null,"description":"First redacted draft error; null unless the member failed.","type":["string","null"]},"harnessId":{"description":"Harness that drafted (or merged) this member's plan.","minLength":1,"type":"string"},"role":{"description":"primary = the merger that synthesizes the unified plan; member = draft only.","enum":["primary","member"],"type":"string"},"status":{"description":"Draft outcome: drafted = contract-accepted input; merged = accepted draft and successful merge; failed stays failed even when its unverified text helped the merger.","enum":["drafted","failed","merged"],"type":"string"}},"required":["harnessId","role","status"],"type":"object"},"type":"array"},"mergedBy":{"default":null,"description":"Harness that produced the unified plan (the primary); null if the merge failed.","type":["string","null"]},"requested":{"description":"Requested member count (n; at least 2, up to the configured Council cap).","exclusiveMinimum":0,"type":"integer"}},"required":["requested","drafted"],"type":"object"},{"type":"null"}],"default":null,"description":"Council membership + merge disclosure (QA-023b); null for solo/non-plan tools or deferred handles."},"deferredMessage":{"anyOf":[{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"},{"type":"null"}],"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved."},"delegatedFromRunId":{"default":null,"type":["string","null"]},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.","properties":{"effective":{"default":false,"type":"boolean"},"reason":{"default":"not_requested","enum":["pending","not_requested","injected_unused","used","runtime_unavailable","manifest_unsupported","access_profile_incompatible","partially_degraded","startup_failed"],"type":"string"},"remediation":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null},"requested":{"default":false,"type":"boolean"},"used":{"default":false,"type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output."},"detailProblem":{"anyOf":[{"additionalProperties":false,"description":"Typed failure of a post-run detail read whose durable run result still survives.","properties":{"code":{"description":"Stable machine code of the detail problem, if any.","type":["string","null"]},"message":{"description":"Human-readable description of the detail problem.","type":"string"},"retryable":{"description":"Whether retrying the detail read may help.","type":["boolean","null"]}},"required":["code","message","retryable"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed post-terminal detail-read problem (the run result survives; its detail projections are absent for this reason); null when the detail read succeeded."},"failure":{"anyOf":[{"additionalProperties":false,"description":"Typed failure record for a run: phase, category, evidence references, and suggested next actions.","properties":{"attemptId":{"default":null,"description":"Attempt involved in the failure, when known.","type":["string","null"]},"captureFailure":{"additionalProperties":false,"properties":{"bufferBudgetBytes":{"minimum":0,"type":"integer"},"causeCode":{"type":"string"},"cleanup":{"additionalProperties":false,"properties":{"code":{"type":["string","null"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"code":{"enum":["capture_output_exceeded","capture_output_incomplete","capture_preview_truncated","capture_failed"],"type":"string"},"drain":{"const":"truncated","type":"string"},"message":{"type":"string"},"stream":{"enum":["stdout","stderr"],"type":"string"}},"required":["code","message"],"type":"object"},"category":{"default":"unknown","description":"Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness.","enum":["validation","project","auth","harness_unavailable","harness_error","config_error","budget","policy","cancelled","internal","unknown"],"type":"string"},"code":{"anyOf":[{"description":"Machine-readable failure sub-code within a RunFailure category, including historical delegated-run failures and active access-profile refusals.","enum":["finite_zero","hard_cap","estimate_headroom","unknown_paid_in_flight","budget_overshoot","cost_unverifiable","delegation_child_drain_timeout","subscription_window_exhausted","credential_pool_exhausted","input_too_large","vendor_cli_too_old","credential_source_unconfirmed","delegated_home_unavailable","delegated_confinement_unavailable","delegated_evidence_incomplete","access_profile_incompatible","auxiliary_writable_roots_unsupported","retired_access_profile"],"type":"string"},{"type":"null"}],"default":null,"description":"Machine-readable failure sub-code within the category; null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage."},"eventRefs":{"default":[],"description":"Event references relevant to the failure.","items":{"type":"string"},"type":"array"},"harnessId":{"default":null,"description":"Harness involved in the failure, when known.","type":["string","null"]},"logRefs":{"default":[],"description":"Log artifact paths relevant to the failure.","items":{"type":"string"},"type":"array"},"nextActions":{"default":[],"description":"Suggested operator next actions.","items":{"type":"string"},"type":"array"},"phase":{"default":"unknown","description":"Pipeline phase where the failure happened.","type":"string"},"poolAttempts":{"default":[],"description":"Every failed execution try in order, each with its own account and error text; empty when no try failed (and for records written before this field existed).","items":{"additionalProperties":false,"description":"Per-try account attribution of a failed execution try (diagnostic evidence only).","properties":{"attemptId":{"description":"Attempt the try belongs to.","minLength":1,"type":"string"},"category":{"description":"Typed failure category of the try; untyped errors are unknown_harness_error.","enum":["timeout","rate_limited","auth_failed","capability_refused","process_crash","config_error","unknown_harness_error"],"type":"string"},"error":{"description":"The try's own error text with its original wording and whitespace, redacted.","type":"string"},"harnessId":{"description":"Harness the try ran on.","minLength":1,"type":"string"},"observedAt":{"description":"When the try's first error was observed.","format":"date-time","type":"string"},"phase":{"description":"How far the try got: before a typed session start, after start but before agent progress, or after progress.","enum":["pre_start","pre_progress","after_progress"],"type":"string"},"profileDisplayName":{"description":"The row's display name at try time (redacted); null for the default route.","type":["string","null"]},"profileId":{"description":"Account row the try ran on; null = the harness default route.","type":["string","null"]},"requestedModel":{"description":"Model the try asked for; null = the harness default model.","type":["string","null"]},"tryIndex":{"description":"Zero-based try index within the attempt.","minimum":0,"type":"integer"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"description":"The vendor's own typed failure for this try, when the adapter attached one."}},"required":["harnessId","profileId","profileDisplayName","requestedModel","attemptId","tryIndex","observedAt","phase","category","error","vendorFailure"],"type":"object"},"type":"array"},"rawDetailRef":{"default":null,"description":"Artifact path holding the raw (redacted) failure detail.","type":["string","null"]},"requestRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"actual":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"kind":{"const":"input_too_large","type":"string"},"limit":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"native_code":{"minLength":1,"type":"string"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"}},"required":["scope","unit","limit","source","kind","actual","native_code"],"type":"object"},{"additionalProperties":false,"properties":{"binary_path":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"installed_version":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"kind":{"const":"vendor_cli_too_old","type":"string"},"native_code":{"const":"claude_code_version_too_old","type":"string"},"source":{"const":"claude_stdout","type":"string"}},"required":["kind","native_code","source","binary_path","installed_version"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"credential_source_unconfirmed","type":"string"},"native_code":{"const":"grok_credential_source_unconfirmed","type":"string"},"reported_source":{"description":"Redacted credential source the vendor's startup frame reported.","maxLength":80,"type":"string"},"source":{"const":"grok_init","type":"string"}},"required":["kind","native_code","source","reported_source"],"type":"object"}],"description":"Vendor-attested request refusal that stops retries and account rotation on its harness; input, executable and credential-source causes carry their own evidence."},"resetsAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the refused window reopens (a spent subscription quota window), or null when the failure has no such time. Callers schedule a retry off this field, never off safeMessage."},"runDir":{"default":null,"description":"Run artifact directory.","type":["string","null"]},"safeMessage":{"description":"Redacted human-readable failure message.","type":"string"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"default":null,"description":"The vendor's own typed failure for the attempt this record speaks for, or null when no vendor-typed evidence exists (every harness without such a channel, and any unreadable record). Facts only: carries no remedy."}},"required":["safeMessage"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed terminal failure detail and recovery actions; null for non-failed runs."},"jobId":{"default":null,"description":"Daemon job id of the accepted launch. While runId is null, pass it as runId to the status, wait and result tools; they report the canonical runId once the run binds.","type":["string","null"]},"outcomeBanner":{"default":null,"description":"Server-owned outcome headline (D18); the single honest one-line verdict, null while non-terminal or unavailable.","type":["string","null"]},"outcomeFacts":{"anyOf":[{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},{"type":"null"}],"default":null,"description":"The D8 terminal outcome axes (checks/review/reason/noChanges); null for non-terminal or read-only routes."},"parentRunId":{"default":null,"type":["string","null"]},"planReadiness":{"anyOf":[{"additionalProperties":false,"description":"Server-derived readiness of a plan run (one derivation owner; D17).","properties":{"questionCount":{"default":0,"minimum":0,"type":"integer"},"state":{"description":"Derived plan readiness: ready (block parsed, zero open questions), needs_answers (open questions remain), unverified (no parseable block — the planner ignored the format).","enum":["ready","needs_answers","unverified"],"type":"string"}},"required":["state"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived plan readiness for plan tools (D17); null for non-plan tools."},"runDir":{"description":"Artifact directory of the run; null when not persisted.","type":["string","null"]},"runFacts":{"anyOf":[{"additionalProperties":false,"description":"Validated immutable terminal facts for one run.","properties":{"apply":{"additionalProperties":false,"description":"Terminal apply eligibility and operator-decision state.","properties":{"eligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Delivery-gate eligibility at terminalization; null when nothing is applyable."},"operator_decision_present":{"default":false,"description":"Whether a valid operator decision was present when the receipt was finalized.","type":"boolean"}},"type":"object"},"deliverable":{"additionalProperties":false,"description":"Canonical primary-output presence and identity for a terminal run.","properties":{"kind":{"anyOf":[{"enum":["answer","report","plan","patch","files","structured_output"],"type":"string"},{"type":"null"}],"description":"Kind of canonical primary deliverable; null when none exists."},"path":{"description":"Run-relative path of the canonical primary deliverable; null when absent.","type":["string","null"]},"present":{"description":"Whether the canonical primary deliverable exists.","type":"boolean"},"producer_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt that produced the deliverable, when known."}},"required":["present","kind","path"],"type":"object"},"gates":{"additionalProperties":false,"description":"Canonical gate configuration and terminal receipt projection.","properties":{"configured":{"description":"Whether the frozen task configured deterministic gates.","type":"boolean"},"executed":{"description":"Whether the terminal attempt executed the gate set.","type":"boolean"},"receipt_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt whose gate receipt decides this projection; null when no gates executed."},"required":{"description":"Number of configured required gates.","minimum":0,"type":"integer"},"state":{"description":"Terminal state of the configured deterministic gate set.","enum":["not_configured","passed","failed","skipped"],"type":"string"},"total":{"description":"Total configured deterministic gates.","minimum":0,"type":"integer"}},"required":["configured","required","total","executed","state"],"type":"object"},"generated_at":{"description":"When this immutable terminal receipt was finalized.","minLength":1,"type":"string"},"mode":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"outcome":{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},"participants":{"additionalProperties":false,"description":"Terminal participant graph plus its planner-lane count.","properties":{"attempts":{"default":[],"description":"Role-labelled participant roster.","items":{"additionalProperties":false,"description":"One role-labelled participant in the terminal run graph.","properties":{"attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Attempt id when the participant owns an orchestrator attempt; null for reviewer-panel members."},"deliverable_present":{"default":false,"description":"Whether this participant produced the deliverable its role requested.","type":"boolean"},"harness_id":{"description":"Harness that served this participant role.","minLength":1,"type":"string"},"role":{"description":"Canonical role of one participant in the terminal run graph.","enum":["planner","merge","candidate","scout","reducer","reviewer"],"type":"string"},"status":{"anyOf":[{"description":"Terminal outcome recorded for one run participant.","enum":["success","success_with_warnings","blocked","failed"],"type":"string"},{"type":"null"}],"default":null,"description":"Participant outcome when recorded; null for artifact-only reviewer membership."}},"required":["attempt_id","harness_id","role"],"type":"object"},"type":"array"},"planners":{"description":"Number of participants whose canonical role is planner.","minimum":0,"type":"integer"}},"required":["planners"],"type":"object"},"presentation":{"additionalProperties":false,"description":"Immutable terminal output state and primary artifact. Absent only on legacy RunFacts receipts.","properties":{"primary":{"anyOf":[{"additionalProperties":false,"description":"Primary user-facing artifact selected once during terminal preparation.","properties":{"kind":{"description":"Presentation kind of the terminal primary artifact.","enum":["answer","report","plan","patch","files","structured_output","diagnostic"],"type":"string"},"path":{"description":"Normalized run-relative path of the terminal primary artifact.","minLength":1,"type":"string"}},"required":["kind","path"],"type":"object"},{"type":"null"}],"description":"Selected terminal primary artifact, or null when the receipt announces readiness without a primary deliverable."},"state":{"description":"Terminal output readiness decided by the last valid output.ready receipt.","enum":["ready","diagnostic"],"type":"string"}},"required":["state","primary"],"type":"object"},"required_actions":{"default":[],"description":"Typed actions required to unblock this terminal outcome.","items":{"additionalProperties":false,"description":"One typed required operator action derived from a run's terminal outcome facts.","properties":{"detail":{"description":"Human-readable guidance for this action (English-only, INV-141).","type":"string"},"id":{"description":"Stable machine id for a required operator action on a blocked terminal run.","enum":["provide_required_input","complete_incomplete_work","resolve_review_block","fix_failed_checks","record_operator_decision"],"type":"string"}},"required":["id","detail"],"type":"object"},"type":"array"},"review":{"additionalProperties":false,"description":"Canonical terminal review verdict and blocking-finding identity.","properties":{"blocker_ids":{"default":[],"description":"Stable ids of accepted evidence-backed blocking findings.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"blockers":{"description":"Number of blocking findings.","minimum":0,"type":"integer"},"state":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"}},"required":["state","blockers"],"type":"object"},"run_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"schema_version":{"const":2,"description":"Schema version of the artifact; bumped on breaking ABI changes.","type":"number"},"task_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["schema_version","run_id","task_id","mode","outcome","deliverable","participants","gates","review","apply","generated_at"],"type":"object"},{"type":"null"}],"default":null,"description":"Validated canonical terminal RunFacts receipt; null while active, unavailable, or for legacy runs."},"runId":{"description":"Daemon run id once the accepted job started a run (recovery handle for inspect/follow/apply/decision); null while the job is still queued or after it failed before a run started.","type":["string","null"]},"status":{"description":"Run lifecycle state (queued | running | succeeded | failed | cancelled | interrupted); null when an accepted job's state could not be read.","type":["string","null"]},"storeId":{"description":"Identity of the durable engine store that accepted this group member, stable across restarts.","minLength":1,"type":"string"},"summary":{"description":"Human-readable outcome summary (same text as the tool's text content).","type":"string"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"}},"required":["summary","runId","runDir","status","applyEligibility"],"type":"object"}},{"annotations":{"readOnlyHint":true},"description":"Enqueue a read-only Claudexor implementation plan. Returns a durable run handle; use claudexor_run_status/result for the final plan.","inputSchema":{"additionalProperties":false,"properties":{"access":{"description":"Optional access profile for this run.","enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"attachments":{"description":"Immutable resource references from upload finalize. Paths, base64 and internal resolved attachments are rejected; ordinary lane admission still applies.","items":{"additionalProperties":false,"description":"Reference to an immutable daemon-owned uploaded resource.","properties":{"resourceId":{"description":"Immutable daemon resource id returned by upload finalize.","minLength":1,"type":"string"}},"required":["resourceId"],"type":"object"},"type":"array"},"council":{"description":"Draft n plans (2 to the configured cap), then merge one plan and question set.","type":"boolean"},"credentialProfileId":{"description":"Strict credential profile for this run; never falls back to another account.","minLength":1,"pattern":"\\S","type":"string"},"effort":{"description":"Optional effort override for the primary harness. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"execution":{"additionalProperties":false,"properties":{"auxiliaryWritableRoots":{"description":"Exact existing absolute directories, created by the caller, that an Agent run with effective workspace_write may also write (service caches or scratch outside the execution tree). [] grants nothing extra; so does omission, except that a continueFrom successor omitting execution inherits its predecessor's whole execution group. Requires a lane whose capability_profile.access_control.auxiliary_writable_roots is true; the files are never part of the project result.","items":{"minLength":1,"type":"string"},"type":"array"},"delegated":{"type":"boolean"},"isolation":{"enum":["envelope","live"],"type":"string"},"scopePaths":{"description":"Selected relative files/directories; '.' selects the whole folder. No implicit whole-folder claim.","items":{"minLength":1,"type":"string"},"type":"array"},"workspaceKind":{"description":"directory needs no Git initialization.","enum":["git","directory"],"type":"string"},"workspaceRoot":{"description":"Actual existing delegated execution directory; stable project identity remains repoPath.","type":"string"}},"type":"object"},"externalContextPolicy":{"description":"Alias of web for control-api parity.","enum":["off","auto","cached","live"],"type":"string"},"harness":{"description":"Optional harness id to force for this one-shot run.","minLength":1,"type":"string"},"idempotencyKey":{"description":"Caller-owned key for this exact launch; requires an explicit repoPath. After an unknown response, repeat the same key and arguments to recover the accepted job or run (a queued job returns its jobId); a different request with the same key conflicts. Recovery assumes the same registered project root still exists: a missing or moved root is refused (project_root_missing) and nothing is replayed or started. Omit for an intentional new launch.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"maxSeconds":{"description":"Initial run time limit in seconds. Explicit limits default to hard unless timeLimitMode is soft.","maximum":604800,"minimum":1,"type":"integer"},"model":{"description":"Optional model override for the primary harness.","minLength":1,"type":"string"},"n":{"description":"Optional best-of-N width for candidate races (or deep-scan scout width).","minimum":1,"type":"integer"},"paidBudget":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"unlimited","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"finite","type":"string"},"maxUsd":{"minimum":0,"type":"number"}},"required":["kind","maxUsd"],"type":"object"}],"description":"Incremental-cash budget: explicitly unlimited or a finite non-negative USD cap."},"primaryHarness":{"description":"Optional primary harness id for this run.","minLength":1,"type":"string"},"processingPreference":{"description":"Advisory service preference; omission inherits captured settings and explicit Standard requests ordinary service.","enum":["standard","fast","economy"],"type":"string"},"prompt":{"description":"The user task or question to run through Claudexor.","minLength":1,"pattern":"\\S","type":"string"},"repoPath":{"description":"Absolute path of the target project. Defaults to the MCP server cwd; required with idempotencyKey.","type":"string"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"},"timeLimitMode":{"description":"With maxSeconds: soft warns and continues; hard cancels on expiry.","enum":["soft","hard"],"type":"string"},"web":{"description":"External context policy for this run.","enum":["off","auto","cached","live"],"type":"string"}},"required":["prompt"],"type":"object"},"name":"claudexor_plan","outputSchema":{"additionalProperties":false,"description":"Structured MCP tool result for Claudexor run tools.","properties":{"applyEligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"description":"Apply-gate verdict for mutating runs; null for read-only routes or when no patch exists."},"attemptExecution":{"items":{"additionalProperties":false,"description":"Compact projection of existing attempt execution and amount evidence.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"harnessId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"processing":{"additionalProperties":false,"description":"Requested intent, submitted native control, and observed execution are independent facts. A submitted flag never proves observed service; mixed or missing session observations remain explicit.","properties":{"observed":{"enum":["standard","fast","economy","mixed","unknown"],"type":"string"},"observedNative":{"items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"reason":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"requested":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"submitted":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"submittedNative":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."}},"required":["requested","submitted","submittedNative","observed","observedNative","reason","source"],"type":"object"},"processingCostBasis":{"additionalProperties":false,"description":"Mode-qualified billing evidence for an existing cost record. Authentication alone does not establish included premium service; credits, cash, and token valuation stay distinct.","properties":{"debit":{"const":"unobserved","description":"The route reports no actual cash or purchased-credit debit. Included service still admits the work, but its cash stays unknown instead of zero and is outside the finite cap; absence keeps proven ordinary inclusion as zero cash.","type":"string"},"kind":{"enum":["included","paid_credits","cash","valuation","unknown"],"type":"string"},"nativeMode":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"}},"required":["nativeMode","kind","source"],"type":"object"},"usageCost":{"additionalProperties":false,"description":"Observed usage components. An amount of unknown meaning is not charged cash; separately proven included service can still establish exact zero incremental cash unless its route reports no actual debit.","properties":{"cashKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"cashUsd":{"minimum":0,"type":"number"},"unknownUsd":{"minimum":0,"type":"number"},"valuationKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"minimum":0,"type":"number"}},"required":["cashUsd","valuationUsd","unknownUsd","cashKnowledge","valuationKnowledge"],"type":"object"}},"required":["attemptId","harnessId"],"type":"object"},"type":"array"},"council":{"anyOf":[{"additionalProperties":false,"description":"Council membership + merge disclosure for a --council plan run.","properties":{"degraded":{"default":false,"description":"True when fewer contract-accepted drafts than requested, including any retained unverified contribution; failures remain disclosed per member.","type":"boolean"},"drafted":{"description":"Members with contract-accepted drafts; excludes retained unverified inputs and is not a work-completion or verification count.","minimum":0,"type":"integer"},"members":{"default":[],"description":"Per-member role and outcome.","items":{"additionalProperties":false,"description":"One council member's role and draft/merge outcome.","properties":{"error":{"default":null,"description":"First redacted draft error; null unless the member failed.","type":["string","null"]},"harnessId":{"description":"Harness that drafted (or merged) this member's plan.","minLength":1,"type":"string"},"role":{"description":"primary = the merger that synthesizes the unified plan; member = draft only.","enum":["primary","member"],"type":"string"},"status":{"description":"Draft outcome: drafted = contract-accepted input; merged = accepted draft and successful merge; failed stays failed even when its unverified text helped the merger.","enum":["drafted","failed","merged"],"type":"string"}},"required":["harnessId","role","status"],"type":"object"},"type":"array"},"mergedBy":{"default":null,"description":"Harness that produced the unified plan (the primary); null if the merge failed.","type":["string","null"]},"requested":{"description":"Requested member count (n; at least 2, up to the configured Council cap).","exclusiveMinimum":0,"type":"integer"}},"required":["requested","drafted"],"type":"object"},{"type":"null"}],"default":null,"description":"Council membership + merge disclosure (QA-023b); null for solo/non-plan tools or deferred handles."},"deferredMessage":{"anyOf":[{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"},{"type":"null"}],"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved."},"delegatedFromRunId":{"default":null,"type":["string","null"]},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.","properties":{"effective":{"default":false,"type":"boolean"},"reason":{"default":"not_requested","enum":["pending","not_requested","injected_unused","used","runtime_unavailable","manifest_unsupported","access_profile_incompatible","partially_degraded","startup_failed"],"type":"string"},"remediation":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null},"requested":{"default":false,"type":"boolean"},"used":{"default":false,"type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output."},"detailProblem":{"anyOf":[{"additionalProperties":false,"description":"Typed failure of a post-run detail read whose durable run result still survives.","properties":{"code":{"description":"Stable machine code of the detail problem, if any.","type":["string","null"]},"message":{"description":"Human-readable description of the detail problem.","type":"string"},"retryable":{"description":"Whether retrying the detail read may help.","type":["boolean","null"]}},"required":["code","message","retryable"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed post-terminal detail-read problem (the run result survives; its detail projections are absent for this reason); null when the detail read succeeded."},"failure":{"anyOf":[{"additionalProperties":false,"description":"Typed failure record for a run: phase, category, evidence references, and suggested next actions.","properties":{"attemptId":{"default":null,"description":"Attempt involved in the failure, when known.","type":["string","null"]},"captureFailure":{"additionalProperties":false,"properties":{"bufferBudgetBytes":{"minimum":0,"type":"integer"},"causeCode":{"type":"string"},"cleanup":{"additionalProperties":false,"properties":{"code":{"type":["string","null"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"code":{"enum":["capture_output_exceeded","capture_output_incomplete","capture_preview_truncated","capture_failed"],"type":"string"},"drain":{"const":"truncated","type":"string"},"message":{"type":"string"},"stream":{"enum":["stdout","stderr"],"type":"string"}},"required":["code","message"],"type":"object"},"category":{"default":"unknown","description":"Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness.","enum":["validation","project","auth","harness_unavailable","harness_error","config_error","budget","policy","cancelled","internal","unknown"],"type":"string"},"code":{"anyOf":[{"description":"Machine-readable failure sub-code within a RunFailure category, including historical delegated-run failures and active access-profile refusals.","enum":["finite_zero","hard_cap","estimate_headroom","unknown_paid_in_flight","budget_overshoot","cost_unverifiable","delegation_child_drain_timeout","subscription_window_exhausted","credential_pool_exhausted","input_too_large","vendor_cli_too_old","credential_source_unconfirmed","delegated_home_unavailable","delegated_confinement_unavailable","delegated_evidence_incomplete","access_profile_incompatible","auxiliary_writable_roots_unsupported","retired_access_profile"],"type":"string"},{"type":"null"}],"default":null,"description":"Machine-readable failure sub-code within the category; null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage."},"eventRefs":{"default":[],"description":"Event references relevant to the failure.","items":{"type":"string"},"type":"array"},"harnessId":{"default":null,"description":"Harness involved in the failure, when known.","type":["string","null"]},"logRefs":{"default":[],"description":"Log artifact paths relevant to the failure.","items":{"type":"string"},"type":"array"},"nextActions":{"default":[],"description":"Suggested operator next actions.","items":{"type":"string"},"type":"array"},"phase":{"default":"unknown","description":"Pipeline phase where the failure happened.","type":"string"},"poolAttempts":{"default":[],"description":"Every failed execution try in order, each with its own account and error text; empty when no try failed (and for records written before this field existed).","items":{"additionalProperties":false,"description":"Per-try account attribution of a failed execution try (diagnostic evidence only).","properties":{"attemptId":{"description":"Attempt the try belongs to.","minLength":1,"type":"string"},"category":{"description":"Typed failure category of the try; untyped errors are unknown_harness_error.","enum":["timeout","rate_limited","auth_failed","capability_refused","process_crash","config_error","unknown_harness_error"],"type":"string"},"error":{"description":"The try's own error text with its original wording and whitespace, redacted.","type":"string"},"harnessId":{"description":"Harness the try ran on.","minLength":1,"type":"string"},"observedAt":{"description":"When the try's first error was observed.","format":"date-time","type":"string"},"phase":{"description":"How far the try got: before a typed session start, after start but before agent progress, or after progress.","enum":["pre_start","pre_progress","after_progress"],"type":"string"},"profileDisplayName":{"description":"The row's display name at try time (redacted); null for the default route.","type":["string","null"]},"profileId":{"description":"Account row the try ran on; null = the harness default route.","type":["string","null"]},"requestedModel":{"description":"Model the try asked for; null = the harness default model.","type":["string","null"]},"tryIndex":{"description":"Zero-based try index within the attempt.","minimum":0,"type":"integer"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"description":"The vendor's own typed failure for this try, when the adapter attached one."}},"required":["harnessId","profileId","profileDisplayName","requestedModel","attemptId","tryIndex","observedAt","phase","category","error","vendorFailure"],"type":"object"},"type":"array"},"rawDetailRef":{"default":null,"description":"Artifact path holding the raw (redacted) failure detail.","type":["string","null"]},"requestRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"actual":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"kind":{"const":"input_too_large","type":"string"},"limit":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"native_code":{"minLength":1,"type":"string"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"}},"required":["scope","unit","limit","source","kind","actual","native_code"],"type":"object"},{"additionalProperties":false,"properties":{"binary_path":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"installed_version":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"kind":{"const":"vendor_cli_too_old","type":"string"},"native_code":{"const":"claude_code_version_too_old","type":"string"},"source":{"const":"claude_stdout","type":"string"}},"required":["kind","native_code","source","binary_path","installed_version"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"credential_source_unconfirmed","type":"string"},"native_code":{"const":"grok_credential_source_unconfirmed","type":"string"},"reported_source":{"description":"Redacted credential source the vendor's startup frame reported.","maxLength":80,"type":"string"},"source":{"const":"grok_init","type":"string"}},"required":["kind","native_code","source","reported_source"],"type":"object"}],"description":"Vendor-attested request refusal that stops retries and account rotation on its harness; input, executable and credential-source causes carry their own evidence."},"resetsAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the refused window reopens (a spent subscription quota window), or null when the failure has no such time. Callers schedule a retry off this field, never off safeMessage."},"runDir":{"default":null,"description":"Run artifact directory.","type":["string","null"]},"safeMessage":{"description":"Redacted human-readable failure message.","type":"string"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"default":null,"description":"The vendor's own typed failure for the attempt this record speaks for, or null when no vendor-typed evidence exists (every harness without such a channel, and any unreadable record). Facts only: carries no remedy."}},"required":["safeMessage"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed terminal failure detail and recovery actions; null for non-failed runs."},"jobId":{"default":null,"description":"Daemon job id of the accepted launch. While runId is null, pass it as runId to the status, wait and result tools; they report the canonical runId once the run binds.","type":["string","null"]},"outcomeBanner":{"default":null,"description":"Server-owned outcome headline (D18); the single honest one-line verdict, null while non-terminal or unavailable.","type":["string","null"]},"outcomeFacts":{"anyOf":[{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},{"type":"null"}],"default":null,"description":"The D8 terminal outcome axes (checks/review/reason/noChanges); null for non-terminal or read-only routes."},"parentRunId":{"default":null,"type":["string","null"]},"planReadiness":{"anyOf":[{"additionalProperties":false,"description":"Server-derived readiness of a plan run (one derivation owner; D17).","properties":{"questionCount":{"default":0,"minimum":0,"type":"integer"},"state":{"description":"Derived plan readiness: ready (block parsed, zero open questions), needs_answers (open questions remain), unverified (no parseable block — the planner ignored the format).","enum":["ready","needs_answers","unverified"],"type":"string"}},"required":["state"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived plan readiness for plan tools (D17); null for non-plan tools."},"runDir":{"description":"Artifact directory of the run; null when not persisted.","type":["string","null"]},"runFacts":{"anyOf":[{"additionalProperties":false,"description":"Validated immutable terminal facts for one run.","properties":{"apply":{"additionalProperties":false,"description":"Terminal apply eligibility and operator-decision state.","properties":{"eligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Delivery-gate eligibility at terminalization; null when nothing is applyable."},"operator_decision_present":{"default":false,"description":"Whether a valid operator decision was present when the receipt was finalized.","type":"boolean"}},"type":"object"},"deliverable":{"additionalProperties":false,"description":"Canonical primary-output presence and identity for a terminal run.","properties":{"kind":{"anyOf":[{"enum":["answer","report","plan","patch","files","structured_output"],"type":"string"},{"type":"null"}],"description":"Kind of canonical primary deliverable; null when none exists."},"path":{"description":"Run-relative path of the canonical primary deliverable; null when absent.","type":["string","null"]},"present":{"description":"Whether the canonical primary deliverable exists.","type":"boolean"},"producer_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt that produced the deliverable, when known."}},"required":["present","kind","path"],"type":"object"},"gates":{"additionalProperties":false,"description":"Canonical gate configuration and terminal receipt projection.","properties":{"configured":{"description":"Whether the frozen task configured deterministic gates.","type":"boolean"},"executed":{"description":"Whether the terminal attempt executed the gate set.","type":"boolean"},"receipt_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt whose gate receipt decides this projection; null when no gates executed."},"required":{"description":"Number of configured required gates.","minimum":0,"type":"integer"},"state":{"description":"Terminal state of the configured deterministic gate set.","enum":["not_configured","passed","failed","skipped"],"type":"string"},"total":{"description":"Total configured deterministic gates.","minimum":0,"type":"integer"}},"required":["configured","required","total","executed","state"],"type":"object"},"generated_at":{"description":"When this immutable terminal receipt was finalized.","minLength":1,"type":"string"},"mode":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"outcome":{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},"participants":{"additionalProperties":false,"description":"Terminal participant graph plus its planner-lane count.","properties":{"attempts":{"default":[],"description":"Role-labelled participant roster.","items":{"additionalProperties":false,"description":"One role-labelled participant in the terminal run graph.","properties":{"attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Attempt id when the participant owns an orchestrator attempt; null for reviewer-panel members."},"deliverable_present":{"default":false,"description":"Whether this participant produced the deliverable its role requested.","type":"boolean"},"harness_id":{"description":"Harness that served this participant role.","minLength":1,"type":"string"},"role":{"description":"Canonical role of one participant in the terminal run graph.","enum":["planner","merge","candidate","scout","reducer","reviewer"],"type":"string"},"status":{"anyOf":[{"description":"Terminal outcome recorded for one run participant.","enum":["success","success_with_warnings","blocked","failed"],"type":"string"},{"type":"null"}],"default":null,"description":"Participant outcome when recorded; null for artifact-only reviewer membership."}},"required":["attempt_id","harness_id","role"],"type":"object"},"type":"array"},"planners":{"description":"Number of participants whose canonical role is planner.","minimum":0,"type":"integer"}},"required":["planners"],"type":"object"},"presentation":{"additionalProperties":false,"description":"Immutable terminal output state and primary artifact. Absent only on legacy RunFacts receipts.","properties":{"primary":{"anyOf":[{"additionalProperties":false,"description":"Primary user-facing artifact selected once during terminal preparation.","properties":{"kind":{"description":"Presentation kind of the terminal primary artifact.","enum":["answer","report","plan","patch","files","structured_output","diagnostic"],"type":"string"},"path":{"description":"Normalized run-relative path of the terminal primary artifact.","minLength":1,"type":"string"}},"required":["kind","path"],"type":"object"},{"type":"null"}],"description":"Selected terminal primary artifact, or null when the receipt announces readiness without a primary deliverable."},"state":{"description":"Terminal output readiness decided by the last valid output.ready receipt.","enum":["ready","diagnostic"],"type":"string"}},"required":["state","primary"],"type":"object"},"required_actions":{"default":[],"description":"Typed actions required to unblock this terminal outcome.","items":{"additionalProperties":false,"description":"One typed required operator action derived from a run's terminal outcome facts.","properties":{"detail":{"description":"Human-readable guidance for this action (English-only, INV-141).","type":"string"},"id":{"description":"Stable machine id for a required operator action on a blocked terminal run.","enum":["provide_required_input","complete_incomplete_work","resolve_review_block","fix_failed_checks","record_operator_decision"],"type":"string"}},"required":["id","detail"],"type":"object"},"type":"array"},"review":{"additionalProperties":false,"description":"Canonical terminal review verdict and blocking-finding identity.","properties":{"blocker_ids":{"default":[],"description":"Stable ids of accepted evidence-backed blocking findings.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"blockers":{"description":"Number of blocking findings.","minimum":0,"type":"integer"},"state":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"}},"required":["state","blockers"],"type":"object"},"run_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"schema_version":{"const":2,"description":"Schema version of the artifact; bumped on breaking ABI changes.","type":"number"},"task_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["schema_version","run_id","task_id","mode","outcome","deliverable","participants","gates","review","apply","generated_at"],"type":"object"},{"type":"null"}],"default":null,"description":"Validated canonical terminal RunFacts receipt; null while active, unavailable, or for legacy runs."},"runId":{"description":"Daemon run id once the accepted job started a run (recovery handle for inspect/follow/apply/decision); null while the job is still queued or after it failed before a run started.","type":["string","null"]},"status":{"description":"Run lifecycle state (queued | running | succeeded | failed | cancelled | interrupted); null when an accepted job's state could not be read.","type":["string","null"]},"storeId":{"description":"Identity of the durable engine store that accepted this group member, stable across restarts.","minLength":1,"type":"string"},"summary":{"description":"Human-readable outcome summary (same text as the tool's text content).","type":"string"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"}},"required":["summary","runId","runDir","status","applyEligibility"],"type":"object"}},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Enqueue a create-from-scratch Claudexor run. Returns a durable run handle; use claudexor_run_status/result for terminal output.","inputSchema":{"additionalProperties":false,"properties":{"access":{"description":"Optional access profile for this run.","enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"attachments":{"description":"Immutable resource references from upload finalize. Paths, base64 and internal resolved attachments are rejected; ordinary lane admission still applies.","items":{"additionalProperties":false,"description":"Reference to an immutable daemon-owned uploaded resource.","properties":{"resourceId":{"description":"Immutable daemon resource id returned by upload finalize.","minLength":1,"type":"string"}},"required":["resourceId"],"type":"object"},"type":"array"},"credentialProfileId":{"description":"Strict credential profile for this run; never falls back to another account.","minLength":1,"pattern":"\\S","type":"string"},"effort":{"description":"Optional effort override for the primary harness. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"execution":{"additionalProperties":false,"properties":{"auxiliaryWritableRoots":{"description":"Exact existing absolute directories, created by the caller, that an Agent run with effective workspace_write may also write (service caches or scratch outside the execution tree). [] grants nothing extra; so does omission, except that a continueFrom successor omitting execution inherits its predecessor's whole execution group. Requires a lane whose capability_profile.access_control.auxiliary_writable_roots is true; the files are never part of the project result.","items":{"minLength":1,"type":"string"},"type":"array"},"delegated":{"type":"boolean"},"isolation":{"enum":["envelope","live"],"type":"string"},"scopePaths":{"description":"Selected relative files/directories; '.' selects the whole folder. No implicit whole-folder claim.","items":{"minLength":1,"type":"string"},"type":"array"},"workspaceKind":{"description":"directory needs no Git initialization.","enum":["git","directory"],"type":"string"},"workspaceRoot":{"description":"Actual existing delegated execution directory; stable project identity remains repoPath.","type":"string"}},"type":"object"},"externalContextPolicy":{"description":"Alias of web for control-api parity.","enum":["off","auto","cached","live"],"type":"string"},"harness":{"description":"Optional harness id to force for this one-shot run.","minLength":1,"type":"string"},"idempotencyKey":{"description":"Caller-owned key for this exact launch; requires an explicit repoPath. After an unknown response, repeat the same key and arguments to recover the accepted job or run (a queued job returns its jobId); a different request with the same key conflicts. Recovery assumes the same registered project root still exists: a missing or moved root is refused (project_root_missing) and nothing is replayed or started. Omit for an intentional new launch.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"maxSeconds":{"description":"Initial run time limit in seconds. Explicit limits default to hard unless timeLimitMode is soft.","maximum":604800,"minimum":1,"type":"integer"},"model":{"description":"Optional model override for the primary harness.","minLength":1,"type":"string"},"n":{"description":"Optional best-of-N width for candidate races (or deep-scan scout width).","minimum":1,"type":"integer"},"paidBudget":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"unlimited","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"finite","type":"string"},"maxUsd":{"minimum":0,"type":"number"}},"required":["kind","maxUsd"],"type":"object"}],"description":"Incremental-cash budget: explicitly unlimited or a finite non-negative USD cap."},"primaryHarness":{"description":"Optional primary harness id for this run.","minLength":1,"type":"string"},"processingPreference":{"description":"Advisory service preference; omission inherits captured settings and explicit Standard requests ordinary service.","enum":["standard","fast","economy"],"type":"string"},"prompt":{"description":"The user task or question to run through Claudexor.","minLength":1,"pattern":"\\S","type":"string"},"protectedPathApprovals":{"description":"Typed approvals for existing protected path edits.","items":{"additionalProperties":false,"properties":{"path":{"minLength":1,"type":"string"},"reason":{"minLength":1,"type":"string"}},"required":["path"],"type":"object"},"type":"array"},"repoPath":{"description":"Absolute path of the target project. Defaults to the MCP server cwd; required with idempotencyKey.","type":"string"},"review":{"description":"Enable internal model review. Ordinary Agent defaults to false; true selects reviewers automatically. An explicit reviewer panel or reviewer overrides also enable review. Best-of and until-clean retain review.","type":"boolean"},"reviewerEfforts":{"additionalProperties":false,"description":"Enable review with per-provider reviewer effort overrides.","properties":{"anthropic":{"description":"Reviewer effort for the anthropic family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"cursor":{"description":"Reviewer effort for the cursor family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"google":{"description":"Reviewer effort for the google family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"local":{"description":"Reviewer effort for the local family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"openai":{"description":"Reviewer effort for the openai family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"opencode":{"description":"Reviewer effort for the opencode family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"unknown":{"description":"Reviewer effort for the unknown family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"xai":{"description":"Reviewer effort for the xai family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"}},"type":"object"},"reviewerModels":{"additionalProperties":false,"description":"Enable review with per-provider reviewer model overrides.","properties":{"anthropic":{"minLength":1,"type":"string"},"cursor":{"minLength":1,"type":"string"},"google":{"minLength":1,"type":"string"},"local":{"minLength":1,"type":"string"},"openai":{"minLength":1,"type":"string"},"opencode":{"minLength":1,"type":"string"},"unknown":{"minLength":1,"type":"string"},"xai":{"minLength":1,"type":"string"}},"type":"object"},"reviewerPanel":{"description":"Enable review with explicit panel entries, preserving order and duplicates; no additional review flag is needed.","items":{"additionalProperties":false,"properties":{"credentialProfileId":{"description":"Optional strict credential profile id; absent uses the canonical account pool.","minLength":1,"type":"string"},"effort":{"description":"Effort for this reviewer entry. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"harness":{"minLength":1,"type":"string"},"model":{"minLength":1,"type":"string"},"processingPreference":{"description":"Advisory service preference; omission inherits captured settings and explicit Standard requests ordinary service.","enum":["standard","fast","economy"],"type":"string"}},"required":["harness"],"type":"object"},"minItems":1,"type":"array"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"},"tests":{"description":"Typed-argv deterministic gate commands for this run.","items":{"additionalProperties":false,"description":"Canonical deterministic command invocation; no implicit shell parsing.","properties":{"args":{"default":[],"description":"Exact argv passed to the executable.","items":{"type":"string"},"type":"array"},"cwd":{"description":"Optional project-relative working directory for the command.","type":"string"},"envAllowlist":{"default":[],"description":"Non-secret parent environment names explicitly forwarded to the command.","items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"program":{"description":"Executable invoked directly without an implicit shell.","minLength":1,"pattern":"\\S","type":"string"}},"required":["program"],"type":"object"},"type":"array"},"timeLimitMode":{"description":"With maxSeconds: soft warns and continues; hard cancels on expiry.","enum":["soft","hard"],"type":"string"},"web":{"description":"External context policy for this run.","enum":["off","auto","cached","live"],"type":"string"}},"required":["prompt"],"type":"object"},"name":"claudexor_create","outputSchema":{"additionalProperties":false,"description":"Structured MCP tool result for Claudexor run tools.","properties":{"applyEligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"description":"Apply-gate verdict for mutating runs; null for read-only routes or when no patch exists."},"attemptExecution":{"items":{"additionalProperties":false,"description":"Compact projection of existing attempt execution and amount evidence.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"harnessId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"processing":{"additionalProperties":false,"description":"Requested intent, submitted native control, and observed execution are independent facts. A submitted flag never proves observed service; mixed or missing session observations remain explicit.","properties":{"observed":{"enum":["standard","fast","economy","mixed","unknown"],"type":"string"},"observedNative":{"items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"reason":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"requested":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"submitted":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"submittedNative":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."}},"required":["requested","submitted","submittedNative","observed","observedNative","reason","source"],"type":"object"},"processingCostBasis":{"additionalProperties":false,"description":"Mode-qualified billing evidence for an existing cost record. Authentication alone does not establish included premium service; credits, cash, and token valuation stay distinct.","properties":{"debit":{"const":"unobserved","description":"The route reports no actual cash or purchased-credit debit. Included service still admits the work, but its cash stays unknown instead of zero and is outside the finite cap; absence keeps proven ordinary inclusion as zero cash.","type":"string"},"kind":{"enum":["included","paid_credits","cash","valuation","unknown"],"type":"string"},"nativeMode":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"}},"required":["nativeMode","kind","source"],"type":"object"},"usageCost":{"additionalProperties":false,"description":"Observed usage components. An amount of unknown meaning is not charged cash; separately proven included service can still establish exact zero incremental cash unless its route reports no actual debit.","properties":{"cashKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"cashUsd":{"minimum":0,"type":"number"},"unknownUsd":{"minimum":0,"type":"number"},"valuationKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"minimum":0,"type":"number"}},"required":["cashUsd","valuationUsd","unknownUsd","cashKnowledge","valuationKnowledge"],"type":"object"}},"required":["attemptId","harnessId"],"type":"object"},"type":"array"},"council":{"anyOf":[{"additionalProperties":false,"description":"Council membership + merge disclosure for a --council plan run.","properties":{"degraded":{"default":false,"description":"True when fewer contract-accepted drafts than requested, including any retained unverified contribution; failures remain disclosed per member.","type":"boolean"},"drafted":{"description":"Members with contract-accepted drafts; excludes retained unverified inputs and is not a work-completion or verification count.","minimum":0,"type":"integer"},"members":{"default":[],"description":"Per-member role and outcome.","items":{"additionalProperties":false,"description":"One council member's role and draft/merge outcome.","properties":{"error":{"default":null,"description":"First redacted draft error; null unless the member failed.","type":["string","null"]},"harnessId":{"description":"Harness that drafted (or merged) this member's plan.","minLength":1,"type":"string"},"role":{"description":"primary = the merger that synthesizes the unified plan; member = draft only.","enum":["primary","member"],"type":"string"},"status":{"description":"Draft outcome: drafted = contract-accepted input; merged = accepted draft and successful merge; failed stays failed even when its unverified text helped the merger.","enum":["drafted","failed","merged"],"type":"string"}},"required":["harnessId","role","status"],"type":"object"},"type":"array"},"mergedBy":{"default":null,"description":"Harness that produced the unified plan (the primary); null if the merge failed.","type":["string","null"]},"requested":{"description":"Requested member count (n; at least 2, up to the configured Council cap).","exclusiveMinimum":0,"type":"integer"}},"required":["requested","drafted"],"type":"object"},{"type":"null"}],"default":null,"description":"Council membership + merge disclosure (QA-023b); null for solo/non-plan tools or deferred handles."},"deferredMessage":{"anyOf":[{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"},{"type":"null"}],"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved."},"delegatedFromRunId":{"default":null,"type":["string","null"]},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.","properties":{"effective":{"default":false,"type":"boolean"},"reason":{"default":"not_requested","enum":["pending","not_requested","injected_unused","used","runtime_unavailable","manifest_unsupported","access_profile_incompatible","partially_degraded","startup_failed"],"type":"string"},"remediation":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null},"requested":{"default":false,"type":"boolean"},"used":{"default":false,"type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output."},"detailProblem":{"anyOf":[{"additionalProperties":false,"description":"Typed failure of a post-run detail read whose durable run result still survives.","properties":{"code":{"description":"Stable machine code of the detail problem, if any.","type":["string","null"]},"message":{"description":"Human-readable description of the detail problem.","type":"string"},"retryable":{"description":"Whether retrying the detail read may help.","type":["boolean","null"]}},"required":["code","message","retryable"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed post-terminal detail-read problem (the run result survives; its detail projections are absent for this reason); null when the detail read succeeded."},"failure":{"anyOf":[{"additionalProperties":false,"description":"Typed failure record for a run: phase, category, evidence references, and suggested next actions.","properties":{"attemptId":{"default":null,"description":"Attempt involved in the failure, when known.","type":["string","null"]},"captureFailure":{"additionalProperties":false,"properties":{"bufferBudgetBytes":{"minimum":0,"type":"integer"},"causeCode":{"type":"string"},"cleanup":{"additionalProperties":false,"properties":{"code":{"type":["string","null"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"code":{"enum":["capture_output_exceeded","capture_output_incomplete","capture_preview_truncated","capture_failed"],"type":"string"},"drain":{"const":"truncated","type":"string"},"message":{"type":"string"},"stream":{"enum":["stdout","stderr"],"type":"string"}},"required":["code","message"],"type":"object"},"category":{"default":"unknown","description":"Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness.","enum":["validation","project","auth","harness_unavailable","harness_error","config_error","budget","policy","cancelled","internal","unknown"],"type":"string"},"code":{"anyOf":[{"description":"Machine-readable failure sub-code within a RunFailure category, including historical delegated-run failures and active access-profile refusals.","enum":["finite_zero","hard_cap","estimate_headroom","unknown_paid_in_flight","budget_overshoot","cost_unverifiable","delegation_child_drain_timeout","subscription_window_exhausted","credential_pool_exhausted","input_too_large","vendor_cli_too_old","credential_source_unconfirmed","delegated_home_unavailable","delegated_confinement_unavailable","delegated_evidence_incomplete","access_profile_incompatible","auxiliary_writable_roots_unsupported","retired_access_profile"],"type":"string"},{"type":"null"}],"default":null,"description":"Machine-readable failure sub-code within the category; null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage."},"eventRefs":{"default":[],"description":"Event references relevant to the failure.","items":{"type":"string"},"type":"array"},"harnessId":{"default":null,"description":"Harness involved in the failure, when known.","type":["string","null"]},"logRefs":{"default":[],"description":"Log artifact paths relevant to the failure.","items":{"type":"string"},"type":"array"},"nextActions":{"default":[],"description":"Suggested operator next actions.","items":{"type":"string"},"type":"array"},"phase":{"default":"unknown","description":"Pipeline phase where the failure happened.","type":"string"},"poolAttempts":{"default":[],"description":"Every failed execution try in order, each with its own account and error text; empty when no try failed (and for records written before this field existed).","items":{"additionalProperties":false,"description":"Per-try account attribution of a failed execution try (diagnostic evidence only).","properties":{"attemptId":{"description":"Attempt the try belongs to.","minLength":1,"type":"string"},"category":{"description":"Typed failure category of the try; untyped errors are unknown_harness_error.","enum":["timeout","rate_limited","auth_failed","capability_refused","process_crash","config_error","unknown_harness_error"],"type":"string"},"error":{"description":"The try's own error text with its original wording and whitespace, redacted.","type":"string"},"harnessId":{"description":"Harness the try ran on.","minLength":1,"type":"string"},"observedAt":{"description":"When the try's first error was observed.","format":"date-time","type":"string"},"phase":{"description":"How far the try got: before a typed session start, after start but before agent progress, or after progress.","enum":["pre_start","pre_progress","after_progress"],"type":"string"},"profileDisplayName":{"description":"The row's display name at try time (redacted); null for the default route.","type":["string","null"]},"profileId":{"description":"Account row the try ran on; null = the harness default route.","type":["string","null"]},"requestedModel":{"description":"Model the try asked for; null = the harness default model.","type":["string","null"]},"tryIndex":{"description":"Zero-based try index within the attempt.","minimum":0,"type":"integer"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"description":"The vendor's own typed failure for this try, when the adapter attached one."}},"required":["harnessId","profileId","profileDisplayName","requestedModel","attemptId","tryIndex","observedAt","phase","category","error","vendorFailure"],"type":"object"},"type":"array"},"rawDetailRef":{"default":null,"description":"Artifact path holding the raw (redacted) failure detail.","type":["string","null"]},"requestRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"actual":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"kind":{"const":"input_too_large","type":"string"},"limit":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"native_code":{"minLength":1,"type":"string"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"}},"required":["scope","unit","limit","source","kind","actual","native_code"],"type":"object"},{"additionalProperties":false,"properties":{"binary_path":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"installed_version":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"kind":{"const":"vendor_cli_too_old","type":"string"},"native_code":{"const":"claude_code_version_too_old","type":"string"},"source":{"const":"claude_stdout","type":"string"}},"required":["kind","native_code","source","binary_path","installed_version"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"credential_source_unconfirmed","type":"string"},"native_code":{"const":"grok_credential_source_unconfirmed","type":"string"},"reported_source":{"description":"Redacted credential source the vendor's startup frame reported.","maxLength":80,"type":"string"},"source":{"const":"grok_init","type":"string"}},"required":["kind","native_code","source","reported_source"],"type":"object"}],"description":"Vendor-attested request refusal that stops retries and account rotation on its harness; input, executable and credential-source causes carry their own evidence."},"resetsAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the refused window reopens (a spent subscription quota window), or null when the failure has no such time. Callers schedule a retry off this field, never off safeMessage."},"runDir":{"default":null,"description":"Run artifact directory.","type":["string","null"]},"safeMessage":{"description":"Redacted human-readable failure message.","type":"string"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"default":null,"description":"The vendor's own typed failure for the attempt this record speaks for, or null when no vendor-typed evidence exists (every harness without such a channel, and any unreadable record). Facts only: carries no remedy."}},"required":["safeMessage"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed terminal failure detail and recovery actions; null for non-failed runs."},"jobId":{"default":null,"description":"Daemon job id of the accepted launch. While runId is null, pass it as runId to the status, wait and result tools; they report the canonical runId once the run binds.","type":["string","null"]},"outcomeBanner":{"default":null,"description":"Server-owned outcome headline (D18); the single honest one-line verdict, null while non-terminal or unavailable.","type":["string","null"]},"outcomeFacts":{"anyOf":[{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},{"type":"null"}],"default":null,"description":"The D8 terminal outcome axes (checks/review/reason/noChanges); null for non-terminal or read-only routes."},"parentRunId":{"default":null,"type":["string","null"]},"planReadiness":{"anyOf":[{"additionalProperties":false,"description":"Server-derived readiness of a plan run (one derivation owner; D17).","properties":{"questionCount":{"default":0,"minimum":0,"type":"integer"},"state":{"description":"Derived plan readiness: ready (block parsed, zero open questions), needs_answers (open questions remain), unverified (no parseable block — the planner ignored the format).","enum":["ready","needs_answers","unverified"],"type":"string"}},"required":["state"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived plan readiness for plan tools (D17); null for non-plan tools."},"runDir":{"description":"Artifact directory of the run; null when not persisted.","type":["string","null"]},"runFacts":{"anyOf":[{"additionalProperties":false,"description":"Validated immutable terminal facts for one run.","properties":{"apply":{"additionalProperties":false,"description":"Terminal apply eligibility and operator-decision state.","properties":{"eligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Delivery-gate eligibility at terminalization; null when nothing is applyable."},"operator_decision_present":{"default":false,"description":"Whether a valid operator decision was present when the receipt was finalized.","type":"boolean"}},"type":"object"},"deliverable":{"additionalProperties":false,"description":"Canonical primary-output presence and identity for a terminal run.","properties":{"kind":{"anyOf":[{"enum":["answer","report","plan","patch","files","structured_output"],"type":"string"},{"type":"null"}],"description":"Kind of canonical primary deliverable; null when none exists."},"path":{"description":"Run-relative path of the canonical primary deliverable; null when absent.","type":["string","null"]},"present":{"description":"Whether the canonical primary deliverable exists.","type":"boolean"},"producer_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt that produced the deliverable, when known."}},"required":["present","kind","path"],"type":"object"},"gates":{"additionalProperties":false,"description":"Canonical gate configuration and terminal receipt projection.","properties":{"configured":{"description":"Whether the frozen task configured deterministic gates.","type":"boolean"},"executed":{"description":"Whether the terminal attempt executed the gate set.","type":"boolean"},"receipt_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt whose gate receipt decides this projection; null when no gates executed."},"required":{"description":"Number of configured required gates.","minimum":0,"type":"integer"},"state":{"description":"Terminal state of the configured deterministic gate set.","enum":["not_configured","passed","failed","skipped"],"type":"string"},"total":{"description":"Total configured deterministic gates.","minimum":0,"type":"integer"}},"required":["configured","required","total","executed","state"],"type":"object"},"generated_at":{"description":"When this immutable terminal receipt was finalized.","minLength":1,"type":"string"},"mode":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"outcome":{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},"participants":{"additionalProperties":false,"description":"Terminal participant graph plus its planner-lane count.","properties":{"attempts":{"default":[],"description":"Role-labelled participant roster.","items":{"additionalProperties":false,"description":"One role-labelled participant in the terminal run graph.","properties":{"attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Attempt id when the participant owns an orchestrator attempt; null for reviewer-panel members."},"deliverable_present":{"default":false,"description":"Whether this participant produced the deliverable its role requested.","type":"boolean"},"harness_id":{"description":"Harness that served this participant role.","minLength":1,"type":"string"},"role":{"description":"Canonical role of one participant in the terminal run graph.","enum":["planner","merge","candidate","scout","reducer","reviewer"],"type":"string"},"status":{"anyOf":[{"description":"Terminal outcome recorded for one run participant.","enum":["success","success_with_warnings","blocked","failed"],"type":"string"},{"type":"null"}],"default":null,"description":"Participant outcome when recorded; null for artifact-only reviewer membership."}},"required":["attempt_id","harness_id","role"],"type":"object"},"type":"array"},"planners":{"description":"Number of participants whose canonical role is planner.","minimum":0,"type":"integer"}},"required":["planners"],"type":"object"},"presentation":{"additionalProperties":false,"description":"Immutable terminal output state and primary artifact. Absent only on legacy RunFacts receipts.","properties":{"primary":{"anyOf":[{"additionalProperties":false,"description":"Primary user-facing artifact selected once during terminal preparation.","properties":{"kind":{"description":"Presentation kind of the terminal primary artifact.","enum":["answer","report","plan","patch","files","structured_output","diagnostic"],"type":"string"},"path":{"description":"Normalized run-relative path of the terminal primary artifact.","minLength":1,"type":"string"}},"required":["kind","path"],"type":"object"},{"type":"null"}],"description":"Selected terminal primary artifact, or null when the receipt announces readiness without a primary deliverable."},"state":{"description":"Terminal output readiness decided by the last valid output.ready receipt.","enum":["ready","diagnostic"],"type":"string"}},"required":["state","primary"],"type":"object"},"required_actions":{"default":[],"description":"Typed actions required to unblock this terminal outcome.","items":{"additionalProperties":false,"description":"One typed required operator action derived from a run's terminal outcome facts.","properties":{"detail":{"description":"Human-readable guidance for this action (English-only, INV-141).","type":"string"},"id":{"description":"Stable machine id for a required operator action on a blocked terminal run.","enum":["provide_required_input","complete_incomplete_work","resolve_review_block","fix_failed_checks","record_operator_decision"],"type":"string"}},"required":["id","detail"],"type":"object"},"type":"array"},"review":{"additionalProperties":false,"description":"Canonical terminal review verdict and blocking-finding identity.","properties":{"blocker_ids":{"default":[],"description":"Stable ids of accepted evidence-backed blocking findings.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"blockers":{"description":"Number of blocking findings.","minimum":0,"type":"integer"},"state":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"}},"required":["state","blockers"],"type":"object"},"run_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"schema_version":{"const":2,"description":"Schema version of the artifact; bumped on breaking ABI changes.","type":"number"},"task_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["schema_version","run_id","task_id","mode","outcome","deliverable","participants","gates","review","apply","generated_at"],"type":"object"},{"type":"null"}],"default":null,"description":"Validated canonical terminal RunFacts receipt; null while active, unavailable, or for legacy runs."},"runId":{"description":"Daemon run id once the accepted job started a run (recovery handle for inspect/follow/apply/decision); null while the job is still queued or after it failed before a run started.","type":["string","null"]},"status":{"description":"Run lifecycle state (queued | running | succeeded | failed | cancelled | interrupted); null when an accepted job's state could not be read.","type":["string","null"]},"storeId":{"description":"Identity of the durable engine store that accepted this group member, stable across restarts.","minLength":1,"type":"string"},"summary":{"description":"Human-readable outcome summary (same text as the tool's text content).","type":"string"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"}},"required":["summary","runId","runDir","status","applyEligibility"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"readOnlyHint":true},"description":"Read one bounded page of thread turns with answer previews and receipt facts. limit 1..20; choose at most one cursor, beforeTurnId, afterTurnId or aroundTurnId. No selector reads the newest turns. aroundTurnId returns the anchor and earlier turns; follow newerCursor for later turns. Ascending ordinals; cursors bind store, epoch, thread and limit. Replay refreshes current facts. Requires an existing daemon; never starts work.","inputSchema":{"additionalProperties":false,"properties":{"afterTurnId":{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"},"aroundTurnId":{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"},"beforeTurnId":{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"},"cursor":{"maxLength":2048,"minLength":1,"type":"string"},"expectedStoreId":{"minLength":1,"type":"string"},"limit":{"default":20,"maximum":20,"minimum":1,"type":"integer"},"threadId":{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"}},"required":["threadId"],"type":"object"},"name":"claudexor_thread_history","outputSchema":{"additionalProperties":false,"properties":{"epoch":{"maxLength":256,"minLength":1,"type":"string"},"hasNewer":{"type":"boolean"},"hasOlder":{"type":"boolean"},"header":{"additionalProperties":false,"properties":{"headRun":{"anyOf":[{"additionalProperties":false,"properties":{"run":{"additionalProperties":false,"description":"Compact run state embedded on a turn so a chat surface renders the whole conversation from one thread fetch.","properties":{"delegatedChildRunIds":{"default":[],"description":"At most eight server-owned direct Delegate child ids for whole-thread workspace aggregation.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"maxItems":8,"type":"array"},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.","properties":{"effective":{"default":false,"type":"boolean"},"reason":{"default":"not_requested","enum":["pending","not_requested","injected_unused","used","runtime_unavailable","manifest_unsupported","access_profile_incompatible","partially_degraded","startup_failed"],"type":"string"},"remediation":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null},"requested":{"default":false,"type":"boolean"},"used":{"default":false,"type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Durable Delegate outcome receipt; null for ordinary and legacy turns."},"finishedAt":{"default":null,"description":"When the run finished; null while live.","type":["string","null"]},"mode":{"description":"Default mode for new turns.","enum":["ask","plan","agent"],"type":"string"},"n":{"description":"Race width, when the run was a race.","type":"integer"},"outcomeFacts":{"anyOf":[{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},{"type":"null"}],"default":null,"description":"D8 terminal outcome axes (checks/review/reason/noChanges) for the turn; null while non-terminal."},"outputReadyState":{"default":"pending","description":"Whether a terminal run also has a loaded user-facing output artifact: pending (not yet), finalizing (being produced), ready (loaded), diagnostic (only diagnostic output).","enum":["pending","finalizing","ready","diagnostic"],"type":"string"},"result":{"additionalProperties":false,"default":{},"description":"Honest terminal outcome of a run (what the turn actually did), projected from the work product and answer artifacts.","properties":{"adopted":{"default":null,"description":"True when the live in-place tree was mutated this turn (regardless of review); null when unknown.","type":["boolean","null"]},"applyState":{"default":"not_applied","description":"Honest application state: not_applied (delivery pending), applied, applied_review_blocked, reverted, or discarded (remaining copied output deliberately not applied).","enum":["not_applied","applied","applied_review_blocked","reverted","discarded"],"type":"string"},"blockers":{"default":0,"description":"Count of accepted blocking review findings.","minimum":0,"type":"integer"},"diffStat":{"anyOf":[{"additionalProperties":false,"properties":{"additions":{"description":"Lines added.","minimum":0,"type":"integer"},"deletions":{"description":"Lines deleted.","minimum":0,"type":"integer"},"files":{"description":"Files changed.","minimum":0,"type":"integer"}},"required":["files","additions","deletions"],"type":"object"},{"type":"null"}],"default":null,"description":"Diff statistics; null unless a patch exists."},"kind":{"default":"none","description":"What the turn actually produced: a Git patch, directory files, an answer, a plan, a report, or nothing.","enum":["patch","files","answer","plan","report","none"],"type":"string"},"postTurnSha":{"default":null,"description":"Tree SHA right after this turn's mutation; revert refuses if the working tree has diverged from this since.","type":["string","null"]},"preTurnSha":{"default":null,"description":"Tree SHA before this turn mutated the in-place tree (revert restore target).","type":["string","null"]},"revertAnchorId":{"default":null,"description":"GC-independent revert anchor.","type":["string","null"]},"revertable":{"default":false,"description":"Revert metadata is available so a Revert affordance may be offered; not a live-safe guarantee — the server re-checks tree divergence at revert time.","type":"boolean"}},"type":"object"},"spendUsd":{"description":"Settled cash in USD; null when unknown.","type":["number","null"]},"state":{"description":"Control-plane run state = the run LIFECYCLE (D8): queued/running while live, then exactly one of succeeded / failed / cancelled / interrupted. Outcome quality (checks/review/delivery) is orthogonal — see outcomeFacts.","enum":["queued","running","succeeded","failed","cancelled","interrupted"],"type":"string"},"strategy":{"anyOf":[{"enum":["race","attempts","until_clean","deep_scan","create"],"type":"string"},{"type":"null"}],"description":"Engine strategy flag on the mode, when any."},"waitingOnUser":{"default":false,"description":"True while an interactive question is awaiting the user's answer.","type":"boolean"}},"required":["state"],"type":"object"},"runId":{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"}},"required":["runId","run"],"type":"object"},{"type":"null"}]},"headRunStatus":{"enum":["available","unbound","not_retained"],"type":"string"},"latestAdmission":{"anyOf":[{"additionalProperties":false,"description":"Control-plane projection of one thread turn with its embedded run card.","properties":{"enqueueError":{"anyOf":[{"additionalProperties":false,"properties":{"code":{"default":null,"description":"Machine-readable refusal code; remedies key on it, never on the message text.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context for exact retry.","type":"object"},"failedAt":{"description":"When the enqueue failed.","type":"string"},"message":{"description":"Human-readable refusal message.","type":"string"},"requiredActions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"False when no recorded job exists to replay — surfaces offer a new message instead of a doomed retry.","type":"boolean"}},"required":["message","failedAt"],"type":"object"},{"type":"null"}],"default":null,"description":"Why this turn has no run (enqueue/preflight refusal); null once a run binds."},"id":{"description":"Turn id.","minLength":1,"type":"string"},"jobId":{"anyOf":[{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"description":"Thread id."},"runId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Run backing this turn; null while unbound."},"state":{"anyOf":[{"description":"Control-plane run state = the run LIFECYCLE (D8): queued/running while live, then exactly one of succeeded / failed / cancelled / interrupted. Outcome quality (checks/review/delivery) is orthogonal — see outcomeFacts.","enum":["queued","running","succeeded","failed","cancelled","interrupted"],"type":"string"},{"type":"null"}],"description":"Control-plane run state = the run LIFECYCLE (D8): queued/running while live, then exactly one of succeeded / failed / cancelled / interrupted. Outcome quality (checks/review/delivery) is orthogonal — see outcomeFacts."}},"required":["id","jobId","state"],"type":"object"},{"type":"null"}],"description":"Control-plane projection of one thread turn with its embedded run card."},"latestOrdinal":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}],"description":"Latest stored turn ordinal, including runless turns; null only for an empty thread."},"latestTurnId":{"anyOf":[{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"description":"Thread id."},"sessions":{"items":{"additionalProperties":false,"description":"Control-plane projection of a vendor CLI session bound to a thread.","properties":{"harnessId":{"description":"Harness the session is bound to.","minLength":1,"type":"string"},"id":{"description":"Session id.","minLength":1,"type":"string"},"nativeSessionId":{"default":null,"description":"The vendor CLI session id; null when none exists.","type":["string","null"]},"observedModel":{"default":null,"description":"Model last observed on the session's stream.","type":["string","null"]},"profileId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Credential profile the vendor session was created under; resume never crosses profiles (null = engine-default credentials)."},"state":{"default":"live","description":"Session cache state: live, stale, or rebound.","enum":["live","stale","rebound"],"type":"string"},"threadId":{"description":"Thread the session belongs to.","minLength":1,"type":"string"}},"required":["id","threadId","harnessId"],"type":"object"},"maxItems":16,"type":"array"},"sessionsComplete":{"type":"boolean"},"thread":{"additionalProperties":false,"description":"Control-plane projection of a thread (camelCase view of the Thread artifact).","properties":{"access":{"anyOf":[{"description":"Access profile recorded by an immutable historical artifact. external_sandbox_full is retired and cannot be requested by active surfaces.","enum":["readonly","workspace_write","full","inherit_native","external_sandbox_full"],"type":"string"},{"type":"null"}],"default":null,"description":"Sticky write scope for write turns; null = the repo trust default."},"authPreference":{"default":"auto","description":"Preferred auth route: subscription (native/OAuth session), api_key (a stored API key), or auto (engine picks subscription-first with policy fallback). A preference, not a secret.","enum":["subscription","api_key","auto"],"type":"string"},"createdAt":{"description":"When the thread was created.","type":"string"},"credentialProfileId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Sticky credential profile for the thread; per-turn selection wins, null = engine-default credentials."},"eligibleHarnesses":{"default":[],"description":"Sticky eligible harness pool; empty = the engine auto-pools.","items":{"type":"string"},"type":"array"},"folder":{"anyOf":[{"description":"User-visible thread folder name.","maxLength":120,"minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Optional sidebar folder; null means ungrouped."},"headRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Most recent run of the thread; null before the first turn runs."},"id":{"description":"Thread id.","minLength":1,"type":"string"},"mode":{"description":"Default mode for new turns.","enum":["ask","plan","agent"],"type":"string"},"needsHuman":{"default":false,"description":"True when the head turn is blocked on a human decision (needs-me inbox).","type":"boolean"},"primaryHarness":{"default":null,"description":"Sticky primary harness for the thread; null = engine routing.","type":["string","null"]},"purgeAfter":{"default":null,"description":"Restore deadline, then auto-purge.","type":["string","null"]},"repoRoot":{"default":null,"description":"Project root the thread is anchored to; null for a no-project thread.","type":["string","null"]},"state":{"default":"active","description":"Thread lifecycle state: active, closed, trashed for recovery, or terminally purged.","enum":["active","closed","trashed","purged"],"type":"string"},"title":{"default":null,"description":"Thread title; null until set.","type":["string","null"]},"trashedAt":{"default":null,"description":"When the thread entered trash.","type":["string","null"]},"updatedAt":{"description":"When the thread was last updated.","type":"string"},"workspaceMode":{"default":"in_place","description":"Per-thread workspace mode: in_place mutates the live project tree directly (the default); isolated keeps a persistent git worktree per thread that apply merges into the project; delegated runs every turn in one caller-owned workspace bound at creation, which Claudexor never applies to the project or deletes.","enum":["in_place","isolated","delegated"],"type":"string"},"workspaceRoot":{"default":null,"description":"Caller-owned workspace a delegated thread executes in; null for in_place and isolated threads.","type":["string","null"]}},"required":["id","createdAt","updatedAt"],"type":"object"}},"required":["thread","latestTurnId","latestOrdinal","latestAdmission","headRun","headRunStatus","sessions","sessionsComplete"],"type":"object"},"limitedBy":{"anyOf":[{"enum":["turns","bytes"],"type":"string"},{"type":"null"}]},"newerCursor":{"anyOf":[{"maxLength":2048,"minLength":1,"type":"string"},{"type":"null"}]},"olderCursor":{"anyOf":[{"maxLength":2048,"minLength":1,"type":"string"},{"type":"null"}]},"replayCursor":{"anyOf":[{"maxLength":2048,"minLength":1,"type":"string"},{"type":"null"}]},"replayNextCursor":{"anyOf":[{"maxLength":2048,"minLength":1,"type":"string"},{"type":"null"}],"description":"Continue the original replay membership if current facts no longer fit one page; merge every segment before declaring the refresh complete."},"revision":{"additionalProperties":false,"properties":{"epoch":{"description":"Read-owner incarnation; compare sequence only within this epoch.","format":"uuid","type":"string"},"sequence":{"description":"Allocated before synchronous projection. A later snapshot always has a greater sequence.","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["epoch","sequence"],"type":"object"},"storeId":{"minLength":1,"type":"string"},"threadId":{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"},"turns":{"items":{"additionalProperties":false,"description":"Control-plane projection of one thread turn with its embedded run card.","properties":{"answeredByPrompt":{"anyOf":[{"additionalProperties":false,"description":"Control-plane projection of one thread turn with its embedded run card.","properties":{"id":{"description":"Turn id.","minLength":1,"type":"string"},"prompt":{"default":"","description":"The user's message for this turn.","type":"string"},"promptInfo":{"additionalProperties":false,"properties":{"textBytes":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"totalTextBytes":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}],"description":"Complete redacted UTF-8 length, only when known; never an estimated remainder."},"truncated":{"type":"boolean"}},"required":["textBytes","totalTextBytes","truncated"],"type":"object"}},"required":["id","promptInfo"],"type":"object"},{"type":"null"}],"description":"Control-plane projection of one thread turn with its embedded run card."},"answeredByTurnId":{"anyOf":[{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"},{"type":"null"}],"description":"Thread id."},"answersPlanRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Plan run whose open questions this follow-up turn answers."},"continuity":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"description":"How a turn's lane was continued: native_resume (the lane's own vendor session already held the delta), packet (a continuation packet hydrated a lane switch/gap), or fresh (nothing to carry — the thread's first turn on any lane).","enum":["native_resume","packet","fresh"],"type":"string"},"laneSwitchedFrom":{"anyOf":[{"additionalProperties":false,"properties":{"harness":{"description":"Harness of the lane switched away from.","type":"string"},"profileId":{"default":null,"description":"Profile of the lane switched away from (null = engine default).","type":["string","null"]}},"required":["harness"],"type":"object"},{"type":"null"}],"default":null,"description":"The lane this turn switched away from; null for an in-lane continuation."},"packetTurns":{"default":0,"description":"Delta turns carried in the continuation packet (0 for native_resume/fresh).","minimum":0,"type":"integer"},"summarized":{"default":false,"description":"True when the packet collapsed an older prefix (mechanical fallback).","type":"boolean"}},"required":["kind"],"type":"object"},{"type":"null"}],"default":null,"description":"How this turn's lane was continued (native resume / packet / fresh); null until stamped."},"createdAt":{"description":"When the turn was created.","type":"string"},"enqueueError":{"anyOf":[{"additionalProperties":false,"properties":{"code":{"default":null,"description":"Machine-readable refusal code; remedies key on it, never on the message text.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context for exact retry.","type":"object"},"failedAt":{"description":"When the enqueue failed.","type":"string"},"message":{"description":"Human-readable refusal message.","type":"string"},"requiredActions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"False when no recorded job exists to replay — surfaces offer a new message instead of a doomed retry.","type":"boolean"}},"required":["message","failedAt"],"type":"object"},{"type":"null"}],"default":null,"description":"Why this turn has no run (enqueue/preflight refusal); null once a run binds."},"id":{"description":"Turn id.","minLength":1,"type":"string"},"kind":{"default":"followup","description":"Kind of thread turn: the initial message, a followup, or an operator decision turn.","enum":["initial","followup","decision"],"type":"string"},"ordinal":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"parentRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Run this turn follows up on, when any."},"planAnswerComplete":{"type":"boolean"},"planHash":{"default":null,"description":"SHA-256 of the frozen plan bytes this Implement turn materialized (INV-081); null on non-Implement/legacy turns (QA-046).","type":["string","null"]},"planReadinessOverridden":{"default":false,"description":"True when the operator implemented a not-ready plan over open questions (INV-081); recorded for provenance, rendered on the card (QA-046).","type":"boolean"},"planRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Set when this turn implements an approved plan from an earlier run."},"primaryOutput":{"anyOf":[{"additionalProperties":false,"description":"The run's primary user-facing output artifact.","properties":{"bytes":{"description":"Size of the output in bytes.","minimum":0,"type":"integer"},"kind":{"description":"What kind of output this is: answer, report, plan, summary, patch, diagnostic, or structured_output (schema-conformant final/output.json).","enum":["answer","report","plan","summary","patch","files","diagnostic","structured_output"],"type":"string"},"path":{"description":"Artifact path of the output.","type":"string"},"text":{"default":null,"description":"Inline text content, when loaded.","type":["string","null"]},"textBytes":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"totalTextBytes":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}],"description":"Complete redacted UTF-8 length, only when known; never an estimated remainder."},"truncated":{"type":"boolean"}},"required":["kind","path","truncated","textBytes","totalTextBytes"],"type":"object"},{"type":"null"}],"description":"The run's primary user-facing output artifact."},"primaryOutputStatus":{"enum":["available","none","not_retained"],"type":"string"},"prompt":{"default":"","description":"The user's message for this turn.","type":"string"},"promptInfo":{"additionalProperties":false,"properties":{"textBytes":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"totalTextBytes":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}],"description":"Complete redacted UTF-8 length, only when known; never an estimated remainder."},"truncated":{"type":"boolean"}},"required":["textBytes","totalTextBytes","truncated"],"type":"object"},"revision":{"additionalProperties":false,"properties":{"epoch":{"description":"Read-owner incarnation; compare sequence only within this epoch.","format":"uuid","type":"string"},"sequence":{"description":"Allocated before synchronous projection. A later snapshot always has a greater sequence.","maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["epoch","sequence"],"type":"object"},"run":{"anyOf":[{"additionalProperties":false,"description":"Compact run state embedded on a turn so a chat surface renders the whole conversation from one thread fetch.","properties":{"applyEligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived apply-gate verdict (single producer: the delivery gate); null when the run has no patch artifact."},"applyEligibilityCoverage":{"enum":["complete","unavailable"],"type":"string"},"authRoute":{"anyOf":[{"additionalProperties":false,"properties":{"attemptId":{"default":null,"type":["string","null"]},"effective":{"anyOf":[{"description":"Auth mode a route runs under: a native local session, an API key, or unknown.","enum":["local_session","api_key","unknown"],"type":"string"},{"type":"null"}],"default":null,"description":"Auth mode a route runs under: a native local session, an API key, or unknown."},"harnessId":{"default":null,"type":["string","null"]},"modelMismatch":{"anyOf":[{"additionalProperties":false,"properties":{"observed":{"type":"string"},"requested":{"type":"string"}},"required":["requested","observed"],"type":"object"},{"type":"null"}],"default":null,"description":"Requested-vs-observed model mismatch; null when none."},"profileId":{"default":null,"description":"Credential profile the deciding attempt ran under; null = engine-default credentials.","type":["string","null"]},"reason":{"description":"Deterministic reason for the effective auth route: as_requested, native_first (auto, INV-061), no_native_session_fallback (auto downgraded to api_key), requested_route_unavailable (explicit preference contradicted), or undisclosed.","enum":["as_requested","native_first","no_native_session_fallback","requested_route_unavailable","undisclosed"],"type":"string"},"requested":{"default":"auto","description":"Preferred auth route: subscription (native/OAuth session), api_key (a stored API key), or auto (engine picks subscription-first with policy fallback). A preference, not a secret.","enum":["subscription","api_key","auto"],"type":"string"},"source":{"anyOf":[{"description":"Concrete credential source used or probed by a harness.","enum":["native_session","oauth_token_env","api_key_env","api_key_flag","provider_auth_file","none"],"type":"string"},{"type":"null"}],"default":null,"description":"Concrete credential source used or probed by a harness."}},"required":["requested","reason"],"type":"object"},{"type":"null"}],"description":"Auth route receipt (requested/effective/source/reason + disclosing attempt), projected verbatim from telemetry; null when unavailable."},"budget":{"additionalProperties":false,"default":{},"description":"Budget snapshot for a run: cap, spend, and provenance.","properties":{"cashKnowledge":{"description":"Cash certainty from the ledger; explicit unknown keeps spendUsd null independently of valuation.","enum":["exact","estimated","unknown"],"type":"string"},"controllableSpendUsd":{"default":null,"description":"Cash governed by the finite cap: settled amounts on routes Claudexor controls; null when that cash is unknown. spendUsd can still be null when an included subscription reports no actual debit.","type":["number","null"]},"estimated":{"default":false,"description":"True when settled cash is estimated rather than exact; subscription valuation confidence is reported separately.","type":"boolean"},"evidence":{"default":"complete","description":"Integrity of the canonical events this spend fallback read: 'incomplete' when malformed/non-object event lines were skipped, 'unavailable' when the events file was unreadable, else 'complete'. A non-complete value means the projected spend may disagree with disk truth.","enum":["complete","incomplete","unavailable"],"type":"string"},"paidBudget":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"unlimited","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"finite","type":"string"},"maxUsd":{"minimum":0,"type":"number"}},"required":["kind","maxUsd"],"type":"object"}],"default":{"kind":"unlimited"},"description":"Incremental-cash budget: explicitly unlimited or a finite non-negative USD cap."},"remainingUsd":{"default":null,"description":"Remaining finite cap after controllableSpendUsd; null when no cap or unknown.","type":["number","null"]},"source":{"default":"unknown","description":"Where the snapshot came from: the decision record, live events, settings, or unknown.","enum":["decision","events","settings","unknown"],"type":"string"},"spendUsd":{"default":null,"description":"CASH spend so far in USD; null when unknown.","type":["number","null"]},"valuationKnowledge":{"default":"unknown","description":"Confidence of valuationUsd: 'estimated' when token-derived, 'unknown' when no usage was reported (valuationUsd is then null), 'exact' when natively priced.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"default":null,"description":"Subscription valuation in USD (separate from billed cash); null when unknown — never a fabricated $0 (QA-023c).","type":["number","null"]}},"type":"object"},"createdAt":{"description":"When the run was created.","type":"string"},"delegatedChildRunIds":{"default":[],"description":"At most eight server-owned direct Delegate child ids for whole-thread workspace aggregation.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"maxItems":8,"type":"array"},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.","properties":{"effective":{"default":false,"type":"boolean"},"reason":{"default":"not_requested","enum":["pending","not_requested","injected_unused","used","runtime_unavailable","manifest_unsupported","access_profile_incompatible","partially_degraded","startup_failed"],"type":"string"},"remediation":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null},"requested":{"default":false,"type":"boolean"},"used":{"default":false,"type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Durable Delegate outcome receipt; null for ordinary and legacy turns."},"failure":{"anyOf":[{"additionalProperties":false,"description":"Typed failure record for a run: phase, category, evidence references, and suggested next actions.","properties":{"attemptId":{"default":null,"description":"Attempt involved in the failure, when known.","type":["string","null"]},"captureFailure":{"additionalProperties":false,"properties":{"bufferBudgetBytes":{"minimum":0,"type":"integer"},"causeCode":{"type":"string"},"cleanup":{"additionalProperties":false,"properties":{"code":{"type":["string","null"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"code":{"enum":["capture_output_exceeded","capture_output_incomplete","capture_preview_truncated","capture_failed"],"type":"string"},"drain":{"const":"truncated","type":"string"},"message":{"type":"string"},"stream":{"enum":["stdout","stderr"],"type":"string"}},"required":["code","message"],"type":"object"},"category":{"default":"unknown","description":"Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness.","enum":["validation","project","auth","harness_unavailable","harness_error","config_error","budget","policy","cancelled","internal","unknown"],"type":"string"},"code":{"anyOf":[{"description":"Machine-readable failure sub-code within a RunFailure category, including historical delegated-run failures and active access-profile refusals.","enum":["finite_zero","hard_cap","estimate_headroom","unknown_paid_in_flight","budget_overshoot","cost_unverifiable","delegation_child_drain_timeout","subscription_window_exhausted","credential_pool_exhausted","input_too_large","vendor_cli_too_old","credential_source_unconfirmed","delegated_home_unavailable","delegated_confinement_unavailable","delegated_evidence_incomplete","access_profile_incompatible","auxiliary_writable_roots_unsupported","retired_access_profile"],"type":"string"},{"type":"null"}],"default":null,"description":"Machine-readable failure sub-code within the category; null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage."},"eventRefs":{"default":[],"description":"Event references relevant to the failure.","items":{"type":"string"},"type":"array"},"harnessId":{"default":null,"description":"Harness involved in the failure, when known.","type":["string","null"]},"logRefs":{"default":[],"description":"Log artifact paths relevant to the failure.","items":{"type":"string"},"type":"array"},"nextActions":{"default":[],"description":"Suggested operator next actions.","items":{"type":"string"},"type":"array"},"phase":{"default":"unknown","description":"Pipeline phase where the failure happened.","type":"string"},"poolAttempts":{"default":[],"description":"Every failed execution try in order, each with its own account and error text; empty when no try failed (and for records written before this field existed).","items":{"additionalProperties":false,"description":"Per-try account attribution of a failed execution try (diagnostic evidence only).","properties":{"attemptId":{"description":"Attempt the try belongs to.","minLength":1,"type":"string"},"category":{"description":"Typed failure category of the try; untyped errors are unknown_harness_error.","enum":["timeout","rate_limited","auth_failed","capability_refused","process_crash","config_error","unknown_harness_error"],"type":"string"},"error":{"description":"The try's own error text with its original wording and whitespace, redacted.","type":"string"},"harnessId":{"description":"Harness the try ran on.","minLength":1,"type":"string"},"observedAt":{"description":"When the try's first error was observed.","format":"date-time","type":"string"},"phase":{"description":"How far the try got: before a typed session start, after start but before agent progress, or after progress.","enum":["pre_start","pre_progress","after_progress"],"type":"string"},"profileDisplayName":{"description":"The row's display name at try time (redacted); null for the default route.","type":["string","null"]},"profileId":{"description":"Account row the try ran on; null = the harness default route.","type":["string","null"]},"requestedModel":{"description":"Model the try asked for; null = the harness default model.","type":["string","null"]},"tryIndex":{"description":"Zero-based try index within the attempt.","minimum":0,"type":"integer"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"description":"The vendor's own typed failure for this try, when the adapter attached one."}},"required":["harnessId","profileId","profileDisplayName","requestedModel","attemptId","tryIndex","observedAt","phase","category","error","vendorFailure"],"type":"object"},"type":"array"},"rawDetailRef":{"default":null,"description":"Artifact path holding the raw (redacted) failure detail.","type":["string","null"]},"requestRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"actual":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"kind":{"const":"input_too_large","type":"string"},"limit":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"native_code":{"minLength":1,"type":"string"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"}},"required":["scope","unit","limit","source","kind","actual","native_code"],"type":"object"},{"additionalProperties":false,"properties":{"binary_path":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"installed_version":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"kind":{"const":"vendor_cli_too_old","type":"string"},"native_code":{"const":"claude_code_version_too_old","type":"string"},"source":{"const":"claude_stdout","type":"string"}},"required":["kind","native_code","source","binary_path","installed_version"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"credential_source_unconfirmed","type":"string"},"native_code":{"const":"grok_credential_source_unconfirmed","type":"string"},"reported_source":{"description":"Redacted credential source the vendor's startup frame reported.","maxLength":80,"type":"string"},"source":{"const":"grok_init","type":"string"}},"required":["kind","native_code","source","reported_source"],"type":"object"}],"description":"Vendor-attested request refusal that stops retries and account rotation on its harness; input, executable and credential-source causes carry their own evidence."},"resetsAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the refused window reopens (a spent subscription quota window), or null when the failure has no such time. Callers schedule a retry off this field, never off safeMessage."},"runDir":{"default":null,"description":"Run artifact directory.","type":["string","null"]},"safeMessage":{"description":"Redacted human-readable failure message.","type":"string"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"default":null,"description":"The vendor's own typed failure for the attempt this record speaks for, or null when no vendor-typed evidence exists (every harness without such a channel, and any unreadable record). Facts only: carries no remedy."}},"required":["safeMessage"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed failure info; null unless the run failed."},"failureMessageInfo":{"anyOf":[{"additionalProperties":false,"properties":{"textBytes":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"totalTextBytes":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}],"description":"Complete redacted UTF-8 length, only when known; never an estimated remainder."},"truncated":{"type":"boolean"}},"required":["textBytes","totalTextBytes","truncated"],"type":"object"},{"type":"null"}]},"fileCount":{"additionalProperties":false,"description":"File-kind tool calls, not distinct paths or the WorkProduct diffstat.","properties":{"coverage":{"enum":["complete","partial","unavailable"],"type":"string"},"value":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}]}},"required":["value","coverage"],"type":"object"},"finishedAt":{"default":null,"description":"When the run finished; null while live.","type":["string","null"]},"harnesses":{"description":"Harness pool the run used.","items":{"type":"string"},"type":"array"},"mode":{"description":"Default mode for new turns.","enum":["ask","plan","agent"],"type":"string"},"n":{"description":"Race width, when the run was a race.","type":"integer"},"operatorDecision":{"anyOf":[{"additionalProperties":false,"properties":{"action":{"description":"Operator decision action (e.g. accept_risk, override).","type":"string"},"decidedAt":{"default":null,"description":"When the decision was made.","type":["string","null"]}},"required":["action"],"type":"object"},{"type":"null"}],"default":null,"description":"Persisted operator unblock decision (accept_risk/override), hash-bound; null when none was made."},"operatorDecisionCoverage":{"enum":["complete","unavailable"],"type":"string"},"outcomeBanner":{"default":null,"description":"Server-owned outcome headline (status-projection.outcomeBanner); null while the run is not terminal.","type":["string","null"]},"outcomeFacts":{"anyOf":[{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},{"type":"null"}],"default":null,"description":"D8 terminal outcome axes (checks/review/reason/noChanges) for the turn; null while non-terminal."},"outputReadyState":{"default":"pending","description":"Whether a terminal run also has a loaded user-facing output artifact: pending (not yet), finalizing (being produced), ready (loaded), diagnostic (only diagnostic output).","enum":["pending","finalizing","ready","diagnostic"],"type":"string"},"planQuestions":{"default":[],"description":"Open questions of a plan run (projected from final/questions.json); empty otherwise.","items":{"additionalProperties":false,"description":"One open question surfaced by a plan revision.","properties":{"allow_text":{"default":false,"description":"True when free text is accepted as a complete answer, including as an alternative to single/multi options.","type":"boolean"},"id":{"description":"Stable question id within the plan revision.","minLength":1,"type":"string"},"kind":{"description":"Question kind: pick exactly one, pick one or more, or free text.","enum":["single","multi","text"],"type":"string"},"options":{"default":[],"description":"Options for single/multi questions; empty for free text.","items":{"additionalProperties":false,"description":"One selectable option of a plan question.","properties":{"id":{"description":"Stable option id within the question.","minLength":1,"type":"string"},"label":{"description":"Option label shown to the user.","minLength":1,"type":"string"}},"required":["id","label"],"type":"object"},"type":"array"},"prompt":{"description":"The question text.","minLength":1,"type":"string"}},"required":["id","kind","prompt"],"type":"object"},"type":"array"},"planReadiness":{"anyOf":[{"additionalProperties":false,"description":"Server-derived readiness of a plan run (one derivation owner; D17).","properties":{"questionCount":{"default":0,"minimum":0,"type":"integer"},"state":{"description":"Derived plan readiness: ready (block parsed, zero open questions), needs_answers (open questions remain), unverified (no parseable block — the planner ignored the format).","enum":["ready","needs_answers","unverified"],"type":"string"}},"required":["state"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived readiness of a plan run; null for non-plan runs."},"primaryHarness":{"description":"Primary harness the run preferred.","type":"string"},"requiredActions":{"default":[],"description":"Stable-id required operator actions for a succeeded-but-blocked run (GH #29); empty for clean/decided/failed runs.","items":{"additionalProperties":false,"description":"One typed required operator action derived from a run's terminal outcome facts.","properties":{"detail":{"description":"Human-readable guidance for this action (English-only, INV-141).","type":"string"},"id":{"description":"Stable machine id for a required operator action on a blocked terminal run.","enum":["provide_required_input","complete_incomplete_work","resolve_review_block","fix_failed_checks","record_operator_decision"],"type":"string"}},"required":["id","detail"],"type":"object"},"type":"array"},"result":{"additionalProperties":false,"default":{},"description":"Honest terminal outcome of a run (what the turn actually did), projected from the work product and answer artifacts.","properties":{"adopted":{"default":null,"description":"True when the live in-place tree was mutated this turn (regardless of review); null when unknown.","type":["boolean","null"]},"applyState":{"default":"not_applied","description":"Honest application state: not_applied (delivery pending), applied, applied_review_blocked, reverted, or discarded (remaining copied output deliberately not applied).","enum":["not_applied","applied","applied_review_blocked","reverted","discarded"],"type":"string"},"blockers":{"default":0,"description":"Count of accepted blocking review findings.","minimum":0,"type":"integer"},"diffStat":{"anyOf":[{"additionalProperties":false,"properties":{"additions":{"description":"Lines added.","minimum":0,"type":"integer"},"deletions":{"description":"Lines deleted.","minimum":0,"type":"integer"},"files":{"description":"Files changed.","minimum":0,"type":"integer"}},"required":["files","additions","deletions"],"type":"object"},{"type":"null"}],"default":null,"description":"Diff statistics; null unless a patch exists."},"kind":{"default":"none","description":"What the turn actually produced: a Git patch, directory files, an answer, a plan, a report, or nothing.","enum":["patch","files","answer","plan","report","none"],"type":"string"},"postTurnSha":{"default":null,"description":"Tree SHA right after this turn's mutation; revert refuses if the working tree has diverged from this since.","type":["string","null"]},"preTurnSha":{"default":null,"description":"Tree SHA before this turn mutated the in-place tree (revert restore target).","type":["string","null"]},"revertAnchorId":{"default":null,"description":"GC-independent revert anchor.","type":["string","null"]},"revertable":{"default":false,"description":"Revert metadata is available so a Revert affordance may be offered; not a live-safe guarantee — the server re-checks tree divergence at revert time.","type":"boolean"}},"type":"object"},"route":{"anyOf":[{"additionalProperties":false,"description":"Run-level route evidence projected from telemetry (requested vs observed model).","properties":{"harnessId":{"default":null,"description":"Harness that ran the final attempt.","type":["string","null"]},"observedModel":{"default":null,"description":"Model the harness stream actually reported.","type":["string","null"]},"requestedModel":{"default":null,"description":"Model requested for the run.","type":["string","null"]},"verified":{"default":false,"description":"True only when an observed model was actually reported by the harness stream — never inferred from the request.","type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Route evidence from telemetry; null when no telemetry exists (legacy runs)."},"runDir":{"description":"On-disk run artifact directory.","type":"string"},"runFacts":{"anyOf":[{"additionalProperties":false,"description":"Validated immutable terminal facts for one run.","properties":{"apply":{"additionalProperties":false,"description":"Terminal apply eligibility and operator-decision state.","properties":{"eligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Delivery-gate eligibility at terminalization; null when nothing is applyable."},"operator_decision_present":{"default":false,"description":"Whether a valid operator decision was present when the receipt was finalized.","type":"boolean"}},"type":"object"},"deliverable":{"additionalProperties":false,"description":"Canonical primary-output presence and identity for a terminal run.","properties":{"kind":{"anyOf":[{"enum":["answer","report","plan","patch","files","structured_output"],"type":"string"},{"type":"null"}],"description":"Kind of canonical primary deliverable; null when none exists."},"path":{"description":"Run-relative path of the canonical primary deliverable; null when absent.","type":["string","null"]},"present":{"description":"Whether the canonical primary deliverable exists.","type":"boolean"},"producer_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt that produced the deliverable, when known."}},"required":["present","kind","path"],"type":"object"},"gates":{"additionalProperties":false,"description":"Canonical gate configuration and terminal receipt projection.","properties":{"configured":{"description":"Whether the frozen task configured deterministic gates.","type":"boolean"},"executed":{"description":"Whether the terminal attempt executed the gate set.","type":"boolean"},"receipt_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt whose gate receipt decides this projection; null when no gates executed."},"required":{"description":"Number of configured required gates.","minimum":0,"type":"integer"},"state":{"description":"Terminal state of the configured deterministic gate set.","enum":["not_configured","passed","failed","skipped"],"type":"string"},"total":{"description":"Total configured deterministic gates.","minimum":0,"type":"integer"}},"required":["configured","required","total","executed","state"],"type":"object"},"generated_at":{"description":"When this immutable terminal receipt was finalized.","minLength":1,"type":"string"},"mode":{"description":"Default mode for new turns.","enum":["ask","plan","agent"],"type":"string"},"outcome":{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},"participants":{"additionalProperties":false,"description":"Terminal participant graph plus its planner-lane count.","properties":{"attempts":{"default":[],"description":"Role-labelled participant roster.","items":{"additionalProperties":false,"description":"One role-labelled participant in the terminal run graph.","properties":{"attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Attempt id when the participant owns an orchestrator attempt; null for reviewer-panel members."},"deliverable_present":{"default":false,"description":"Whether this participant produced the deliverable its role requested.","type":"boolean"},"harness_id":{"description":"Harness that served this participant role.","minLength":1,"type":"string"},"role":{"description":"Canonical role of one participant in the terminal run graph.","enum":["planner","merge","candidate","scout","reducer","reviewer"],"type":"string"},"status":{"anyOf":[{"description":"Terminal outcome recorded for one run participant.","enum":["success","success_with_warnings","blocked","failed"],"type":"string"},{"type":"null"}],"default":null,"description":"Participant outcome when recorded; null for artifact-only reviewer membership."}},"required":["attempt_id","harness_id","role"],"type":"object"},"type":"array"},"planners":{"description":"Number of participants whose canonical role is planner.","minimum":0,"type":"integer"}},"required":["planners"],"type":"object"},"presentation":{"additionalProperties":false,"description":"Immutable terminal output state and primary artifact. Absent only on legacy RunFacts receipts.","properties":{"primary":{"anyOf":[{"additionalProperties":false,"description":"Primary user-facing artifact selected once during terminal preparation.","properties":{"kind":{"description":"Presentation kind of the terminal primary artifact.","enum":["answer","report","plan","patch","files","structured_output","diagnostic"],"type":"string"},"path":{"description":"Normalized run-relative path of the terminal primary artifact.","minLength":1,"type":"string"}},"required":["kind","path"],"type":"object"},{"type":"null"}],"description":"Selected terminal primary artifact, or null when the receipt announces readiness without a primary deliverable."},"state":{"description":"Terminal output readiness decided by the last valid output.ready receipt.","enum":["ready","diagnostic"],"type":"string"}},"required":["state","primary"],"type":"object"},"required_actions":{"default":[],"description":"Typed actions required to unblock this terminal outcome.","items":{"additionalProperties":false,"description":"One typed required operator action derived from a run's terminal outcome facts.","properties":{"detail":{"description":"Human-readable guidance for this action (English-only, INV-141).","type":"string"},"id":{"description":"Stable machine id for a required operator action on a blocked terminal run.","enum":["provide_required_input","complete_incomplete_work","resolve_review_block","fix_failed_checks","record_operator_decision"],"type":"string"}},"required":["id","detail"],"type":"object"},"type":"array"},"review":{"additionalProperties":false,"description":"Canonical terminal review verdict and blocking-finding identity.","properties":{"blocker_ids":{"default":[],"description":"Stable ids of accepted evidence-backed blocking findings.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"blockers":{"description":"Number of blocking findings.","minimum":0,"type":"integer"},"state":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"}},"required":["state","blockers"],"type":"object"},"run_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"schema_version":{"const":2,"description":"Schema version of the artifact; bumped on breaking ABI changes.","type":"number"},"task_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["schema_version","run_id","task_id","mode","outcome","deliverable","participants","gates","review","apply","generated_at"],"type":"object"},{"type":"null"}],"default":null,"description":"Validated terminal RunFacts receipt; null while active or unavailable."},"spendEstimated":{"description":"True when settled cash is estimated rather than exact.","type":"boolean"},"spendUsd":{"description":"Settled cash in USD; null when unknown.","type":["number","null"]},"startedAt":{"description":"When the run started.","type":"string"},"state":{"description":"Control-plane run state = the run LIFECYCLE (D8): queued/running while live, then exactly one of succeeded / failed / cancelled / interrupted. Outcome quality (checks/review/delivery) is orthogonal — see outcomeFacts.","enum":["queued","running","succeeded","failed","cancelled","interrupted"],"type":"string"},"strategy":{"anyOf":[{"enum":["race","attempts","until_clean","deep_scan","create"],"type":"string"},{"type":"null"}],"description":"Engine strategy flag on the mode, when any."},"toolCount":{"additionalProperties":false,"properties":{"coverage":{"enum":["complete","partial","unavailable"],"type":"string"},"value":{"anyOf":[{"maximum":9007199254740991,"minimum":0,"type":"integer"},{"type":"null"}]}},"required":["value","coverage"],"type":"object"},"unverifiedOperatorDecision":{"anyOf":[{"additionalProperties":false,"properties":{"action":{"description":"Operator decision action (e.g. accept_risk, override).","type":"string"},"decidedAt":{"default":null,"description":"When the decision was made.","type":["string","null"]}},"required":["action"],"type":"object"},{"type":"null"}],"default":null,"description":"Persisted operator unblock decision (accept_risk/override), hash-bound; null when none was made."},"waitingOnUser":{"default":false,"description":"True while an interactive question is awaiting the user's answer.","type":"boolean"}},"required":["state","applyEligibilityCoverage","operatorDecisionCoverage","failureMessageInfo","toolCount","fileCount"],"type":"object"},{"type":"null"}],"description":"Compact run state embedded on a turn so a chat surface renders the whole conversation from one thread fetch."},"runId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Run backing this turn; null while unbound."},"runStatus":{"enum":["available","unbound","not_retained"],"type":"string"},"threadId":{"description":"Thread the turn belongs to.","minLength":1,"type":"string"}},"required":["id","threadId","createdAt","ordinal","revision","promptInfo","run","runStatus","primaryOutput","primaryOutputStatus","answeredByTurnId","answeredByPrompt","planAnswerComplete"],"type":"object"},"maxItems":20,"type":"array"}},"required":["storeId","threadId","epoch","revision","header","turns","hasOlder","hasNewer","olderCursor","newerCursor","replayCursor","replayNextCursor","limitedBy"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"readOnlyHint":true},"description":"Read a bounded UTF-8 part of any turn's complete stored prompt, including refused turns. Continue at nextOffset; totalBytes and sha256 identify the full prompt. Requires an existing daemon.","inputSchema":{"additionalProperties":false,"properties":{"expectedStoreId":{"minLength":1,"type":"string"},"maxBytes":{"default":32768,"maximum":65536,"minimum":4,"type":"integer"},"offset":{"default":0,"maximum":9007199254740991,"minimum":0,"type":"integer"},"threadId":{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"},"turnId":{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"}},"required":["threadId","turnId"],"type":"object"},"name":"claudexor_thread_prompt","outputSchema":{"additionalProperties":false,"description":"One bounded part of a single validated run event, read from the run's own event log by run id and seq. Concatenate parts in offset order until nextOffset equals totalBytes; only then is the event consumed.","properties":{"nextOffset":{"description":"Where the next part starts; equal to totalBytes when this part ends the event.","maximum":9007199254740991,"minimum":0,"type":"integer"},"offset":{"description":"UTF-8 byte offset where this part starts.","maximum":9007199254740991,"minimum":0,"type":"integer"},"sha256":{"description":"SHA-256 of all totalBytes; verify the reassembled text before parsing it.","pattern":"^[0-9a-f]{64}$","type":"string"},"text":{"description":"Bytes [offset, nextOffset) decoded as UTF-8; a boundary never splits a character.","type":"string"},"threadId":{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"},"totalBytes":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"turnId":{"description":"Thread id.","maxLength":256,"minLength":1,"type":"string"}},"required":["totalBytes","sha256","offset","nextOffset","text","threadId","turnId"],"type":"object"}},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Create a persistent Claudexor thread bound to a project and optional strict account profile. Creation starts no model. Write turns default to editing the project directory directly (in_place); choose workspace=isolated to use a persistent thread worktree created on the first write turn, then thread Apply to merge changes into the project. workspace=delegated with workspaceRoot binds every turn to that caller-owned directory under delegated authority (persistent, never applied to the project). Use claudexor_thread_turn to start work in it.","inputSchema":{"additionalProperties":false,"properties":{"access":{"enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"credentialProfileId":{"minLength":1,"pattern":"\\S","type":"string"},"defaultMode":{"enum":["ask","plan","agent"],"type":"string"},"eligibleHarnesses":{"items":{"minLength":1,"pattern":"\\S","type":"string"},"minItems":1,"type":"array"},"idempotencyKey":{"description":"Caller-owned key for this exact creation. Reuse after an unknown response; a different request with the same key conflicts.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"primaryHarness":{"minLength":1,"pattern":"\\S","type":"string"},"repoPath":{"description":"Absolute path of the target project.","type":"string"},"title":{"minLength":1,"pattern":"\\S","type":"string"},"workspace":{"description":"Per-thread workspace mode: in_place mutates the live project tree directly (the default); isolated keeps a persistent git worktree per thread that apply merges into the project; delegated runs every turn in one caller-owned workspace bound at creation, which Claudexor never applies to the project or deletes.","enum":["in_place","isolated","delegated"],"type":"string"},"workspaceRoot":{"description":"Required exactly with workspace=delegated: absolute existing caller-owned directory every turn executes in. Every later turn inherits delegated authority (no repository full-access trust record, no outer OS boundary), so choose it only for a workspace you own.","minLength":1,"type":"string"}},"required":["repoPath"],"type":"object"},"name":"claudexor_thread_create"},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Enqueue a turn on a persistent Claudexor thread with optional routing and strict account overrides. Supply idempotencyKey to recover a lost response without creating another paid turn. Returns durable thread and turn handles plus runId or a queued jobId.","inputSchema":{"additionalProperties":false,"properties":{"access":{"enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"attachments":{"description":"Immutable resource references from upload finalize. Paths, base64 and internal resolved attachments are rejected; ordinary lane admission still applies.","items":{"additionalProperties":false,"description":"Reference to an immutable daemon-owned uploaded resource.","properties":{"resourceId":{"description":"Immutable daemon resource id returned by upload finalize.","minLength":1,"type":"string"}},"required":["resourceId"],"type":"object"},"type":"array"},"credentialProfileId":{"minLength":1,"pattern":"\\S","type":"string"},"effort":{"description":"Optional effort override for this turn. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"execution":{"additionalProperties":false,"description":"This turn's own auxiliary writable directories; the thread's project and execution tree stay fixed, and omitting the list grants nothing.","properties":{"auxiliaryWritableRoots":{"description":"Exact existing absolute directories, created by the caller, that an Agent run with effective workspace_write may also write (service caches or scratch outside the execution tree). [] grants nothing extra; so does omission, except that a continueFrom successor omitting execution inherits its predecessor's whole execution group. Requires a lane whose capability_profile.access_control.auxiliary_writable_roots is true; the files are never part of the project result.","items":{"minLength":1,"type":"string"},"type":"array"}},"type":"object"},"harness":{"minLength":1,"pattern":"\\S","type":"string"},"idempotencyKey":{"description":"Caller-owned key for one logical turn. Retry an unknown outcome with the same key and body; use a new key for an intentional next turn.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"maxSeconds":{"maximum":604800,"minimum":1,"type":"integer"},"model":{"minLength":1,"pattern":"\\S","type":"string"},"primaryHarness":{"minLength":1,"pattern":"\\S","type":"string"},"prompt":{"description":"The next user turn for the persistent thread.","minLength":1,"pattern":"\\S","type":"string"},"runMode":{"enum":["ask","plan","agent"],"type":"string"},"threadId":{"minLength":1,"pattern":"\\S","type":"string"},"timeLimitMode":{"enum":["soft","hard"],"type":"string"},"web":{"enum":["off","auto","cached","live"],"type":"string"}},"required":["threadId","prompt"],"type":"object"},"name":"claudexor_thread_turn","outputSchema":{"anyOf":[{"additionalProperties":false,"description":"Response for a successfully enqueued run.","properties":{"jobId":{"description":"Daemon job id backing the run.","type":"string"},"runDir":{"description":"On-disk run artifact directory.","type":"string"},"runId":{"description":"Run id.","type":"string"},"summary":{"description":"Human-readable turn handle summary (same as the tool's text content).","type":"string"},"taskId":{"description":"Task id, when already allocated.","type":"string"},"threadId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"turnId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["runId","runDir","threadId","turnId","summary"],"type":"object"},{"additionalProperties":false,"properties":{"jobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"state":{"minLength":1,"type":"string"},"summary":{"description":"Human-readable turn handle summary (same as the tool's text content).","type":"string"},"threadId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"turnId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["jobId","threadId","turnId","state","summary"],"type":"object"}],"description":"Structured MCP result for claudexor_thread_turn: the durable thread-turn handle.","type":"object"}},{"annotations":{"readOnlyHint":true},"description":"Read a thread's daemon-owned turns and native session handles, including earlier turns after a lost response; use the run status/result tools for terminal output.","inputSchema":{"additionalProperties":false,"properties":{"threadId":{"minLength":1,"pattern":"\\S","type":"string"}},"required":["threadId"],"type":"object"},"name":"claudexor_thread_read"},{"annotations":{"destructiveHint":false,"readOnlyHint":true},"description":"Read the running daemon's durable store identity (storeId) through the opt-in handshake. Save storeId durably with each import key BEFORE claudexor_upload_import, and replay that saved value unchanged; never replace it with a later answer. Resource ids and import keys belong to that store only.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"claudexor_store_identity","outputSchema":{"additionalProperties":false,"description":"Successful control-plane negotiation.","properties":{"compatible":{"const":true,"type":"boolean"},"engine":{"additionalProperties":false,"description":"Build identity of the serving engine.","properties":{"entry":{"description":"Resolved entry path of the serving process.","minLength":1,"type":"string"},"sha":{"description":"Git commit SHA of the build; 'unknown' outside a stamped package or git checkout.","minLength":1,"type":"string"},"version":{"description":"Lockstep workspace version.","minLength":1,"type":"string"}},"required":["version","sha","entry"],"type":"object"},"operationsPath":{"const":"/v2/operations","type":"string"},"protocolMajor":{"const":3,"type":"number"},"servingMode":{"description":"Product admission: 'recovery_only' keeps normal product routes closed while recovery control stays reachable; absent means 'normal'.","enum":["normal","recovery_only"],"type":"string"},"storeId":{"description":"Immutable UUID of the durable engine store, stable across restarts; a run 404 is meaningful only with the same storeId. Returned only to a request sending `X-Claudexor-Store-Identity: 1` (older strict clients keep the legacy shape); absent when the store is unavailable or the daemon predates this field.","minLength":1,"type":"string"}},"required":["protocolMajor","compatible","operationsPath","engine"],"type":"object"}},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Import one explicit absolute regular file ON THE MCP-SERVER HOST as a ready immutable attachment in one call. First save expectedStoreId (from claudexor_store_identity) and idempotencyKey with the exact arguments; another store is refused before the file is touched. After any uncertainty or failure repeat the identical call: a completed import returns its original resource without reading the file again, even if the file has since changed or been deleted. Different arguments under a used key are refused; a new edition of the file needs a new key. Pass resource.resourceId in run/turn attachments. No remote-client path, URL, glob or directory; bytes only, no parsing or OCR.","inputSchema":{"additionalProperties":false,"properties":{"expectedStoreId":{"description":"Store UUID from the opt-in handshake, saved with the key BEFORE the first import and replayed unchanged; never replaced by the current store. A different store is refused before any effect.","minLength":1,"type":"string"},"idempotencyKey":{"description":"Caller-owned key for this one import. Save it with the exact arguments before calling and repeat both after any uncertainty; a completed import returns its original resource without reading the file again. A new edition of the file needs a new key.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"kind":{"description":"Default: image when the effective MIME type starts with image/, otherwise file.","enum":["image","file"],"type":"string"},"mime":{"description":"Default from the file extension (unknown extensions are application/octet-stream).","minLength":1,"type":"string"},"name":{"description":"Display name. Default: the file's base name.","type":"string"},"path":{"description":"Explicit absolute regular file on the MCP-server host, never the remote client's filesystem.","minLength":1,"pattern":"\\S","type":"string"}},"required":["expectedStoreId","path","idempotencyKey"],"type":"object"},"name":"claudexor_upload_import","outputSchema":{"additionalProperties":false,"description":"Current state of one keyed import, identical for its first call and every replay.","properties":{"content":{"additionalProperties":false,"description":"Exact bytes a keyed import owns, bound by its first accepted declaration.","properties":{"sha256":{"description":"Exact digest of the bytes: \"sha256:\" and 64 lowercase hex digits.","pattern":"^sha256:[a-f0-9]{64}$","type":"string"},"sizeBytes":{"description":"Exact byte length.","minimum":0,"type":"integer"}},"required":["sizeBytes","sha256"],"type":"object"},"receivedBytes":{"minimum":0,"type":"integer"},"resource":{"additionalProperties":false,"description":"The immutable resource, present exactly when state is ready.","properties":{"createdAt":{"description":"ISO-8601 timestamp string.","minLength":1,"type":"string"},"deduplicated":{"type":"boolean"},"kind":{"description":"Kind of attached resource: image input or generic file bytes.","enum":["image","file"],"type":"string"},"mime":{"minLength":1,"type":"string"},"name":{"type":"string"},"purpose":{"const":"model","description":"Immutable model-operation purpose; absent means a legacy or ordinary attachment.","type":"string"},"resourceId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"sha256":{"description":"Content hash in algo:hex form, e.g. \"sha256:abcd...\".","minLength":1,"type":"string"},"sizeBytes":{"minimum":0,"type":"integer"}},"required":["resourceId","kind","mime","name","sha256","sizeBytes","createdAt","deduplicated"],"type":"object"},"state":{"description":"open: send the bound bytes; uploading: a transfer is in flight; ready: resource is published; cancelled: finished without a resource, a new attempt needs a new key.","enum":["open","uploading","ready","cancelled"],"type":"string"},"storeId":{"description":"Durable store that owns this import key and its resource.","minLength":1,"type":"string"},"uploadId":{"description":"Upload that receives this import's bytes.","minLength":1,"type":"string"}},"required":["storeId","state","uploadId","content","receivedBytes"],"type":"object"}},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Low-level stage (claudexor_upload_import is the one-call keyed path). Create an ordinary attachment upload. Save the caller-owned idempotencyKey and exact request before calling; replay both after a lost response. Save uploadId before importing bytes.","inputSchema":{"additionalProperties":false,"properties":{"idempotencyKey":{"description":"Caller-owned key for this exact stage. Save key and body before calling; replay both after an unknown response.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"request":{"additionalProperties":false,"properties":{"kind":{"description":"Kind of attached resource: image input or generic file bytes.","enum":["image","file"],"type":"string"},"mime":{"minLength":1,"type":"string"},"name":{"default":"","type":"string"},"sizeBytes":{"minimum":0,"type":"integer"}},"required":["kind","mime","sizeBytes"],"type":"object"}},"required":["request","idempotencyKey"],"type":"object"},"name":"claudexor_upload_create","outputSchema":{"additionalProperties":false,"properties":{"expectedBytes":{"minimum":0,"type":"integer"},"receivedBytes":{"minimum":0,"type":"integer"},"state":{"enum":["open","uploading","uploaded","cancelled"],"type":"string"},"uploadId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["uploadId","state","receivedBytes","expectedBytes"],"type":"object"}},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Stream one explicit absolute regular file ON THE MCP-SERVER HOST into an existing upload using one PUT. No remote-client path, URL, glob or directory. Save uploadId and returned expectedSha256. After an uncertain PUT read status: uploaded -> finalize, uploading -> observe, cancelled -> explicitly create a new upload. Already uploaded bytes are never overwritten; this call can hash the same local file to recover its digest.","inputSchema":{"additionalProperties":false,"properties":{"path":{"description":"Explicit absolute regular file on the MCP-server host, never the remote client's filesystem.","minLength":1,"pattern":"\\S","type":"string"},"uploadId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["uploadId","path"],"type":"object"},"name":"claudexor_upload_import_local","outputSchema":{"additionalProperties":false,"properties":{"expectedBytes":{"minimum":0,"type":"integer"},"expectedSha256":{"description":"Digest of the verified local bytes. Save it for finalize; absent while uploading or cancelled.","minLength":1,"type":"string"},"receivedBytes":{"minimum":0,"type":"integer"},"state":{"enum":["open","uploading","uploaded","cancelled"],"type":"string"},"uploadId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["uploadId","state","receivedBytes","expectedBytes"],"type":"object"}},{"annotations":{"destructiveHint":false,"readOnlyHint":true},"description":"Read existing upload state once. A finalized upload can return 404: replay finalize with the original key/body to recover its resource; absence is not proof of failure.","inputSchema":{"additionalProperties":false,"properties":{"uploadId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["uploadId"],"type":"object"},"name":"claudexor_upload_status","outputSchema":{"additionalProperties":false,"properties":{"expectedBytes":{"minimum":0,"type":"integer"},"receivedBytes":{"minimum":0,"type":"integer"},"state":{"enum":["open","uploading","uploaded","cancelled"],"type":"string"},"uploadId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["uploadId","state","receivedBytes","expectedBytes"],"type":"object"}},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Finalize immutable attachment bytes. Save and replay the original caller-owned key and exact request after an unknown response, even if status returns 404. Never auto-cancel uncertain finalization. Attach the returned resourceId to run/turn attachments.","inputSchema":{"additionalProperties":false,"properties":{"idempotencyKey":{"description":"Caller-owned key for this exact stage. Save key and body before calling; replay both after an unknown response.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"request":{"additionalProperties":false,"properties":{"expectedSha256":{"description":"Content hash in algo:hex form, e.g. \"sha256:abcd...\".","minLength":1,"type":"string"}},"type":"object"},"uploadId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["uploadId","request","idempotencyKey"],"type":"object"},"name":"claudexor_upload_finalize","outputSchema":{"additionalProperties":false,"properties":{"createdAt":{"description":"ISO-8601 timestamp string.","minLength":1,"type":"string"},"deduplicated":{"type":"boolean"},"kind":{"description":"Kind of attached resource: image input or generic file bytes.","enum":["image","file"],"type":"string"},"mime":{"minLength":1,"type":"string"},"name":{"type":"string"},"purpose":{"const":"model","description":"Immutable model-operation purpose; absent means a legacy or ordinary attachment.","type":"string"},"resourceId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"sha256":{"description":"Content hash in algo:hex form, e.g. \"sha256:abcd...\".","minLength":1,"type":"string"},"sizeBytes":{"minimum":0,"type":"integer"}},"required":["resourceId","kind","mime","name","sha256","sizeBytes","createdAt","deduplicated"],"type":"object"}},{"annotations":{"destructiveHint":true,"readOnlyHint":false},"description":"Explicitly cancel an unfinished upload. Do not use cancellation to recover an unknown finalize outcome.","inputSchema":{"additionalProperties":false,"properties":{"uploadId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["uploadId"],"type":"object"},"name":"claudexor_upload_cancel","outputSchema":{"additionalProperties":false,"properties":{"expectedBytes":{"minimum":0,"type":"integer"},"receivedBytes":{"minimum":0,"type":"integer"},"state":{"enum":["open","uploading","uploaded","cancelled"],"type":"string"},"uploadId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["uploadId","state","receivedBytes","expectedBytes"],"type":"object"}},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Read, set, extend, or disable one live run's time limit. Mutations require the current expectedRevision from a read; a conflicting revision must be read again before retrying.","inputSchema":{"additionalProperties":false,"properties":{"action":{"enum":["read","set","extend","disable"],"type":"string"},"expectedRevision":{"minimum":0,"type":"integer"},"mode":{"description":"For set only; omission keeps the timer's current mode.","enum":["soft","hard"],"type":"string"},"runId":{"minLength":1,"type":"string"},"seconds":{"maximum":604800,"minimum":1,"type":"integer"}},"required":["runId","action"],"type":"object"},"name":"claudexor_run_time_limit"},{"annotations":{"destructiveHint":false,"idempotentHint":true,"readOnlyHint":false},"description":"Send a live message to an existing run's active attempt. Requires an explicit stable caller idempotencyKey (the message id); reuse the same key and body to read its recorded receipt. accepted proves native acceptance only (a later live_input_delivered harness event with the same message_id, seen through claudexor_run_wait, reports consumption), delivered proves observed consumption, neither proves obedience. delivery_unknown may have landed: never resend it under a new key. Refusals remain typed outcomes: a pending question answers not_active/interaction_pending (the message does not answer it; use claudexor_answer_interaction), a still-queued job not_active/no_live_session. not_active sent nothing, so a later attempt needs a new key. No automatic retry, queue, or relaunch; host cancellation stops only this request.","inputSchema":{"additionalProperties":false,"description":"Live message into a running run. Send with an Idempotency-Key (the message id): a replay under the same key returns the recorded receipt without a second delivery.","properties":{"expectedAttemptId":{"description":"Target attempt id. Required when the run has several live attempts (race n>1): without it the daemon answers rejected/multi_attempt. A mismatch with the live attempt answers not_active/attempt_mismatch.","minLength":1,"type":"string"},"idempotencyKey":{"description":"The submission's identity: the Idempotency-Key verbatim. Replaying it returns this receipt again; a new message needs a new key.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"runId":{"description":"Run the message was addressed to.","minLength":1,"type":"string"},"text":{"description":"The message to place into the run's active attempt. 1..65536 UTF-16 code units (the JS string length, not bytes or visible characters); an over-long body is a 400, never truncated. Secret-like values are refused (inline_secret_rejected) like every prompt ingress.","maxLength":65536,"minLength":1,"type":"string"}},"required":["runId","text","idempotencyKey"],"type":"object"},"name":"claudexor_run_message","outputSchema":{"additionalProperties":false,"description":"Receipt of a live message into a running run; every typed outcome answers HTTP 200 (unlike the answer/control routes), so read `outcome`, not the status code.","properties":{"accepted":{"description":"True only for outcome delivered or accepted; false for every other outcome.","type":"boolean"},"attemptId":{"description":"Live attempt the message targeted, when one was selected.","type":"string"},"harnessId":{"description":"Harness of the targeted attempt.","type":"string"},"liveInput":{"description":"The targeted harness's declared live-input channel (its capability profile), when an attempt was selected.","enum":["mid_turn","next_tool_boundary","none"],"type":"string"},"message":{"description":"Human-readable detail.","type":"string"},"messageId":{"description":"The submission's identity: the Idempotency-Key verbatim. Replaying it returns this receipt again; a new message needs a new key.","maxLength":256,"minLength":1,"type":"string"},"nativeTurnId":{"description":"Native turn id the harness reported on acceptance (Codex turn/steer result).","type":"string"},"outcome":{"description":"delivered = native consumption observed; accepted = native acceptance boundary observed (consumption unproved); rejected = explicit refusal of this submission; not_active = no eligible target before dispatch; unsupported = no live-input channel for this harness/transport/run scope; delivery_unknown = the message may have landed (never a safe-to-resend signal).","enum":["delivered","accepted","rejected","not_active","unsupported","delivery_unknown"],"type":"string"},"reason":{"description":"Why the outcome is not delivered: no_active_turn (the harness has no active native turn), run_terminal, attempt_mismatch (expectedAttemptId is not the live attempt), no_live_session (no registered live attempt, no adapter channel, or no native session yet), multi_attempt (several live attempts and no expectedAttemptId), thread_bound (thread turns are not steerable in v1), interaction_pending (a question is open; the message was not sent), rpc_refused (the vendor refused the steer on a still-active turn), admission_persist_failed (the daemon could not journal admission; nothing was sent), transport_lost, response_timeout.","enum":["no_active_turn","run_terminal","attempt_mismatch","no_live_session","multi_attempt","thread_bound","interaction_pending","rpc_refused","admission_persist_failed","transport_lost","response_timeout"],"type":"string"},"runId":{"description":"Run the message was addressed to.","minLength":1,"type":"string"}},"required":["accepted","outcome","runId","messageId"],"type":"object"}},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Start one successor of a terminal single-candidate Agent or Ask run on the existing daemon. The daemon inherits only mode, scope, execution, harness, model and the prompt-cache lifetime, which this tool cannot change (another lifetime, Default included, needs a new run); every other omitted control takes its ordinary new-run default, not the predecessor's value, so restate access, web, account, budget, time limit and review when the successor must keep them. Budget and time limits apply to this successor alone, never as a remainder of the chain. prompt is optional and may be empty. Supply idempotencyKey to replay an unknown response. Returns the same durable handle as the launch tools (jobId, runId once bound); pass either as runId to claudexor_run_wait/status/result.","inputSchema":{"additionalProperties":false,"properties":{"access":{"description":"Optional access profile for this run.","enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"attachments":{"description":"Immutable resource references from upload finalize. Paths, base64 and internal resolved attachments are rejected; ordinary lane admission still applies.","items":{"additionalProperties":false,"description":"Reference to an immutable daemon-owned uploaded resource.","properties":{"resourceId":{"description":"Immutable daemon resource id returned by upload finalize.","minLength":1,"type":"string"}},"required":["resourceId"],"type":"object"},"type":"array"},"continueCarrier":{"description":"auto: the best carrier the engine can prove (native session, moved session, then the evidence index); packet: a fresh session re-briefed by the evidence index (the caller's choice for a derailed session).","enum":["auto","packet"],"type":"string"},"credentialProfileId":{"description":"Strict credential profile for this run; never falls back to another account.","minLength":1,"pattern":"\\S","type":"string"},"externalContextPolicy":{"description":"Alias of web for control-api parity.","enum":["off","auto","cached","live"],"type":"string"},"idempotencyKey":{"description":"Reuse the same key and arguments after an unknown response.","maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"maxSeconds":{"description":"Initial run time limit in seconds. Explicit limits default to hard unless timeLimitMode is soft.","maximum":604800,"minimum":1,"type":"integer"},"paidBudget":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"unlimited","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"finite","type":"string"},"maxUsd":{"minimum":0,"type":"number"}},"required":["kind","maxUsd"],"type":"object"}],"description":"Incremental-cash budget: explicitly unlimited or a finite non-negative USD cap."},"prompt":{"description":"Optional continuation text; empty is valid.","type":"string"},"review":{"description":"Enable internal model review. Ordinary Agent defaults to false; true selects reviewers automatically. An explicit reviewer panel or reviewer overrides also enable review. Best-of and until-clean retain review.","type":"boolean"},"reviewerEfforts":{"additionalProperties":false,"description":"Enable review with per-provider reviewer effort overrides.","properties":{"anthropic":{"description":"Reviewer effort for the anthropic family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"cursor":{"description":"Reviewer effort for the cursor family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"google":{"description":"Reviewer effort for the google family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"local":{"description":"Reviewer effort for the local family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"openai":{"description":"Reviewer effort for the openai family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"opencode":{"description":"Reviewer effort for the opencode family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"unknown":{"description":"Reviewer effort for the unknown family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"xai":{"description":"Reviewer effort for the xai family. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"}},"type":"object"},"reviewerModels":{"additionalProperties":false,"description":"Enable review with per-provider reviewer model overrides.","properties":{"anthropic":{"minLength":1,"type":"string"},"cursor":{"minLength":1,"type":"string"},"google":{"minLength":1,"type":"string"},"local":{"minLength":1,"type":"string"},"openai":{"minLength":1,"type":"string"},"opencode":{"minLength":1,"type":"string"},"unknown":{"minLength":1,"type":"string"},"xai":{"minLength":1,"type":"string"}},"type":"object"},"reviewerPanel":{"description":"Enable review with explicit panel entries, preserving order and duplicates; no additional review flag is needed.","items":{"additionalProperties":false,"properties":{"credentialProfileId":{"description":"Optional strict credential profile id; absent uses the canonical account pool.","minLength":1,"type":"string"},"effort":{"description":"Effort for this reviewer entry. Expects a reasoning-effort level the resolved harness/model advertises (a lowercase slug; each vendor lists its own levels, weakest to strongest); an advertised level is passed through as-is.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"harness":{"minLength":1,"type":"string"},"model":{"minLength":1,"type":"string"},"processingPreference":{"description":"Advisory service preference; omission inherits captured settings and explicit Standard requests ordinary service.","enum":["standard","fast","economy"],"type":"string"}},"required":["harness"],"type":"object"},"minItems":1,"type":"array"},"runId":{"minLength":1,"pattern":"\\S","type":"string"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"},"timeLimitMode":{"description":"With maxSeconds: soft warns and continues; hard cancels on expiry.","enum":["soft","hard"],"type":"string"},"web":{"description":"External context policy for this run.","enum":["off","auto","cached","live"],"type":"string"}},"required":["runId"],"type":"object"},"name":"claudexor_run_continue","outputSchema":{"additionalProperties":false,"description":"Structured MCP tool result for Claudexor run tools.","properties":{"applyEligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"description":"Apply-gate verdict for mutating runs; null for read-only routes or when no patch exists."},"attemptExecution":{"items":{"additionalProperties":false,"description":"Compact projection of existing attempt execution and amount evidence.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"harnessId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"processing":{"additionalProperties":false,"description":"Requested intent, submitted native control, and observed execution are independent facts. A submitted flag never proves observed service; mixed or missing session observations remain explicit.","properties":{"observed":{"enum":["standard","fast","economy","mixed","unknown"],"type":"string"},"observedNative":{"items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"reason":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"requested":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"submitted":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"submittedNative":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."}},"required":["requested","submitted","submittedNative","observed","observedNative","reason","source"],"type":"object"},"processingCostBasis":{"additionalProperties":false,"description":"Mode-qualified billing evidence for an existing cost record. Authentication alone does not establish included premium service; credits, cash, and token valuation stay distinct.","properties":{"debit":{"const":"unobserved","description":"The route reports no actual cash or purchased-credit debit. Included service still admits the work, but its cash stays unknown instead of zero and is outside the finite cap; absence keeps proven ordinary inclusion as zero cash.","type":"string"},"kind":{"enum":["included","paid_credits","cash","valuation","unknown"],"type":"string"},"nativeMode":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"}},"required":["nativeMode","kind","source"],"type":"object"},"usageCost":{"additionalProperties":false,"description":"Observed usage components. An amount of unknown meaning is not charged cash; separately proven included service can still establish exact zero incremental cash unless its route reports no actual debit.","properties":{"cashKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"cashUsd":{"minimum":0,"type":"number"},"unknownUsd":{"minimum":0,"type":"number"},"valuationKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"minimum":0,"type":"number"}},"required":["cashUsd","valuationUsd","unknownUsd","cashKnowledge","valuationKnowledge"],"type":"object"}},"required":["attemptId","harnessId"],"type":"object"},"type":"array"},"council":{"anyOf":[{"additionalProperties":false,"description":"Council membership + merge disclosure for a --council plan run.","properties":{"degraded":{"default":false,"description":"True when fewer contract-accepted drafts than requested, including any retained unverified contribution; failures remain disclosed per member.","type":"boolean"},"drafted":{"description":"Members with contract-accepted drafts; excludes retained unverified inputs and is not a work-completion or verification count.","minimum":0,"type":"integer"},"members":{"default":[],"description":"Per-member role and outcome.","items":{"additionalProperties":false,"description":"One council member's role and draft/merge outcome.","properties":{"error":{"default":null,"description":"First redacted draft error; null unless the member failed.","type":["string","null"]},"harnessId":{"description":"Harness that drafted (or merged) this member's plan.","minLength":1,"type":"string"},"role":{"description":"primary = the merger that synthesizes the unified plan; member = draft only.","enum":["primary","member"],"type":"string"},"status":{"description":"Draft outcome: drafted = contract-accepted input; merged = accepted draft and successful merge; failed stays failed even when its unverified text helped the merger.","enum":["drafted","failed","merged"],"type":"string"}},"required":["harnessId","role","status"],"type":"object"},"type":"array"},"mergedBy":{"default":null,"description":"Harness that produced the unified plan (the primary); null if the merge failed.","type":["string","null"]},"requested":{"description":"Requested member count (n; at least 2, up to the configured Council cap).","exclusiveMinimum":0,"type":"integer"}},"required":["requested","drafted"],"type":"object"},{"type":"null"}],"default":null,"description":"Council membership + merge disclosure (QA-023b); null for solo/non-plan tools or deferred handles."},"deferredMessage":{"anyOf":[{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"},{"type":"null"}],"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved."},"delegatedFromRunId":{"default":null,"type":["string","null"]},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.","properties":{"effective":{"default":false,"type":"boolean"},"reason":{"default":"not_requested","enum":["pending","not_requested","injected_unused","used","runtime_unavailable","manifest_unsupported","access_profile_incompatible","partially_degraded","startup_failed"],"type":"string"},"remediation":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null},"requested":{"default":false,"type":"boolean"},"used":{"default":false,"type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output."},"detailProblem":{"anyOf":[{"additionalProperties":false,"description":"Typed failure of a post-run detail read whose durable run result still survives.","properties":{"code":{"description":"Stable machine code of the detail problem, if any.","type":["string","null"]},"message":{"description":"Human-readable description of the detail problem.","type":"string"},"retryable":{"description":"Whether retrying the detail read may help.","type":["boolean","null"]}},"required":["code","message","retryable"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed post-terminal detail-read problem (the run result survives; its detail projections are absent for this reason); null when the detail read succeeded."},"failure":{"anyOf":[{"additionalProperties":false,"description":"Typed failure record for a run: phase, category, evidence references, and suggested next actions.","properties":{"attemptId":{"default":null,"description":"Attempt involved in the failure, when known.","type":["string","null"]},"captureFailure":{"additionalProperties":false,"properties":{"bufferBudgetBytes":{"minimum":0,"type":"integer"},"causeCode":{"type":"string"},"cleanup":{"additionalProperties":false,"properties":{"code":{"type":["string","null"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"code":{"enum":["capture_output_exceeded","capture_output_incomplete","capture_preview_truncated","capture_failed"],"type":"string"},"drain":{"const":"truncated","type":"string"},"message":{"type":"string"},"stream":{"enum":["stdout","stderr"],"type":"string"}},"required":["code","message"],"type":"object"},"category":{"default":"unknown","description":"Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness.","enum":["validation","project","auth","harness_unavailable","harness_error","config_error","budget","policy","cancelled","internal","unknown"],"type":"string"},"code":{"anyOf":[{"description":"Machine-readable failure sub-code within a RunFailure category, including historical delegated-run failures and active access-profile refusals.","enum":["finite_zero","hard_cap","estimate_headroom","unknown_paid_in_flight","budget_overshoot","cost_unverifiable","delegation_child_drain_timeout","subscription_window_exhausted","credential_pool_exhausted","input_too_large","vendor_cli_too_old","credential_source_unconfirmed","delegated_home_unavailable","delegated_confinement_unavailable","delegated_evidence_incomplete","access_profile_incompatible","auxiliary_writable_roots_unsupported","retired_access_profile"],"type":"string"},{"type":"null"}],"default":null,"description":"Machine-readable failure sub-code within the category; null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage."},"eventRefs":{"default":[],"description":"Event references relevant to the failure.","items":{"type":"string"},"type":"array"},"harnessId":{"default":null,"description":"Harness involved in the failure, when known.","type":["string","null"]},"logRefs":{"default":[],"description":"Log artifact paths relevant to the failure.","items":{"type":"string"},"type":"array"},"nextActions":{"default":[],"description":"Suggested operator next actions.","items":{"type":"string"},"type":"array"},"phase":{"default":"unknown","description":"Pipeline phase where the failure happened.","type":"string"},"poolAttempts":{"default":[],"description":"Every failed execution try in order, each with its own account and error text; empty when no try failed (and for records written before this field existed).","items":{"additionalProperties":false,"description":"Per-try account attribution of a failed execution try (diagnostic evidence only).","properties":{"attemptId":{"description":"Attempt the try belongs to.","minLength":1,"type":"string"},"category":{"description":"Typed failure category of the try; untyped errors are unknown_harness_error.","enum":["timeout","rate_limited","auth_failed","capability_refused","process_crash","config_error","unknown_harness_error"],"type":"string"},"error":{"description":"The try's own error text with its original wording and whitespace, redacted.","type":"string"},"harnessId":{"description":"Harness the try ran on.","minLength":1,"type":"string"},"observedAt":{"description":"When the try's first error was observed.","format":"date-time","type":"string"},"phase":{"description":"How far the try got: before a typed session start, after start but before agent progress, or after progress.","enum":["pre_start","pre_progress","after_progress"],"type":"string"},"profileDisplayName":{"description":"The row's display name at try time (redacted); null for the default route.","type":["string","null"]},"profileId":{"description":"Account row the try ran on; null = the harness default route.","type":["string","null"]},"requestedModel":{"description":"Model the try asked for; null = the harness default model.","type":["string","null"]},"tryIndex":{"description":"Zero-based try index within the attempt.","minimum":0,"type":"integer"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"description":"The vendor's own typed failure for this try, when the adapter attached one."}},"required":["harnessId","profileId","profileDisplayName","requestedModel","attemptId","tryIndex","observedAt","phase","category","error","vendorFailure"],"type":"object"},"type":"array"},"rawDetailRef":{"default":null,"description":"Artifact path holding the raw (redacted) failure detail.","type":["string","null"]},"requestRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"actual":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"kind":{"const":"input_too_large","type":"string"},"limit":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"native_code":{"minLength":1,"type":"string"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"}},"required":["scope","unit","limit","source","kind","actual","native_code"],"type":"object"},{"additionalProperties":false,"properties":{"binary_path":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"installed_version":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"kind":{"const":"vendor_cli_too_old","type":"string"},"native_code":{"const":"claude_code_version_too_old","type":"string"},"source":{"const":"claude_stdout","type":"string"}},"required":["kind","native_code","source","binary_path","installed_version"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"credential_source_unconfirmed","type":"string"},"native_code":{"const":"grok_credential_source_unconfirmed","type":"string"},"reported_source":{"description":"Redacted credential source the vendor's startup frame reported.","maxLength":80,"type":"string"},"source":{"const":"grok_init","type":"string"}},"required":["kind","native_code","source","reported_source"],"type":"object"}],"description":"Vendor-attested request refusal that stops retries and account rotation on its harness; input, executable and credential-source causes carry their own evidence."},"resetsAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the refused window reopens (a spent subscription quota window), or null when the failure has no such time. Callers schedule a retry off this field, never off safeMessage."},"runDir":{"default":null,"description":"Run artifact directory.","type":["string","null"]},"safeMessage":{"description":"Redacted human-readable failure message.","type":"string"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"default":null,"description":"The vendor's own typed failure for the attempt this record speaks for, or null when no vendor-typed evidence exists (every harness without such a channel, and any unreadable record). Facts only: carries no remedy."}},"required":["safeMessage"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed terminal failure detail and recovery actions; null for non-failed runs."},"jobId":{"default":null,"description":"Daemon job id of the accepted launch. While runId is null, pass it as runId to the status, wait and result tools; they report the canonical runId once the run binds.","type":["string","null"]},"outcomeBanner":{"default":null,"description":"Server-owned outcome headline (D18); the single honest one-line verdict, null while non-terminal or unavailable.","type":["string","null"]},"outcomeFacts":{"anyOf":[{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},{"type":"null"}],"default":null,"description":"The D8 terminal outcome axes (checks/review/reason/noChanges); null for non-terminal or read-only routes."},"parentRunId":{"default":null,"type":["string","null"]},"planReadiness":{"anyOf":[{"additionalProperties":false,"description":"Server-derived readiness of a plan run (one derivation owner; D17).","properties":{"questionCount":{"default":0,"minimum":0,"type":"integer"},"state":{"description":"Derived plan readiness: ready (block parsed, zero open questions), needs_answers (open questions remain), unverified (no parseable block — the planner ignored the format).","enum":["ready","needs_answers","unverified"],"type":"string"}},"required":["state"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived plan readiness for plan tools (D17); null for non-plan tools."},"runDir":{"description":"Artifact directory of the run; null when not persisted.","type":["string","null"]},"runFacts":{"anyOf":[{"additionalProperties":false,"description":"Validated immutable terminal facts for one run.","properties":{"apply":{"additionalProperties":false,"description":"Terminal apply eligibility and operator-decision state.","properties":{"eligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Delivery-gate eligibility at terminalization; null when nothing is applyable."},"operator_decision_present":{"default":false,"description":"Whether a valid operator decision was present when the receipt was finalized.","type":"boolean"}},"type":"object"},"deliverable":{"additionalProperties":false,"description":"Canonical primary-output presence and identity for a terminal run.","properties":{"kind":{"anyOf":[{"enum":["answer","report","plan","patch","files","structured_output"],"type":"string"},{"type":"null"}],"description":"Kind of canonical primary deliverable; null when none exists."},"path":{"description":"Run-relative path of the canonical primary deliverable; null when absent.","type":["string","null"]},"present":{"description":"Whether the canonical primary deliverable exists.","type":"boolean"},"producer_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt that produced the deliverable, when known."}},"required":["present","kind","path"],"type":"object"},"gates":{"additionalProperties":false,"description":"Canonical gate configuration and terminal receipt projection.","properties":{"configured":{"description":"Whether the frozen task configured deterministic gates.","type":"boolean"},"executed":{"description":"Whether the terminal attempt executed the gate set.","type":"boolean"},"receipt_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt whose gate receipt decides this projection; null when no gates executed."},"required":{"description":"Number of configured required gates.","minimum":0,"type":"integer"},"state":{"description":"Terminal state of the configured deterministic gate set.","enum":["not_configured","passed","failed","skipped"],"type":"string"},"total":{"description":"Total configured deterministic gates.","minimum":0,"type":"integer"}},"required":["configured","required","total","executed","state"],"type":"object"},"generated_at":{"description":"When this immutable terminal receipt was finalized.","minLength":1,"type":"string"},"mode":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"outcome":{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},"participants":{"additionalProperties":false,"description":"Terminal participant graph plus its planner-lane count.","properties":{"attempts":{"default":[],"description":"Role-labelled participant roster.","items":{"additionalProperties":false,"description":"One role-labelled participant in the terminal run graph.","properties":{"attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Attempt id when the participant owns an orchestrator attempt; null for reviewer-panel members."},"deliverable_present":{"default":false,"description":"Whether this participant produced the deliverable its role requested.","type":"boolean"},"harness_id":{"description":"Harness that served this participant role.","minLength":1,"type":"string"},"role":{"description":"Canonical role of one participant in the terminal run graph.","enum":["planner","merge","candidate","scout","reducer","reviewer"],"type":"string"},"status":{"anyOf":[{"description":"Terminal outcome recorded for one run participant.","enum":["success","success_with_warnings","blocked","failed"],"type":"string"},{"type":"null"}],"default":null,"description":"Participant outcome when recorded; null for artifact-only reviewer membership."}},"required":["attempt_id","harness_id","role"],"type":"object"},"type":"array"},"planners":{"description":"Number of participants whose canonical role is planner.","minimum":0,"type":"integer"}},"required":["planners"],"type":"object"},"presentation":{"additionalProperties":false,"description":"Immutable terminal output state and primary artifact. Absent only on legacy RunFacts receipts.","properties":{"primary":{"anyOf":[{"additionalProperties":false,"description":"Primary user-facing artifact selected once during terminal preparation.","properties":{"kind":{"description":"Presentation kind of the terminal primary artifact.","enum":["answer","report","plan","patch","files","structured_output","diagnostic"],"type":"string"},"path":{"description":"Normalized run-relative path of the terminal primary artifact.","minLength":1,"type":"string"}},"required":["kind","path"],"type":"object"},{"type":"null"}],"description":"Selected terminal primary artifact, or null when the receipt announces readiness without a primary deliverable."},"state":{"description":"Terminal output readiness decided by the last valid output.ready receipt.","enum":["ready","diagnostic"],"type":"string"}},"required":["state","primary"],"type":"object"},"required_actions":{"default":[],"description":"Typed actions required to unblock this terminal outcome.","items":{"additionalProperties":false,"description":"One typed required operator action derived from a run's terminal outcome facts.","properties":{"detail":{"description":"Human-readable guidance for this action (English-only, INV-141).","type":"string"},"id":{"description":"Stable machine id for a required operator action on a blocked terminal run.","enum":["provide_required_input","complete_incomplete_work","resolve_review_block","fix_failed_checks","record_operator_decision"],"type":"string"}},"required":["id","detail"],"type":"object"},"type":"array"},"review":{"additionalProperties":false,"description":"Canonical terminal review verdict and blocking-finding identity.","properties":{"blocker_ids":{"default":[],"description":"Stable ids of accepted evidence-backed blocking findings.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"blockers":{"description":"Number of blocking findings.","minimum":0,"type":"integer"},"state":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"}},"required":["state","blockers"],"type":"object"},"run_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"schema_version":{"const":2,"description":"Schema version of the artifact; bumped on breaking ABI changes.","type":"number"},"task_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["schema_version","run_id","task_id","mode","outcome","deliverable","participants","gates","review","apply","generated_at"],"type":"object"},{"type":"null"}],"default":null,"description":"Validated canonical terminal RunFacts receipt; null while active, unavailable, or for legacy runs."},"runId":{"description":"Daemon run id once the accepted job started a run (recovery handle for inspect/follow/apply/decision); null while the job is still queued or after it failed before a run started.","type":["string","null"]},"status":{"description":"Run lifecycle state (queued | running | succeeded | failed | cancelled | interrupted); null when an accepted job's state could not be read.","type":["string","null"]},"storeId":{"description":"Identity of the durable engine store that accepted this group member, stable across restarts.","minLength":1,"type":"string"},"summary":{"description":"Human-readable outcome summary (same text as the tool's text content).","type":"string"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"}},"required":["summary","runId","runDir","status","applyEligibility"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"readOnlyHint":false},"description":"Operator-only editable next message for one daemon-owned single-candidate Agent/Ask predecessor. request.action create captures controls once and reserves its one successor; replace changes only the full prompt/ref list at expectedRevision; clear releases only the draft. Every mutation requires a stable idempotencyKey. Eligible settled success dispatches one ordinary continuation; failures, Stop, restart or admission refusal hold without retry. Held edits never rearm. The successor keeps the predecessor's execution: after a successful isolated (envelope) Agent it starts from the project base and receives only the path of the unapplied saved patch; nothing is applied automatically. No thread or engine Delegate child targets. Ordinary controller-owned one-shot workers are supported.","inputSchema":{"additionalProperties":false,"properties":{"idempotencyKey":{"maxLength":256,"minLength":1,"pattern":"\\S","type":"string"},"request":{"anyOf":[{"additionalProperties":false,"properties":{"action":{"const":"create","type":"string"},"attachments":{"items":{"additionalProperties":false,"description":"Reference to an immutable daemon-owned uploaded resource.","properties":{"resourceId":{"description":"Immutable daemon resource id returned by upload finalize.","minLength":1,"type":"string"}},"required":["resourceId"],"type":"object"},"type":"array"},"controls":{"additionalProperties":false,"description":"Request body for POST /runs: prompt, mode, scope, routing, strategy flags, budget, policies, and thread linkage.","properties":{"access":{"description":"Requested access profile; effective access is derived by the engine and never client-supplied.","enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"continueCarrier":{"description":"Carrier preference for continueFrom; omitted = auto.","enum":["auto","packet"],"type":"string"},"credentialProfileId":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"description":"Explicit per-run credential profile id; null FORCES the engine-default ladder past a thread-sticky profile; unknown/disabled ids refuse, never default."},"effort":{"description":"Per-reviewer effort hint, passed to that harness only.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"efforts":{"additionalProperties":{"description":"Per-reviewer effort hint, passed to that harness only.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"description":"Harness-scoped effort map (harness id to effort); an entry here wins over the scalar effort and the per-harness settings default.","propertyNames":{"minLength":1,"pattern":"\\S"},"type":"object"},"externalContextPolicy":{"description":"Web policy for the run (alias of externalContextPolicy; must match when both set).","enum":["off","auto","cached","live"],"type":"string"},"maxSeconds":{"description":"Wall-clock limit for the whole run (seconds, max seven days). Omission disables the clock. Explicit limits cancel by default; soft mode warns and continues.","exclusiveMinimum":0,"maximum":604800,"type":"integer"},"paidBudget":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"unlimited","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"finite","type":"string"},"maxUsd":{"minimum":0,"type":"number"}},"required":["kind","maxUsd"],"type":"object"}],"description":"Explicit incremental-cash budget for the run."},"review":{"description":"Agent model review: ordinary runs default off; true selects an automatic panel. Explicit reviewer controls, best-of and untilClean request review. Capped attempts default to review unless explicitly false.","type":"boolean"},"reviewerEfforts":{"additionalProperties":{"description":"Per-reviewer effort hint, passed to that harness only.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"description":"Per-provider-family reviewer effort overrides (legacy; reviewerPanel wins when present).","propertyNames":{"enum":["openai","anthropic","google","cursor","opencode","xai","local","unknown"]},"type":"object"},"reviewerModels":{"additionalProperties":{"description":"Per-reviewer model hint, passed to that harness only.","minLength":1,"pattern":"\\S","type":"string"},"description":"Per-provider-family reviewer model overrides (legacy; reviewerPanel wins when present).","propertyNames":{"enum":["openai","anthropic","google","cursor","opencode","xai","local","unknown"]},"type":"object"},"reviewerPanel":{"description":"Explicit Agent reviewer panel — who reviews the change, one entry per reviewer as `harness=model:effort` (CLI `--reviewer-panel`, unpinned) or structured `--reviewer-panel-json` with optional strict credentialProfileId. Duplicate harness entries are kept so one provider can review through several models; overrides the legacy reviewerModels/reviewerEfforts maps.","items":{"additionalProperties":false,"description":"One reviewer of an explicit reviewer panel — a harness plus optional model, effort, and strict credentialProfileId. Compact entries are unpinned; structured JSON carries pins.","properties":{"credentialProfileId":{"description":"Per-reviewer model hint, passed to that harness only.","minLength":1,"pattern":"\\S","type":"string"},"effort":{"description":"Per-reviewer effort hint, passed to that harness only.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"harness":{"description":"Explicit reviewer harness id; repeated harness ids are allowed so one provider can review through multiple requested models.","minLength":1,"pattern":"\\S","type":"string"},"model":{"description":"Per-reviewer model hint, passed to that harness only.","minLength":1,"pattern":"\\S","type":"string"},"processingPreference":{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"}},"required":["harness"],"type":"object"},"minItems":1,"type":"array"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"},"timeLimitMode":{"description":"Initial timer mode: soft warns and continues; hard cancels. Omission is hard with maxSeconds and soft without it.","enum":["soft","hard"],"type":"string"},"web":{"description":"Web policy for the run (alias of externalContextPolicy; must match when both set).","enum":["off","auto","cached","live"],"type":"string"}},"type":"object"},"predecessorId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"prompt":{"type":"string"}},"required":["action","predecessorId","prompt","attachments"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"const":"replace","type":"string"},"attachments":{"items":{"additionalProperties":false,"description":"Reference to an immutable daemon-owned uploaded resource.","properties":{"resourceId":{"description":"Immutable daemon resource id returned by upload finalize.","minLength":1,"type":"string"}},"required":["resourceId"],"type":"object"},"type":"array"},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"expectedRevision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"prompt":{"type":"string"}},"required":["action","draftId","expectedRevision","prompt","attachments"],"type":"object"},{"additionalProperties":false,"properties":{"action":{"const":"clear","type":"string"},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"expectedRevision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["action","draftId","expectedRevision"],"type":"object"}],"description":"One editable reserved next message of a daemon-owned one-shot Agent/Ask. Every mutation requires Idempotency-Key; replace/clear require the exact revision."}},"required":["request","idempotencyKey"],"type":"object"},"name":"claudexor_next_message","outputSchema":{"additionalProperties":false,"properties":{"appliedRevision":{"description":"The exact revision originally applied by this idempotency key.","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"draft":{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"}},"required":["appliedRevision","draft"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"readOnlyHint":true},"description":"Read one exact deferred draft: bounded prompt/ref preview with explicit omissions, predecessor result path, successor handles and `controls`, the values frozen at creation by origin (inherited from the predecessor, resolved at creation, captured Settings preferences) with their capture time. Permissions, trust, accounts and quota are not frozen. This read never dispatches. A terminal predecessor may still have a waiting or held draft; inspect its state.","inputSchema":{"additionalProperties":false,"properties":{"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["draftId"],"type":"object"},"name":"claudexor_next_message_read","outputSchema":{"additionalProperties":false,"description":"Bounded editable-content snapshot. Read the exact predecessorResult path (or claudexor_run_result for its job/run handle) for predecessor output; output is never duplicated here. Terminal predecessor observation does not imply draft resolution.","properties":{"attachments":{"items":{"additionalProperties":false,"description":"Reference to an immutable daemon-owned uploaded resource.","properties":{"resourceId":{"description":"Immutable daemon resource id returned by upload finalize.","minLength":1,"type":"string"}},"required":["resourceId"],"type":"object"},"maxItems":32,"type":"array"},"controls":{"anyOf":[{"additionalProperties":false,"description":"Frozen effective controls. Dispatch reads tool permissions, account and harness enablement, trust, quota, capabilities, paid-fallback policy and other settings afresh; a refusal holds the draft.","properties":{"capturedAt":{"description":"Draft creation; edits never recapture controls.","minLength":1,"type":"string"},"inherited":{"additionalProperties":{},"description":"Continuation-inherited groups from the predecessor's accepted request (mode, scope, execution, harness and model groups, promptCacheTtl); omitted per-harness models were completed from Settings at creation.","type":"object"},"resolved":{"additionalProperties":{},"description":"Create-time controls as captured: explicit draft controls, otherwise ordinary new-run defaults at creation, never the predecessor's value. An omitted access is the project's default access at creation, not the predecessor's.","type":"object"},"settings":{"anyOf":[{"additionalProperties":false,"properties":{"authPreference":{"default":"auto","description":"Preferred auth route: subscription (native/OAuth session), api_key (a stored API key), or auto (engine picks subscription-first with policy fallback). A preference, not a secret.","enum":["subscription","api_key","auto"],"type":"string"},"eligibleHarnesses":{"items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"harnesses":{"additionalProperties":{"additionalProperties":false,"description":"Per-harness settings.","properties":{"auth_preference":{"default":"auto","description":"Preferred auth route: subscription (native/OAuth session), api_key (a stored API key), or auto (engine picks subscription-first with policy fallback). A preference, not a secret.","enum":["subscription","api_key","auto"],"type":"string"},"default_model":{"default":null,"description":"Per-harness default model; null = the harness's own default.","type":["string","null"]},"effort":{"anyOf":[{"description":"Cross-harness reasoning-effort level as a lowercase slug (open vocabulary, mirroring the vendor contract); adapters advertise the levels they accept per model, ordered weakest to strongest by the vendor itself, and a shared normalizer passes advertised levels through, clamps inside the vendor order, places a word the vendor order lacks by the shared preference order (none < minimal < low < medium < high < xhigh < max < ultra) onto an advertised level, and refuses words neither order places.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},{"type":"null"}],"default":null,"description":"Default reasoning effort for the harness; null = harness default."},"fallback_model":{"default":null,"description":"Model to fall back to on typed fallback signals; null = none.","type":["string","null"]},"max_rounds":{"anyOf":[{"exclusiveMinimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Default max convergence rounds; null = engine default."},"max_turns":{"anyOf":[{"exclusiveMinimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Default max agent turns; null = no limit."},"web":{"default":"auto","description":"Default web policy for this harness.","enum":["off","auto","cached","live"],"type":"string"}},"type":"object"},"type":"object"},"primaryHarness":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."}},"required":["harnesses","eligibleHarnesses","primaryHarness","authPreference"],"type":"object"},{"type":"null"}],"description":"Settings execution preferences captured at creation (per-harness defaults, eligible and primary harness, auth preference), used at dispatch instead of current values."}},"required":["capturedAt","inherited","resolved","settings"],"type":"object"},{"type":"null"}],"description":"Null after clear."},"detailPath":{"type":"string"},"draft":{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"},"omittedAttachments":{"minimum":0,"type":"integer"},"omittedPromptBytes":{"minimum":0,"type":"integer"},"promptBytes":{"minimum":0,"type":"integer"},"promptPreview":{"type":"string"}},"required":["draft","promptPreview","promptBytes","omittedPromptBytes","attachments","omittedAttachments","controls","detailPath"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"readOnlyHint":true},"description":"Observe an existing durable run (or a queued job id) through bounded event replay. Defaults: afterSeq=0, waitMs=25000, maxEvents=50, wake=batch. Events already available at the snapshot fence are returned first, even while a question is pending. wake=batch then keeps collecting until the page fills, it includes a question event (also one written before the wait), the run ends, or waitMs elapses; wake=event returns as soon as any event is available. waitMs=0 returns only the already available page. A pending question whose event is not in the page never ends a wait by itself; it is always reported in pendingInteractions. Resume with nextSeq; snapshotSeq is a fence, and terminal is not the end of events, until a page with no events reports eventOmission stream_ended (the stream cannot serve the rest, such as a last line left unterminated by a crash): stop there. Pages are capped at 64 KiB of events, pending bodies at 32 KiB, results at 128 KiB (UTF-8 JSON); an event too large for any page is named in oversizedEvent: read it with claudexor_run_event_read, then resume with afterSeq set to its seq. Daemon discovery and each snapshot read have separate 5s budgets, so a call can take waitMs plus about 15s; size waitMs to your client's tool timeout. Timeout, disconnect and host abort close only this read, never the worker. Use claudexor_run_result for output and claudexor_run_interactions for omitted question bodies.","inputSchema":{"additionalProperties":false,"properties":{"afterSeq":{"default":0,"description":"Last durable event seq already consumed (the previous nextSeq), never snapshotSeq.","maximum":9007199254740991,"minimum":0,"type":"integer"},"maxEvents":{"default":50,"maximum":200,"minimum":1,"type":"integer"},"runId":{"description":"Run id, or the job id of an accepted launch that may still be queued.","maxLength":256,"minLength":1,"type":"string"},"waitMs":{"default":25000,"description":"Bound of the event stage. Zero never waits for new events: it returns the bounded page already available at the snapshot fence, read within a separate 5s budget. Daemon discovery and each snapshot read have their own 5s budgets, so one call can take up to waitMs plus about 15s.","maximum":50000,"minimum":0,"type":"integer"},"wake":{"default":"batch","description":"batch (default): collect events until the page fills, it includes a question event (interaction.requested, also one written before the wait), the run ends, or waitMs elapses. event: return as soon as any event is available. A pending question whose event is not in the page is reported in both modes but never ends a wait by itself.","enum":["batch","event"],"type":"string"}},"required":["runId"],"type":"object"},"name":"claudexor_run_wait","outputSchema":{"additionalProperties":false,"description":"Read-only run observation, at most 131072 UTF-8 JSON bytes: at most two snapshot reads and one stream subscription, no automatic reconnect or worker cancellation. Events already available at the snapshot fence are returned before any wait, whether or not a question is pending. Resume with nextSeq.","properties":{"deferredMessage":{"anyOf":[{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"},{"type":"null"}],"description":"Snapshot only: terminal wakeReason refers to the predecessor, never proves draft resolution."},"eventOmission":{"anyOf":[{"enum":["event_limit","byte_limit","oversized_frame","invalid_event","stream_ended"],"type":"string"},{"type":"null"}],"description":"Why the page stopped early: event_limit or byte_limit (more events may follow; resume with nextSeq), oversized_frame (the next frame exceeds the 131072-byte stream frame cap), invalid_event (the next frame failed validation and is never skipped), stream_ended (the stream, which ends only for a terminal run, served nothing after nextSeq although snapshotSeq is higher, such as a last line left unterminated by a crash; nothing was skipped, and the same call returns the same page until the log changes, so stop there). Null means no limit was reached, not that replay is exhausted."},"events":{"description":"Ordered new events, at most 65536 UTF-8 JSON bytes including envelopes. Legacy events retain their body and use the stream id as seq.","items":{"additionalProperties":false,"properties":{"event":{"additionalProperties":false,"description":"Append-only run event record (one JSONL line in the run's event log).","properties":{"payload":{"additionalProperties":{},"default":{},"description":"Event-type-specific payload.","type":"object"},"run_id":{"description":"Run the event belongs to.","minLength":1,"type":"string"},"seq":{"description":"Monotonic per-run sequence stamped at emit time; the durable SSE cursor and snapshot fence. Optional only for pre-v0.8.0 artifacts.","exclusiveMinimum":0,"type":"integer"},"task_id":{"description":"Task the run belongs to.","minLength":1,"type":"string"},"thread_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"ts":{"description":"Event timestamp.","type":"string"},"type":{"description":"Type of an append-only run event, covering run lifecycle, contract/context creation, budget, routing fallbacks, harness activity, interactions, gates, review, arbitration, work products, and control verbs.","enum":["run.created","task.contract.created","context.pack.created","project.git.initialized","project.claude_bridge.created","budget.lease.created","budget.observation","budget.cash","policy.web.upgraded","harness.started","harness.event","harness.completed","route.fallback.started","route.fallback.completed","route.fallback.exhausted","route.transient.detected","route.transient.retry_scheduled","route.profile.headroom_exceeded","route.profile.rotated","route.profile.rotation_exhausted","route.profile.credential_unusable","route.account.pool_selected","route.account.lane_switch","route.account.pool_exhausted","route.transient.exhausted","route.fallback.auth_switched","route.primary.diverged","route.pool.degraded","session.continuity","interaction.requested","interaction.answered","interaction.timeout","interaction.answer_discarded","interaction.withdrawn","message.accepted","message.delivered","message.refused","plan.progress","plan.questions","plan.brief.materialized","council.started","council.draft","council.member.failed","council.merged","budget.quota_pressure","delegation.belt.unavailable","delegation.belt.degraded","output.ready","gate.started","gate.completed","review.preflight","review.started","review.skipped","reviewer.started","reviewer.first_event","reviewer.auth_switched","reviewer.completed","reviewer.timed_out","reviewer.failed","finding.revalidated","synthesis.started","arbitration.completed","work_product.emitted","work_product.adopted","control.requested","control.applied","control.rejected","run.blocked","run.completed","run.failed","run.continuation","run.continuation.denied","run.continuity","workspace.retained"],"type":"string"}},"required":["ts","run_id","task_id","type"],"type":"object"},"seq":{"maximum":9007199254740991,"minimum":0,"type":"integer"}},"required":["seq","event"],"type":"object"},"maxItems":200,"type":"array"},"nextSeq":{"description":"Last returned event seq, or afterSeq when none was returned. It never advances over an unreturned event.","maximum":9007199254740991,"minimum":0,"type":"integer"},"omittedInteractions":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"oversizedEvent":{"anyOf":[{"additionalProperties":false,"properties":{"seq":{"description":"Durable seq of the next unread event.","maximum":9007199254740991,"minimum":0,"type":"integer"},"type":{"description":"Event type the daemon stream names for it.","type":"string"}},"required":["seq","type"],"type":"object"},{"type":"null"}],"description":"The next unread event after nextSeq cannot fit one page. Read its exact bytes in parts with claudexor_run_event_read, then resume with afterSeq set to its seq. Null otherwise."},"pendingInteractionCount":{"maximum":9007199254740991,"minimum":0,"type":"integer"},"pendingInteractions":{"description":"Current snapshot's pending questions, bounded to 32768 UTF-8 JSON bytes; claudexor_run_interactions returns complete bodies. They never hold back events.","items":{"additionalProperties":false,"description":"A live interactive question awaiting the user's answer (snapshot projection).","properties":{"attemptId":{"default":null,"description":"Attempt the interaction was raised in, when known.","type":["string","null"]},"harnessId":{"default":null,"description":"Harness that raised the interaction.","type":["string","null"]},"interactionId":{"description":"Interaction id used to answer.","minLength":1,"type":"string"},"questions":{"default":[],"description":"Questions awaiting answers.","items":{"additionalProperties":false,"description":"One question of an interactive user-input request.","properties":{"header":{"default":null,"description":"Short chip/header text some harnesses attach to a question.","type":["string","null"]},"id":{"description":"Question id.","minLength":1,"type":"string"},"multi_select":{"default":false,"description":"Whether multiple options may be selected.","type":"boolean"},"options":{"default":[],"description":"Selectable options; empty for free-text-only questions.","items":{"additionalProperties":false,"description":"One multiple-choice option of an interactive question.","properties":{"description":{"default":null,"description":"Optional longer explanation of the option.","type":["string","null"]},"label":{"description":"Option label shown to the user.","type":"string"}},"required":["label"],"type":"object"},"type":"array"},"question":{"description":"The question text.","type":"string"}},"required":["id","question"],"type":"object"},"type":"array"},"requestedAt":{"description":"When the interaction was requested.","type":"string"},"runId":{"description":"Run the interaction belongs to.","minLength":1,"type":"string"},"sourceTool":{"default":null,"description":"Native tool that raised the request.","type":["string","null"]},"timeoutAt":{"default":null,"description":"When the interaction times out into a benign decline; null = no timeout.","type":["string","null"]}},"required":["interactionId","runId","requestedAt"],"type":"object"},"type":"array"},"runId":{"description":"Canonical run id; a queued job id converges to its run id once the run binds.","type":"string"},"snapshotPhase":{"enum":["before_wait","after_wait"],"type":"string"},"snapshotProblem":{"anyOf":[{"enum":["snapshot_unavailable"],"type":"string"},{"type":"null"}],"description":"A failed final read leaves the explicitly labelled initial snapshot, never invented current state."},"snapshotSeq":{"description":"Last event seq at the latest snapshot: a fence, not a cursor. nextSeq below it means events are already written; eventOmission stream_ended reports when the stream cannot serve them.","maximum":9007199254740991,"minimum":0,"type":"integer"},"status":{"description":"Control-plane run state = the run LIFECYCLE (D8): queued/running while live, then exactly one of succeeded / failed / cancelled / interrupted. Outcome quality (checks/review/delivery) is orthogonal — see outcomeFacts.","enum":["queued","running","succeeded","failed","cancelled","interrupted"],"type":"string"},"wakeReason":{"description":"Why this observation returned, by precedence: aborted (this read was cancelled; the worker continues), terminal (the run is terminal; events may still follow nextSeq unless eventOmission is stream_ended), interactions (this page includes a question event), events (event mode, a completed zero-wait page, or a page, even an empty one, stopped by event_limit, byte_limit, oversized_frame or invalid_event), timeout (waitMs elapsed, possibly with a partial batch), disconnected (the stream ended early; never completion).","enum":["events","interactions","terminal","timeout","aborted","disconnected"],"type":"string"}},"required":["runId","status","snapshotSeq","snapshotPhase","snapshotProblem","nextSeq","events","eventOmission","oversizedEvent","pendingInteractions","pendingInteractionCount","omittedInteractions","wakeReason"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"readOnlyHint":true},"description":"Read one bounded part of one run event by run id and seq, typically claudexor_run_wait's oversizedEvent. Returns the exact UTF-8 bytes [offset, nextOffset) of the redacted serialization the run event stream delivers, with totalBytes and the sha256 of the whole event; parts never split a character. Read from offset 0, then each nextOffset until it equals totalBytes; a partial read is not a consumed event, so do not move claudexor_run_wait past it until the last part. Only validated events of this run are readable; there is no path, artifact or whole-log access.","inputSchema":{"additionalProperties":false,"properties":{"maxBytes":{"default":32768,"description":"Upper bound of this part's UTF-8 bytes; a part may end earlier at a character boundary.","maximum":65536,"minimum":4,"type":"integer"},"offset":{"default":0,"description":"0, or the previous part's nextOffset.","maximum":9007199254740991,"minimum":0,"type":"integer"},"runId":{"maxLength":256,"minLength":1,"type":"string"},"seq":{"description":"The event to read, e.g. claudexor_run_wait's oversizedEvent.seq.","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"}},"required":["runId","seq"],"type":"object"},"name":"claudexor_run_event_read","outputSchema":{"additionalProperties":false,"description":"One bounded part of a single validated run event, read from the run's own event log by run id and seq. Concatenate parts in offset order until nextOffset equals totalBytes; only then is the event consumed.","properties":{"nextOffset":{"description":"Where the next part starts; equal to totalBytes when this part ends the event.","maximum":9007199254740991,"minimum":0,"type":"integer"},"offset":{"description":"UTF-8 byte offset where this part starts.","maximum":9007199254740991,"minimum":0,"type":"integer"},"runId":{"description":"Canonical run id.","minLength":1,"type":"string"},"seq":{"description":"Durable seq of the event (its event-stream id).","exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"sha256":{"description":"SHA-256 of all totalBytes; verify the reassembled text before parsing it.","pattern":"^[0-9a-f]{64}$","type":"string"},"text":{"description":"Bytes [offset, nextOffset) decoded as UTF-8; a boundary never splits a character.","type":"string"},"totalBytes":{"description":"UTF-8 byte length of the event's complete stream serialization: the redacted JSON line the run event stream delivers.","exclusiveMinimum":0,"type":"integer"},"type":{"description":"Type of an append-only run event, covering run lifecycle, contract/context creation, budget, routing fallbacks, harness activity, interactions, gates, review, arbitration, work products, and control verbs.","enum":["run.created","task.contract.created","context.pack.created","project.git.initialized","project.claude_bridge.created","budget.lease.created","budget.observation","budget.cash","policy.web.upgraded","harness.started","harness.event","harness.completed","route.fallback.started","route.fallback.completed","route.fallback.exhausted","route.transient.detected","route.transient.retry_scheduled","route.profile.headroom_exceeded","route.profile.rotated","route.profile.rotation_exhausted","route.profile.credential_unusable","route.account.pool_selected","route.account.lane_switch","route.account.pool_exhausted","route.transient.exhausted","route.fallback.auth_switched","route.primary.diverged","route.pool.degraded","session.continuity","interaction.requested","interaction.answered","interaction.timeout","interaction.answer_discarded","interaction.withdrawn","message.accepted","message.delivered","message.refused","plan.progress","plan.questions","plan.brief.materialized","council.started","council.draft","council.member.failed","council.merged","budget.quota_pressure","delegation.belt.unavailable","delegation.belt.degraded","output.ready","gate.started","gate.completed","review.preflight","review.started","review.skipped","reviewer.started","reviewer.first_event","reviewer.auth_switched","reviewer.completed","reviewer.timed_out","reviewer.failed","finding.revalidated","synthesis.started","arbitration.completed","work_product.emitted","work_product.adopted","control.requested","control.applied","control.rejected","run.blocked","run.completed","run.failed","run.continuation","run.continuation.denied","run.continuity","workspace.retained"],"type":"string"}},"required":["runId","seq","type","totalBytes","sha256","offset","nextOffset","text"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"readOnlyHint":true},"description":"Observe lifecycle and pending attention from 1..1000 existing durable job/run handles in one read. targets contains {runId, seen?}; waitMs defaults to 25000 (0..50000). Echo each summary token as that target's seen to suppress unchanged terminal/question attention; tokens are not event cursors or answers. Returns ascending attention indexes and compact summaries in input order, including duplicates and explicit unknowns, within 128 KiB of logical JSON. waitMs=0 reads once; timeout never retries. Discovery adds up to 5s and HTTP adds up to waitMs+5s (total waitMs+10s). Host abort closes only observation; discovery's read-only handshake may settle in the background. Requires an existing supporting daemon; never starts one or a worker. Terminal lifecycle is not output readiness: use claudexor_run_result for output and claudexor_run_interactions for question bodies.","inputSchema":{"additionalProperties":false,"description":"Read-only attention observation; compact request JSON is at most 1048576 UTF-8 bytes.","properties":{"targets":{"items":{"additionalProperties":false,"properties":{"runId":{"maxLength":256,"minLength":1,"type":"string"},"seen":{"maxLength":43,"minLength":43,"pattern":"^[A-Za-z0-9_-]{43}$","type":"string"}},"required":["runId"],"type":"object"},"maxItems":1000,"minItems":1,"type":"array"},"waitMs":{"default":25000,"maximum":50000,"minimum":0,"type":"integer"}},"required":["targets"],"type":"object"},"name":"claudexor_runs_wait","outputSchema":{"additionalProperties":false,"description":"Lifecycle and pending attention only, at most 131072 UTF-8 JSON bytes; output readiness is a separate addressed read.","properties":{"attention":{"items":{"maximum":999,"minimum":0,"type":"integer"},"maxItems":1000,"type":"array"},"summaries":{"items":{"anyOf":[{"additionalProperties":false,"properties":{"pending":{"type":"boolean"},"problem":{"type":"null"},"status":{"description":"Control-plane run state = the run LIFECYCLE (D8): queued/running while live, then exactly one of succeeded / failed / cancelled / interrupted. Outcome quality (checks/review/delivery) is orthogonal — see outcomeFacts.","enum":["queued","running","succeeded","failed","cancelled","interrupted"],"type":"string"},"token":{"maxLength":43,"minLength":43,"pattern":"^[A-Za-z0-9_-]{43}$","type":"string"}},"required":["status","pending","token","problem"],"type":"object"},{"additionalProperties":false,"properties":{"pending":{"type":"null"},"problem":{"enum":["not_found","snapshot_unavailable","not_observed"],"type":"string"},"status":{"type":"null"},"token":{"type":"null"}},"required":["status","pending","token","problem"],"type":"object"}]},"maxItems":1000,"minItems":1,"type":"array"},"wakeReason":{"enum":["attention","problems","timeout","aborted"],"type":"string"}},"required":["wakeReason","attention","summaries"],"type":"object"}},{"annotations":{"destructiveHint":false,"idempotentHint":true,"readOnlyHint":true},"description":"Read exactly one retained task group page by caller UUID, optionally checking expectedStoreId. limit is 1..200 (default 50); state filters lifecycle; cursor (at most 2048 characters) is bound to group/filter/store/current served generations. The logical result is at most 131072 UTF-8 bytes and may return fewer members; resume only with nextCursor. Retained-only/current-served qualifiers are not a permanent roster or proof of submission. Job handles remain canonical while runId is null until binding. Explicit unavailable observations are unknown. Requires an existing supporting daemon; discovery and HTTP reads each allow up to 5s. Host cancellation closes only the read. Never launches, retries, resumes, cancels or answers work. Lifecycle is not output readiness; use addressed result/interactions tools for bodies.","inputSchema":{"additionalProperties":false,"properties":{"cursor":{"maxLength":2048,"type":"string"},"expectedStoreId":{"minLength":1,"type":"string"},"limit":{"default":50,"maximum":200,"minimum":1,"type":"integer"},"state":{"description":"Control-plane run state = the run LIFECYCLE (D8): queued/running while live, then exactly one of succeeded / failed / cancelled / interrupted. Outcome quality (checks/review/delivery) is orthogonal — see outcomeFacts.","enum":["queued","running","succeeded","failed","cancelled","interrupted"],"type":"string"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"}},"required":["taskGroupId"],"type":"object"},"name":"claudexor_task_group_runs","outputSchema":{"additionalProperties":false,"description":"One retained-only page in current served generations, at most 131072 UTF-8 bytes of logical JSON; absence is not historical completeness or launch authority.","properties":{"hasMore":{"type":"boolean"},"members":{"items":{"additionalProperties":false,"properties":{"createdAt":{"minLength":1,"type":"string"},"jobId":{"minLength":1,"type":"string"},"observation":{"anyOf":[{"additionalProperties":false,"properties":{"pending":{"type":"boolean"},"problem":{"type":"null"},"status":{"description":"Control-plane run state = the run LIFECYCLE (D8): queued/running while live, then exactly one of succeeded / failed / cancelled / interrupted. Outcome quality (checks/review/delivery) is orthogonal — see outcomeFacts.","enum":["queued","running","succeeded","failed","cancelled","interrupted"],"type":"string"},"token":{"maxLength":43,"minLength":43,"pattern":"^[A-Za-z0-9_-]{43}$","type":"string"}},"required":["status","pending","token","problem"],"type":"object"},{"additionalProperties":false,"properties":{"pending":{"type":"null"},"problem":{"enum":["not_found","snapshot_unavailable","not_observed"],"type":"string"},"status":{"type":"null"},"token":{"type":"null"}},"required":["status","pending","token","problem"],"type":"object"}]},"runId":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]}},"required":["jobId","runId","createdAt","observation"],"type":"object"},"maxItems":200,"type":"array"},"nextCursor":{"anyOf":[{"maxLength":2048,"type":"string"},{"type":"null"}]},"retention":{"const":"retained_only","type":"string"},"storeId":{"minLength":1,"type":"string"},"taskGroupId":{"description":"Caller-generated UUID saved before launching the first member. Each job still needs its own idempotency key; the group grants no execution authority.","format":"uuid","type":"string"},"viewToken":{"pattern":"^[A-Za-z0-9_-]{43}$","type":"string"},"visibility":{"const":"current_served_generations","type":"string"}},"required":["taskGroupId","storeId","visibility","retention","viewToken","members","hasMore","nextCursor"],"type":"object"}},{"annotations":{"readOnlyHint":true},"description":"Return doctor-backed Claudexor runtime status: per-harness verdicts with enabled/disabled intents, doctor reasons and checks, and the configured model.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"claudexor_status"},{"annotations":{"readOnlyHint":true},"description":"Return the derived AgentCapabilityCatalog: per-harness live capabilities (doctor-backed), canonical modes, the mutability matrix, run-control keys, CLI verbs, and the run-apply-state vocabulary.","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"claudexor_capabilities","outputSchema":{"additionalProperties":false,"description":"Machine-readable capability catalog for external agents — derived, never hand-maintained.","properties":{"availableHarnesses":{"description":"Convenience: ids with doctor status ok.","items":{"type":"string"},"type":"array"},"cliCommands":{"description":"CLI verbs with mutability/stability (full flag detail via `claudexor help --json`).","items":{"additionalProperties":false,"description":"CLI verb projection from the command registry (same data `claudexor help --json` serves).","properties":{"id":{"description":"CLI verb.","type":"string"},"mutability":{"description":"read = never mutates the tree; write = produces tree changes (envelope or live); delivery = moves an existing WorkProduct into the tree/VCS; ops = local config/daemon plumbing.","enum":["read","write","delivery","ops"],"type":"string"},"recovery":{"description":"True for post-run recovery verbs (inspect/follow/apply/decision).","type":"boolean"},"stability":{"description":"Contract stability of the verb.","enum":["stable","experimental"],"type":"string"}},"required":["id","mutability","stability","recovery"],"type":"object"},"type":"array"},"generatedAt":{"description":"ISO timestamp when the catalog was composed.","type":"string"},"git":{"additionalProperties":false,"description":"Execution-location Git readiness. Read-only and valid non-Git in-place flows do not require it.","properties":{"detail":{"type":["string","null"]},"remediation":{"type":["string","null"]},"status":{"enum":["available","missing","developer_tools_stub","failed"],"type":"string"},"version":{"type":["string","null"]}},"required":["status","version","detail","remediation"],"type":"object"},"harnesses":{"description":"Live per-harness capabilities (doctor-backed).","items":{"additionalProperties":false,"description":"Per-harness live capability row (manifest + doctor + model truth).","properties":{"accessControl":{"additionalProperties":false,"default":{"auxiliaryWritableRoots":false},"description":"Negotiated access-control grants beyond the access profile. Engines that predate this row omit it (= no auxiliary writable roots).","properties":{"auxiliaryWritableRoots":{"description":"True when this harness applies execution.auxiliaryWritableRoots natively under workspace_write, and a later run whose effective execution carries no list (a new thread turn without one) keeps no earlier grant; false lanes refuse an explicit pool and drop from an auto pool.","type":"boolean"}},"required":["auxiliaryWritableRoots"],"type":"object"},"accessProfilesSupported":{"description":"Access profiles the adapter can enforce.","items":{"description":"Active filesystem/command access profile for a run: readonly (no writes), workspace_write (use the harness's native workspace-write policy), full (unrestricted; requires the per-repo trust allow for a run an operator starts at a surface, not for an execution.delegated run), inherit_native (defer to the harness's own native settings).","enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"type":"array"},"accountCatalog":{"type":"boolean"},"attachmentInputs":{"description":"Finite media/MIME/size/count/transport declarations for this adapter.","items":{"additionalProperties":false,"description":"Finite MIME, size, count and transport limits declared by one adapter.","properties":{"kind":{"description":"Kind of attached resource: image input or generic file bytes.","enum":["image","file"],"type":"string"},"max_bytes":{"exclusiveMinimum":0,"type":"integer"},"max_count":{"exclusiveMinimum":0,"type":"integer"},"mime_types":{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"transport":{"description":"Native adapter transport used for one supported attachment class.","enum":["file_path","base64_stream","base64_inline","text_inline"],"type":"string"}},"required":["kind","mime_types","max_bytes","max_count","transport"],"type":"object"},"type":"array"},"configuredModel":{"description":"The user's configured per-harness default model, if any (null = engine default routing).","type":["string","null"]},"configuredModelValid":{"description":"Admission of configuredModel under the harness's own absence declaration (INV-104): false = refused by an authoritative list, or no list could be read; true = listed, or unlisted on an advisory harness (forwarded to the vendor; the settings write and doctor readiness carry that note); null when no model is configured.","type":["boolean","null"]},"delegation":{"additionalProperties":false,"description":"Whether this installed runtime can offer Delegate through this harness.","properties":{"available":{"description":"Whether this harness can receive the packaged delegation belt.","type":"boolean"},"reason":{"description":"Stable reason for the current delegation capability verdict.","enum":["ready","runtime_unavailable","manifest_unsupported"],"type":"string"},"remediation":{"default":null,"description":"Concrete update/repair guidance when unavailable; null when ready.","type":["string","null"]},"requiresFullAccess":{"default":false,"description":"Whether this harness can reach the belt only under a full-access profile.","type":"boolean"}},"required":["available","reason"],"type":"object"},"disabledIntents":{"description":"Intents the doctor disabled (with reasons in `reasons`).","items":{"type":"string"},"type":"array"},"displayName":{"description":"Human display name from the manifest.","type":"string"},"effortLevels":{"description":"Reasoning-effort ladder the adapter declares (normalized by the engine).","items":{"description":"Cross-harness reasoning-effort level as a lowercase slug (open vocabulary, mirroring the vendor contract); adapters advertise the levels they accept per model, ordered weakest to strongest by the vendor itself, and a shared normalizer passes advertised levels through, clamps inside the vendor order, places a word the vendor order lacks by the shared preference order (none < minimal < low < medium < high < xhigh < max < ultra) onto an advertised level, and refuses words neither order places.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"type":"array"},"enabled":{"description":"False when settings disable this harness (harnesses.<id>.enabled=false) — routing excludes it regardless of doctor status.","type":"boolean"},"enabledIntents":{"description":"Intents the gateway will route to this harness right now.","items":{"type":"string"},"type":"array"},"id":{"description":"Harness id (codex, claude, cursor, opencode, raw-api, openrouter, ...).","type":"string"},"inputLimits":{"items":{"additionalProperties":false,"description":"Adapter-owned observed input bound, not a predictive refusal or a model-window claim.","properties":{"askPromptBudget":{"additionalProperties":false,"properties":{"engineOverheadMax":{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"shape":{"const":"ordinary_initial_attempt","description":"Ordinary ASK initial attempt, including thread-turn continuity; excludes deep-scan and automatic continuation attempts.","type":"string"}},"required":["shape","engineOverheadMax"],"type":"object"},"limit":{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"},"verified_against":{"description":"Native runtime version against which the bound was observed.","minLength":1,"type":"string"}},"required":["scope","unit","limit","source","verified_against"],"type":"object"},"type":"array"},"liveInput":{"default":"none","description":"How a live message enters one of this harness's RUNNING sessions (POST /v2/runs/:id/messages): mid_turn | next_tool_boundary | none. The harness maximum from its capability profile; the POST answers for the specific run. Omitted by engines older than 3.16.0 (= none).","enum":["mid_turn","next_tool_boundary","none"],"type":"string"},"models":{"additionalProperties":false,"description":"Summary of a harness's model truth source (full list via the models endpoint/verb).","properties":{"count":{"description":"Number of enumerable models (GET /harnesses/:id/models has the full list).","minimum":0,"type":"integer"},"source":{"description":"Where the model list comes from: a live vendor API enumeration, the adapter manifest's curated hints, or nothing (model overrides are refused for source=none).","enum":["api","manifest","none"],"type":"string"},"verifiedAgainst":{"description":"Vendor CLI version the manifest hints were last verified against (null for api/none sources).","type":["string","null"]}},"required":["source","count","verifiedAgainst"],"type":"object"},"processingPreferences":{"items":{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},"type":"array"},"promptCacheTtls":{"description":"Exact promptCacheTtl values this harness's adapter translates into native controls; empty when a requested value would be disclosed as ignored, omitted by engines without the run control.","items":{"description":"Native prompt-cache lifetime for the main conversation and helper requests of a harness that declares it. Omission sends no override: native defaults, profile settings and the inherited environment stay in effect.","enum":["5m","1h"],"type":"string"},"type":"array"},"providerFamily":{"description":"Vendor family the harness routes to.","enum":["openai","anthropic","google","cursor","opencode","xai","local","unknown"],"type":"string"},"readonlyMechanism":{"description":"HOW read-only is enforced (fs_sandbox | permission_deny | tool_allowlist | none) — none means read-only intent is advisory for this harness.","enum":["fs_sandbox","permission_deny","tool_allowlist","none"],"type":"string"},"reasons":{"description":"Human-readable doctor/discovery reasons for degraded or unavailable status.","items":{"type":"string"},"type":"array"},"setupLogin":{"anyOf":[{"additionalProperties":false,"description":"Effective setup-login flow for this harness on the current host.","properties":{"mode":{"description":"in_app requests the daemon-hosted login flow; external_terminal requests the existing client PTY flow.","enum":["in_app","external_terminal"],"type":"string"}},"required":["mode"],"type":"object"},{"type":"null"}],"description":"Effective setup-login flow for this harness on the current host; current producers emit null or an object, while omission identifies a legacy catalog row."},"status":{"description":"Doctor verdict: ok | degraded | unavailable (doctor-backed, cached ~90s).","enum":["ok","degraded","unavailable"],"type":"string"},"webPolicy":{"description":"How external web/search is controlled for this harness.","enum":["native","tools","uncontrolled","none"],"type":"string"},"writeMechanism":{"default":"none","description":"HOW workspace_write is confined (fs_sandbox | tool_policy | none) — fs_sandbox is the base sandbox; a native automatic reviewer may still admit individual actions outside it. tool_policy means an allowed shell is unconfined (no FS/network fence); consumers choosing lanes by confinement read THIS field, never a harness name.","enum":["fs_sandbox","tool_policy","none"],"type":"string"}},"required":["id","enabled","displayName","status","providerFamily","enabledIntents","disabledIntents","reasons","configuredModel","configuredModelValid","models","webPolicy","attachmentInputs","effortLevels","accessProfilesSupported","readonlyMechanism","delegation"],"type":"object"},"type":"array"},"mcpTools":{"description":"MCP tool names `claudexor mcp serve` exposes.","items":{"type":"string"},"type":"array"},"modes":{"description":"Canonical run modes; strategy controls are separate schema-owned fields, never modes.","items":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"type":"array"},"mutability":{"additionalProperties":false,"description":"The mutability matrix: every way a Claudexor run can (or cannot) touch a tree, from the schema's closed vocabularies.","properties":{"accessProfiles":{"description":"Access vocabulary; `full` additionally requires the per-repo trust allow (claudexor trust --allow-full-access) for a run an operator starts at a surface, not for an execution.delegated run.","items":{"description":"Active filesystem/command access profile for a run: readonly (no writes), workspace_write (use the harness's native workspace-write policy), full (unrestricted; requires the per-repo trust allow for a run an operator starts at a surface, not for an execution.delegated run), inherit_native (defer to the harness's own native settings).","enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"type":"array"},"applyModes":{"description":"Delivery modes for applying a run's WorkProduct to the project.","items":{"enum":["apply","commit","branch","pr"],"type":"string"},"type":"array"},"isolationKinds":{"description":"Run isolation: envelope = isolated worktree in the external per-project runtime namespace (default), live = the project tree itself.","items":{"enum":["envelope","live"],"type":"string"},"type":"array"},"readOnlyModes":{"description":"Canonical modes that never mutate the project tree (ask/plan).","items":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"type":"array"},"workspaceKinds":{"items":{"enum":["git","directory"],"type":"string"},"type":"array"},"workspaceModes":{"description":"Thread workspace modes (in_place | isolated | delegated).","items":{"description":"Per-thread workspace mode: in_place mutates the live project tree directly (the default); isolated keeps a persistent git worktree per thread that apply merges into the project; delegated runs every turn in one caller-owned workspace bound at creation, which Claudexor never applies to the project or deletes.","enum":["in_place","isolated","delegated"],"type":"string"},"type":"array"},"writeModes":{"description":"Canonical modes that may mutate a tree (agent).","items":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"type":"array"}},"required":["readOnlyModes","writeModes","isolationKinds","workspaceModes","accessProfiles","applyModes"],"type":"object"},"ok":{"const":true,"description":"Envelope marker (matches the CLI JSON convention).","type":"boolean"},"outputSchemaDialects":{"description":"Supported structured-output JSON Schema dialects and canonical $schema URIs.","items":{"additionalProperties":false,"description":"One JSON Schema dialect accepted by the structured-output validator.","properties":{"defaultWhenOmitted":{"description":"True when this dialect is selected for schemas without a $schema declaration.","type":"boolean"},"dialect":{"description":"Stable dialect id used in structured-output receipts.","enum":["draft-07","draft-2020-12"],"type":"string"},"uri":{"description":"Canonical $schema URI accepted for this dialect.","format":"uri","type":"string"}},"required":["dialect","uri","defaultWhenOmitted"],"type":"object"},"minItems":1,"type":"array"},"runApplyStates":{"description":"RunApplyState vocabulary an agent can encounter on run results (not_applied | applied | applied_review_blocked | reverted) — distinct from the ApplyEligibility verdict object on run details.","items":{"type":"string"},"type":"array"},"runControlKeys":{"description":"Accepted POST /runs request keys (derived from the ControlRunStartRequest schema; the CLI/MCP/ACP surfaces project subsets of these).","items":{"type":"string"},"type":"array"},"version":{"description":"Claudexor version serving this catalog (compare with CLAUDEXOR_PLUGIN_VERSION to detect plugin skew).","type":"string"}},"required":["ok","version","generatedAt","git","harnesses","availableHarnesses","modes","runControlKeys","outputSchemaDialects","mutability","cliCommands","mcpTools","runApplyStates"],"type":"object"}},{"annotations":{"readOnlyHint":true},"description":"Return the read-only Accounts view: registered profiles, readiness, quota freshness, and routing identity. accountPools.next_up is the configured default model's verdict, never a forecast for another model; routingEvidence carries model-scoped recent refusals, temporary per-model capability marks, and each account's last service per requested model (a routing observation, not a quota or authentication verdict). Default combines current quota and registry facts with retained readiness observations: one coalesced cold acquisition, including failure, then passive reads with the original check time. Viewing does not renew old evidence; actual execution performs its own checks. fresh:true requests the atomic snapshot instead — an EXPENSIVE explicit refresh (a live probe per registered profile, a full harness doctor sweep, and the vendor quota fan-out, which honors account/route rate-limit cooldowns and existing broad floors and discloses paused subjects in quota.refresh_skipped). Use fresh:true only when acting on staleness matters; never poll with it. This tool never starts login or changes account state.","inputSchema":{"additionalProperties":false,"properties":{"fresh":{"description":"true = the expensive atomic Accounts snapshot (fresh probes + doctor + vendor quota fan-out); false/absent = current quota/registry facts with retained readiness observations and their age.","type":"boolean"}},"type":"object"},"name":"claudexor_accounts","outputSchema":{"anyOf":[{"additionalProperties":false,"description":"Credential-profile registry listing with per-profile doctor readiness and per-harness accounts authority.","properties":{"accountPools":{"default":[],"description":"Additive per-harness pool authority of the unified account model: routing facts (next_up incl. the api_key_route kind) live here so legacy strict next_up decoders never see unknown kinds. Old clients ignore this key.","items":{"additionalProperties":false,"description":"Per-harness pool authority (unified account model): who an unpinned run routes to next.","properties":{"harness_id":{"description":"Harness family this pool verdict belongs to.","minLength":1,"type":"string"},"next_up":{"anyOf":[{"additionalProperties":false,"description":"An enabled account row is who an unpinned run routes to next.","properties":{"kind":{"const":"profile","type":"string"},"profileId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["kind","profileId"],"type":"object"},{"additionalProperties":false,"description":"The account pool is empty or exhausted; the unpinned route is the policy-governed API key (INV-061) — a route, never an account row.","properties":{"kind":{"const":"api_key_route","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"description":"An unpinned run has nothing routable, with a human reason.","properties":{"kind":{"const":"none","type":"string"},"reason":{"type":"string"}},"required":["kind","reason"],"type":"object"}],"description":"Server-computed pool routing verdict for one harness's unpinned runs (unified account model)."}},"required":["harness_id","next_up"],"type":"object"},"type":"array"},"harnessAccounts":{"default":[],"description":"Per-harness accounts authority (INV-135): the native CLI-login pseudo-row state and the server-computed Active identity, so no surface re-derives the accounts symmetry. A unified-model engine emits [] here (the key must stay present for legacy strict clients) and carries routing facts in accountPools instead.","items":{"additionalProperties":false,"description":"Per-harness accounts authority: native CLI-login state + the informational next-up identity.","properties":{"harness_id":{"description":"Harness family these accounts belong to.","minLength":1,"type":"string"},"identity":{"anyOf":[{"additionalProperties":false,"description":"Non-secret {email, plan} identity of one account, derived daemon-side from a sanctioned scoped credential source or an allowlisted harness CLI status observation; never carries raw status or token material.","properties":{"email":{"description":"Login email of the account (codex id_token `email`, claude oauthAccount `emailAddress`, or an allowlisted harness CLI status observation).","minLength":1,"type":"string"},"plan":{"description":"Subscription/plan label (codex `chatgpt_plan_type` / claude oauthAccount `organizationType`).","minLength":1,"type":"string"}},"type":"object"},{"type":"null"}],"default":null,"description":"Non-secret {email, plan} of the native/CLI login, derived daemon-side from a sanctioned credential source or allowlisted harness CLI status observation; null when absent/undisclosed."},"native_credentials_enabled":{"description":"Whether the native/CLI login participates in this harness's credential ladder.","type":"boolean"},"native_login_detected":{"description":"Whether a native/default vendor login is currently detected available (the CLI login pseudo-row state).","type":"boolean"},"next_up":{"anyOf":[{"additionalProperties":false,"description":"An enabled credential profile is who an unpinned run routes to next.","properties":{"kind":{"const":"profile","type":"string"},"profileId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["kind","profileId"],"type":"object"},{"additionalProperties":false,"description":"The unprofiled/default credential is the subject of an unpinned run.","properties":{"kind":{"const":"native","type":"string"},"route":{"description":"Effective route of the unprofiled/default subject; omitted by older daemons.","enum":["local_session","api_key"],"type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"description":"An unpinned run has nothing routable (the default credential is disabled and no account is pinned).","properties":{"kind":{"const":"none","type":"string"},"reason":{"type":"string"}},"required":["kind","reason"],"type":"object"}],"description":"Server-computed identity an unpinned run of this harness would route to next."}},"required":["harness_id","native_credentials_enabled","native_login_detected","next_up"],"type":"object"},"type":"array"},"profiles":{"description":"Every registered credential profile paired with its doctor readiness projection and non-secret identity.","items":{"additionalProperties":false,"properties":{"identity":{"anyOf":[{"additionalProperties":false,"description":"Non-secret {email, plan} identity of one account, derived daemon-side from a sanctioned scoped credential source or an allowlisted harness CLI status observation; never carries raw status or token material.","properties":{"email":{"description":"Login email of the account (codex id_token `email`, claude oauthAccount `emailAddress`, or an allowlisted harness CLI status observation).","minLength":1,"type":"string"},"plan":{"description":"Subscription/plan label (codex `chatgpt_plan_type` / claude oauthAccount `organizationType`).","minLength":1,"type":"string"}},"type":"object"},{"type":"null"}],"default":null,"description":"Non-secret {email, plan} of this profile, derived daemon-side from its scoped credential source or allowlisted harness CLI status observation; null when absent/undisclosed."},"profile":{"additionalProperties":false,"description":"Durable non-secret named binding for one harness; credential material may live in Claudexor-owned scoped state, a managed secret store, or a platform-declared vendor/OS-user store, never in this row.","properties":{"created_at":{"anyOf":[{"description":"ISO-8601 timestamp string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"When the profile was registered; null for hand-written config entries."},"credential_kind":{"description":"Binding kind for a profile: Claudexor-owned scoped vendor state, a managed OAuth secret, or a managed API-key secret; a vendor OS-user credential may remain outside that state.","enum":["config_dir_login","oauth_token","api_key"],"type":"string"},"display_name":{"description":"Human label shown wherever the profile appears.","minLength":1,"type":"string"},"enabled":{"default":true,"description":"Disabled profiles are never routable.","type":"boolean"},"harness_id":{"description":"Harness family this profile belongs to.","minLength":1,"type":"string"},"isolation_locator":{"default":null,"description":"Canonical absolute path to Claudexor-owned scoped vendor state for config_dir_login bindings; null for secret-ref kinds.","type":["string","null"]},"profile_id":{"description":"Stable user-chosen profile identifier (unique per harness).","minLength":1,"type":"string"},"secret_ref":{"default":null,"description":"Namespaced secret-store name (e.g. claude_oauth:work) for oauth_token/api_key profiles; null for config_dir_login.","type":["string","null"]}},"required":["profile_id","harness_id","display_name","credential_kind"],"type":"object"},"status":{"additionalProperties":false,"description":"Doctor-owned readiness projection for one credential profile; never durable config.","properties":{"availability":{"enum":["available","unavailable","unknown"],"type":"string"},"detail":{"description":"Redacted human-readable probe evidence.","type":"string"},"harness_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"last_verified_at":{"anyOf":[{"description":"ISO-8601 timestamp string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"When the verification verdict was established, by the method named in verification_source; null = never verified."},"profile_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"stale":{"description":"True only for a bounded stale last-known-good observation; stale is never a fresh passed verification.","type":"boolean"},"stale_age_ms":{"description":"Age in milliseconds of the bounded stale observation, when stale is true.","minimum":0,"type":"integer"},"stale_basis":{"description":"Basis of a stale observation: last_positive_after_timeout = the status probe did not answer within its budget and this row store's last positive status answer, still inside its bounded interval, stands in; unpinned pool admission alone may consume it. Absent = the generic last-known-good grace, consumable only by an already selected route.","enum":["last_positive_after_timeout"],"type":"string"},"verification":{"enum":["passed","failed","not_run"],"type":"string"},"verification_source":{"default":"local_store","description":"How the verification verdict was reached: local_store = the binding's required local state or managed secret is present (says nothing about a token being live); vendor = the vendor answered under the exact binding environment and effective platform credential policy.","enum":["local_store","vendor"],"type":"string"}},"required":["profile_id","harness_id","availability","verification"],"type":"object"}},"required":["profile","status"],"type":"object"},"type":"array"},"routingEvidence":{"additionalProperties":false,"description":"Model-scoped routing evidence; absent when the engine predates the read or the read failed.","properties":{"capabilities":{"description":"Temporary capability marks; absent from engines that predate them. A mark clears on a success there or a catalog or credential change; after expires_at one operation may probe the account.","items":{"additionalProperties":false,"description":"A temporary capability mark for one account and one model. It only orders auto selection: the account stays enabled and usable as a last fallback.","properties":{"account_fingerprint":{"description":"Provider account identity the mark is bound to; null when the adapter has none.","type":["string","null"]},"expires_at":{"description":"Probe becomes eligible at this time; not a vendor reset.","minLength":1,"type":"string"},"harness_id":{"description":"Harness family of the account.","minLength":1,"type":"string"},"observed_at":{"description":"Start of this mark's episode, when its row was created (a recognized refusal, or the service elsewhere that confirmed an unrecognized one); renewals and probes keep it.","minLength":1,"type":"string"},"profile_id":{"description":"Account row that refused this model before generation started.","minLength":1,"type":"string"},"provider_reason":{"description":"Latest refusal diagnostic, redacted and at most 1024 characters: the provider's reason for a recognized refusal, the engine's message and vendor code otherwise.","type":"string"},"requested_model":{"description":"Model the refused request named.","type":"string"},"state":{"description":"provisional = refused here; confirmed = another account then served the correlated retry; probe_due = expired, the next selection may probe it; probing = one operation holds that probe.","enum":["provisional","confirmed","probe_due","probing"],"type":"string"}},"required":["harness_id","profile_id","requested_model","account_fingerprint","provider_reason","observed_at","expires_at","state"],"type":"object"},"type":"array"},"lastService":{"description":"Latest observed service per registered account and requested model, most recent service first.","items":{"additionalProperties":false,"description":"The latest observed service of one account for one requested model under its current credential binding.","properties":{"harness_id":{"description":"Harness family of the account.","minLength":1,"type":"string"},"observed_at":{"description":"When the account was observed serving that request.","minLength":1,"type":"string"},"profile_id":{"description":"Account row that served the request.","minLength":1,"type":"string"},"requested_model":{"description":"Model the run asked for; null = the harness default model.","type":["string","null"]}},"required":["harness_id","profile_id","requested_model","observed_at"],"type":"object"},"type":"array"},"refusals":{"description":"Live pre-progress refusal observations, each scoped to one requested model.","items":{"additionalProperties":false,"description":"A bounded, self-expiring typed observation that an account refused a started session before any progress; it orders the account pool and never excludes a row.","properties":{"expires_at":{"description":"Self-expiry instant (observation retention, not a vendor reset time); after this the observation is ignored.","minLength":1,"type":"string"},"harness_id":{"description":"Harness family the observed account belongs to.","minLength":1,"type":"string"},"observed_at":{"description":"When the pre-progress refusal was observed.","minLength":1,"type":"string"},"profile_id":{"description":"Account row whose started session was refused before progress.","minLength":1,"type":"string"},"requested_model":{"description":"Model the run asked this account for; null = the harness default model.","type":["string","null"]}},"required":["harness_id","profile_id","requested_model","observed_at","expires_at"],"type":"object"},"type":"array"}},"required":["refusals","lastService"],"type":"object"},"routingEvidenceProblem":{"description":"One diagnostic when the routing-evidence read failed; the account listing is still authoritative.","type":"string"}},"required":["profiles"],"type":"object"},{"additionalProperties":false,"description":"Atomic Accounts snapshot: profiles, next-up authority, fresh harness readiness, Git capability, and quota from one server-authored epoch.","properties":{"accountPools":{"default":[],"description":"Additive per-harness pool authority of the unified account model: routing facts (next_up incl. the api_key_route kind) live here so legacy strict next_up decoders never see unknown kinds. Old clients ignore this key.","items":{"additionalProperties":false,"description":"Per-harness pool authority (unified account model): who an unpinned run routes to next.","properties":{"harness_id":{"description":"Harness family this pool verdict belongs to.","minLength":1,"type":"string"},"next_up":{"anyOf":[{"additionalProperties":false,"description":"An enabled account row is who an unpinned run routes to next.","properties":{"kind":{"const":"profile","type":"string"},"profileId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["kind","profileId"],"type":"object"},{"additionalProperties":false,"description":"The account pool is empty or exhausted; the unpinned route is the policy-governed API key (INV-061) — a route, never an account row.","properties":{"kind":{"const":"api_key_route","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"description":"An unpinned run has nothing routable, with a human reason.","properties":{"kind":{"const":"none","type":"string"},"reason":{"type":"string"}},"required":["kind","reason"],"type":"object"}],"description":"Server-computed pool routing verdict for one harness's unpinned runs (unified account model)."}},"required":["harness_id","next_up"],"type":"object"},"type":"array"},"git":{"additionalProperties":false,"description":"Git readiness from the same Accounts refresh cycle.","properties":{"detail":{"type":["string","null"]},"remediation":{"type":["string","null"]},"status":{"enum":["available","missing","developer_tools_stub","failed"],"type":"string"},"version":{"type":["string","null"]}},"required":["status","version","detail","remediation"],"type":"object"},"harnessAccounts":{"default":[],"description":"Per-harness accounts authority (INV-135): the native CLI-login pseudo-row state and the server-computed Active identity, so no surface re-derives the accounts symmetry. A unified-model engine emits [] here (the key must stay present for legacy strict clients) and carries routing facts in accountPools instead.","items":{"additionalProperties":false,"description":"Per-harness accounts authority: native CLI-login state + the informational next-up identity.","properties":{"harness_id":{"description":"Harness family these accounts belong to.","minLength":1,"type":"string"},"identity":{"anyOf":[{"additionalProperties":false,"description":"Non-secret {email, plan} identity of one account, derived daemon-side from a sanctioned scoped credential source or an allowlisted harness CLI status observation; never carries raw status or token material.","properties":{"email":{"description":"Login email of the account (codex id_token `email`, claude oauthAccount `emailAddress`, or an allowlisted harness CLI status observation).","minLength":1,"type":"string"},"plan":{"description":"Subscription/plan label (codex `chatgpt_plan_type` / claude oauthAccount `organizationType`).","minLength":1,"type":"string"}},"type":"object"},{"type":"null"}],"default":null,"description":"Non-secret {email, plan} of the native/CLI login, derived daemon-side from a sanctioned credential source or allowlisted harness CLI status observation; null when absent/undisclosed."},"native_credentials_enabled":{"description":"Whether the native/CLI login participates in this harness's credential ladder.","type":"boolean"},"native_login_detected":{"description":"Whether a native/default vendor login is currently detected available (the CLI login pseudo-row state).","type":"boolean"},"next_up":{"anyOf":[{"additionalProperties":false,"description":"An enabled credential profile is who an unpinned run routes to next.","properties":{"kind":{"const":"profile","type":"string"},"profileId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["kind","profileId"],"type":"object"},{"additionalProperties":false,"description":"The unprofiled/default credential is the subject of an unpinned run.","properties":{"kind":{"const":"native","type":"string"},"route":{"description":"Effective route of the unprofiled/default subject; omitted by older daemons.","enum":["local_session","api_key"],"type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"description":"An unpinned run has nothing routable (the default credential is disabled and no account is pinned).","properties":{"kind":{"const":"none","type":"string"},"reason":{"type":"string"}},"required":["kind","reason"],"type":"object"}],"description":"Server-computed identity an unpinned run of this harness would route to next."}},"required":["harness_id","native_credentials_enabled","native_login_detected","next_up"],"type":"object"},"type":"array"},"harnesses":{"description":"Fresh harness readiness used for the account next-up projection.","items":{"additionalProperties":false,"description":"Doctor-backed status row for one harness: status, intents, checks, and configured-model validity.","properties":{"authSources":{"default":[],"description":"Doctor-backed readiness by authentication source; an empty array means readiness was not reported.","items":{"additionalProperties":false,"description":"Doctor-backed readiness for one exact credential source.","properties":{"availability":{"enum":["available","unavailable","unknown"],"type":"string"},"detail":{"description":"Redacted human-readable source evidence.","type":"string"},"source":{"description":"Concrete credential source used or probed by a harness.","enum":["native_session","oauth_token_env","api_key_env","api_key_flag","provider_auth_file","none"],"type":"string"},"verification":{"enum":["passed","failed","not_run"],"type":"string"}},"required":["source","availability","verification"],"type":"object"},"type":"array"},"checks":{"default":[],"description":"Doctor probe results.","items":{"additionalProperties":false,"description":"Result of a conformance probe for one capability check.","properties":{"detail":{"description":"Human-readable detail for the outcome.","type":"string"},"duration_ms":{"description":"How long the check took, in milliseconds.","minimum":0,"type":"integer"},"id":{"description":"Check id.","type":"string"},"status":{"description":"Outcome of the check: pass, fail, or skip.","enum":["pass","fail","skip"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"configuredModel":{"default":null,"description":"The user's configured per-harness default model, if any.","type":["string","null"]},"configuredModelCheck":{"anyOf":[{"additionalProperties":false,"properties":{"message":{"default":null,"description":"Actionable rejection message, when rejected.","type":["string","null"]},"status":{"description":"Whether the configured model is admitted (listed, or unlisted on an advisory harness) or refused by an authoritative list.","enum":["ok","rejected"],"type":"string"}},"required":["status"],"type":"object"},{"type":"null"}],"default":null,"description":"Truth-source check of configuredModel under the harness's own absence declaration; ok with a message is an advisory admission; null when no model is configured."},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate capability projection for one harness and installed runtime.","properties":{"available":{"description":"Whether this harness can receive the packaged delegation belt.","type":"boolean"},"reason":{"description":"Stable reason for the current delegation capability verdict.","enum":["ready","runtime_unavailable","manifest_unsupported"],"type":"string"},"remediation":{"default":null,"description":"Concrete update/repair guidance when unavailable; null when ready.","type":["string","null"]},"requiresFullAccess":{"default":false,"description":"Whether this harness can reach the belt only under a full-access profile.","type":"boolean"}},"required":["available","reason"],"type":"object"},{"type":"null"}],"default":null,"description":"Engine-owned Delegate capability for this harness and installed runtime; null on legacy status rows."},"disabledIntents":{"default":[],"description":"Intents the doctor disabled.","items":{"type":"string"},"type":"array"},"enabledIntents":{"default":[],"description":"Intents the gateway will route to this harness.","items":{"type":"string"},"type":"array"},"id":{"description":"Harness id.","type":"string"},"manifest":{"anyOf":[{"additionalProperties":false,"description":"Static manifest an adapter declares for its harness: identity, kind, capabilities, auth modes, and access profiles.","properties":{"access_profiles_supported":{"default":[],"description":"Access profiles the adapter can enforce.","items":{"description":"Active filesystem/command access profile for a run: readonly (no writes), workspace_write (use the harness's native workspace-write policy), full (unrestricted; requires the per-repo trust allow for a run an operator starts at a surface, not for an execution.delegated run), inherit_native (defer to the harness's own native settings).","enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"type":"array"},"adapter_version":{"description":"Version of the Claudexor adapter itself.","type":"string"},"auth_modes":{"default":[],"description":"Auth modes the harness supports (availability only, not readiness).","items":{"enum":["local_session","api_key","none"],"type":"string"},"type":"array"},"capabilities":{"additionalProperties":false,"description":"Declared harness capabilities the engine actually consumes for intent gating, routing, knob support, and disclosure.","properties":{"browser_tool":{"default":false,"description":"The adapter can inject a browser-automation MCP server (Playwright MCP) the harness drives as browser_* tools; never injected when web policy is off.","type":"boolean"},"create_from_scratch":{"default":false,"description":"The harness can scaffold new projects (create_from_scratch intent).","type":"boolean"},"effort_levels":{"default":[],"description":"Ordered (weakest to strongest) reasoning-effort levels this harness accepts across all its models; empty means effort is not a tunable surface.","items":{"description":"Cross-harness reasoning-effort level as a lowercase slug (open vocabulary, mirroring the vendor contract); adapters advertise the levels they accept per model, ordered weakest to strongest by the vendor itself, and a shared normalizer passes advertised levels through, clamps inside the vendor order, places a word the vendor order lacks by the shared preference order (none < minimal < low < medium < high < xhigh < max < ultra) onto an advertised level, and refuses words neither order places.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"type":"array"},"effort_levels_verified_against":{"default":null,"description":"Vendor CLI version the effort ladders were last verified against; null = never verified / not applicable.","type":["string","null"]},"implement":{"default":false,"description":"The harness can implement code changes (implement intent).","type":"boolean"},"implementation_transport":{"default":"workspace","description":"Typed producer/consumer transport used when implement=true.","enum":["workspace","git_patch_envelope"],"type":"string"},"interactive":{"default":false,"description":"The adapter can surface interactive user questions (interaction_requested events) and deliver typed answers back into the live session.","type":"boolean"},"json_schema_output":{"default":false,"description":"The harness can constrain its final message to a caller-supplied JSON Schema (native structured-output flag).","type":"boolean"},"known_models":{"default":[],"description":"Manifest-declared model ids/aliases this harness accepts (bare string = every credential route; object form scopes a model to specific routes), used as the model truth source when the adapter has no live inventory and judged under model_inventory_absence: an authoritative harness refuses an explicit model outside it, an advisory harness forwards it with a note.","items":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"id":{"description":"Model id/alias.","minLength":1,"type":"string"},"routes":{"description":"Credential routes this model is available on.","items":{"enum":["local_session","api_key"],"type":"string"},"minItems":1,"type":"array"}},"required":["id","routes"],"type":"object"}]},"type":"array"},"known_models_verified_against":{"default":null,"description":"Vendor CLI version the known_models hints were last verified against; null = never verified / not applicable.","type":["string","null"]},"max_turns":{"default":false,"description":"Honors HarnessRunSpec.max_turns (e.g. a native --max-turns flag).","type":"boolean"},"model_effort_levels":{"additionalProperties":{"additionalProperties":false,"description":"Reasoning-effort vocabulary a single model advertises.","properties":{"default":{"anyOf":[{"description":"Cross-harness reasoning-effort level as a lowercase slug (open vocabulary, mirroring the vendor contract); adapters advertise the levels they accept per model, ordered weakest to strongest by the vendor itself, and a shared normalizer passes advertised levels through, clamps inside the vendor order, places a word the vendor order lacks by the shared preference order (none < minimal < low < medium < high < xhigh < max < ultra) onto an advertised level, and refuses words neither order places.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},{"type":"null"}],"default":null,"description":"The effort level the vendor uses for this model when none is requested."},"levels":{"default":[],"description":"Ordered (weakest to strongest) reasoning-effort levels this model advertises, in the vendor's own order.","items":{"description":"Cross-harness reasoning-effort level as a lowercase slug (open vocabulary, mirroring the vendor contract); adapters advertise the levels they accept per model, ordered weakest to strongest by the vendor itself, and a shared normalizer passes advertised levels through, clamps inside the vendor order, places a word the vendor order lacks by the shared preference order (none < minimal < low < medium < high < xhigh < max < ultra) onto an advertised level, and refuses words neither order places.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"type":"array"}},"type":"object"},"default":{},"description":"Per-model advertised reasoning-effort vocabulary keyed by model id; a model absent here falls back to the harness-wide effort_levels union.","type":"object"},"model_inventory_absence":{"description":"Whether an absence from this harness's model lists (the live models() answer and the manifest known_models alike) proves a model is ABSENT; omitted = authoritative (an unlisted model is refused). advisory = absence is not proof, so an explicit model is forwarded to the vendor and disclosed instead of refused.","enum":["authoritative","advisory"],"type":"string"},"model_inventory_routes":{"description":"Credential routes supported by the adapter's live models() producer; omitted preserves all-route support. Other routes use manifest known_models, never another account's live inventory.","items":{"enum":["local_session","api_key"],"type":"string"},"minItems":1,"type":"array"},"plan":{"default":false,"description":"The harness can produce plans (plan intent).","type":"boolean"},"processing_preferences":{"description":"Service preferences translated by this adapter; model/account support is separate.","items":{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},"type":"array"},"read_files":{"default":false,"description":"The harness can read project files.","type":"boolean"},"review":{"default":false,"description":"The harness can act as a reviewer (review intent).","type":"boolean"},"structured_output_channel":{"default":"final_message","description":"Where a schema-constrained answer surfaces: side_tool (rides a tool; final message stays markdown) or final_message (constrains the final message itself).","enum":["side_tool","final_message"],"type":"string"},"synthesize":{"default":false,"description":"The harness can synthesize across candidate outputs (synthesize intent).","type":"boolean"},"tool_lists":{"default":false,"description":"Honors tool_permission_policy allow/deny lists (e.g. a native --allowedTools flag).","type":"boolean"},"verify":{"default":false,"description":"The harness can act as the FinalVerifier (verify intent).","type":"boolean"},"web_policy":{"default":"none","description":"How a harness can honor the external web policy: native (a native config surface), tools (permissioned tools the adapter can allow/deny), uncontrolled (can reach the web but exposes no enforceable switch), or none (no web access at all).","enum":["native","tools","uncontrolled","none"],"type":"string"},"work_report_transport":{"default":"unsupported","description":"How the harness carries the D-16 WorkReport envelope: constrained (native schema transport), validated (instructed terminal metadata), or unsupported (work_state stays unverified).","enum":["constrained","validated","unsupported"],"type":"string"}},"type":"object"},"capability_profile":{"additionalProperties":false,"default":{},"description":"Structured per-harness facts the engine consumes: auth routing, isolation containment, readonly mechanism, finite attachment inputs, MCP injection, live input into a running session, and translated prompt-cache lifetimes.","properties":{"access_control":{"additionalProperties":false,"default":{},"description":"Declared access-control facts for a harness.","properties":{"auxiliary_writable_roots":{"default":false,"description":"The adapter applies HarnessRunSpec.auxiliary_writable_roots natively under workspace_write, and a later spec carrying none receives no earlier grant; false = such a lane refuses (explicit pool) or is filtered (auto pool).","type":"boolean"},"readonly_mechanism":{"default":"none","description":"How read-only access is enforced for a harness: a filesystem sandbox, permission denial, a tool allowlist, or none (read-only intent is advisory).","enum":["fs_sandbox","permission_deny","tool_allowlist","none"],"type":"string"},"write_mechanism":{"default":"none","description":"How workspace_write access is CONFINED for a harness: a filesystem/network base sandbox (codex seatbelt; the harness's native automatic reviewer may still admit individual actions outside it, so fs_sandbox does not mean every admitted action stays inside), a tool-permission policy with no FS/network fence (claude — an allowed shell is unconfined), or none (write intent is advisory).","enum":["fs_sandbox","tool_policy","none"],"type":"string"}},"type":"object"},"attachment_inputs":{"default":[],"items":{"additionalProperties":false,"description":"Finite MIME, size, count and transport limits declared by one adapter.","properties":{"kind":{"description":"Kind of attached resource: image input or generic file bytes.","enum":["image","file"],"type":"string"},"max_bytes":{"exclusiveMinimum":0,"type":"integer"},"max_count":{"exclusiveMinimum":0,"type":"integer"},"mime_types":{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"transport":{"description":"Native adapter transport used for one supported attachment class.","enum":["file_path","base64_stream","base64_inline","text_inline"],"type":"string"}},"required":["kind","mime_types","max_bytes","max_count","transport"],"type":"object"},"type":"array"},"auth":{"additionalProperties":false,"default":{},"description":"Declared auth routing facts for a harness.","properties":{"credential_profile_policies":{"description":"Platform-specific profile identity/cardinality/cleanup policy; absent uses the backward-compatible profile-scoped, unbounded, Claudexor-owned defaults.","items":{"additionalProperties":false,"description":"Platform-specific identity scope, enabled-profile cardinality, and credential cleanup ownership for one auth source.","properties":{"cleanup_owner":{"description":"Who owns cleanup of the credential when its Claudexor profile binding is removed.","enum":["claudexor","vendor"],"type":"string"},"identity_scope":{"description":"Identity boundary selected by a credential profile: the named profile itself or the host OS user/login vault.","enum":["profile","os_user"],"type":"string"},"max_enabled_profiles":{"anyOf":[{"exclusiveMinimum":0,"type":"integer"},{"type":"null"}],"description":"Maximum enabled profile bindings on these platforms; null means unbounded."},"platforms":{"description":"Nonempty host-platform set governed by this policy row.","items":{"description":"Host platform used to resolve credential and managed-login policy.","enum":["darwin","linux","win32"],"type":"string"},"minItems":1,"type":"array"},"source":{"description":"Concrete credential source used or probed by a harness.","enum":["native_session","oauth_token_env","api_key_env","api_key_flag","provider_auth_file","none"],"type":"string"}},"required":["source","platforms","identity_scope","max_enabled_profiles","cleanup_owner"],"type":"object"},"type":"array"},"credential_transports":{"default":[],"description":"Declared credential transports per auth source.","items":{"additionalProperties":false,"description":"How a credential from one auth source physically reaches the harness process.","properties":{"kind":{"description":"Mechanism that carries a credential to the harness process (config file, env var, OAuth token env, OS keychain, HTTP header, or none).","enum":["config_file","env_var","oauth_token_env","os_keychain","http_header","none"],"type":"string"},"platforms":{"description":"Host platforms on which this physical credential transport applies; absent means every supported platform for backward compatibility.","items":{"description":"Host platform used to resolve credential and managed-login policy.","enum":["darwin","linux","win32"],"type":"string"},"minItems":1,"type":"array"},"relocatable_by":{"default":[],"description":"Relocation levers that can move this transport into a scoped environment.","items":{"description":"Which relocation lever moves the credential into a scoped environment (HOME, a config dir override, env injection, or none).","enum":["HOME","CONFIG_DIR","ENV","none"],"type":"string"},"type":"array"},"source":{"description":"Concrete credential source used or probed by a harness.","enum":["native_session","oauth_token_env","api_key_env","api_key_flag","provider_auth_file","none"],"type":"string"}},"required":["source","kind"],"type":"object"},"type":"array"},"managed_login":{"anyOf":[{"additionalProperties":false,"description":"Managed-login input requirement; command, argv, flow, and time window remain owned by the native-login registry.","properties":{"stdin":{"description":"Input transport the vendor login command requires.","enum":["none","pipe","terminal"],"type":"string"}},"required":["stdin"],"type":"object"},{"type":"null"}],"description":"Managed subscription-login input requirement; null means this harness defines no managed login, absent is a legacy manifest."},"preferred_source":{"anyOf":[{"description":"Concrete credential source used or probed by a harness.","enum":["native_session","oauth_token_env","api_key_env","api_key_flag","provider_auth_file","none"],"type":"string"},{"type":"null"}],"default":null,"description":"Auth source the adapter prefers; null when it has no preference."},"supported_sources":{"default":[],"description":"Auth sources this harness supports.","items":{"description":"Concrete credential source used or probed by a harness.","enum":["native_session","oauth_token_env","api_key_env","api_key_flag","provider_auth_file","none"],"type":"string"},"type":"array"}},"type":"object"},"input_limits":{"items":{"additionalProperties":false,"description":"Adapter-owned observed input bound, not a predictive refusal or a model-window claim.","properties":{"limit":{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"},"verified_against":{"description":"Native runtime version against which the bound was observed.","minLength":1,"type":"string"}},"required":["scope","unit","limit","source","verified_against"],"type":"object"},"type":"array"},"isolation":{"additionalProperties":false,"default":{},"description":"Declared isolation containment facts for a harness.","properties":{"supported_containment":{"default":["env_or_file_injection"],"description":"Containment mechanisms the adapter can run under.","items":{"description":"Isolation containment level an adapter supports for run environments, from env/file injection through scoped-HOME keychain bridging or a private per-profile keychain to process sandboxes and containers.","enum":["env_or_file_injection","scoped_home_keychain_bridge","private_per_profile_keychain","host_user_context","process_sandbox","container"],"type":"string"},"type":"array"}},"type":"object"},"live_input":{"default":"none","description":"How a live message enters a running session: mid_turn (consumed inside the active turn), next_tool_boundary (queued until the same turn's next tool boundary), none (no truthful channel; the engine answers unsupported).","enum":["mid_turn","next_tool_boundary","none"],"type":"string"},"mcp_injection":{"default":false,"description":"The adapter can inject engine-owned MCP servers into the harness sandbox (browser tool, delegation belt); false = browser MCP is refused and Delegate degrades to ordinary Agent with a durable typed receipt.","type":"boolean"},"mcp_injection_requires_full_access":{"default":false,"description":"An injected MCP server can only reach the daemon (belt) at full access; below it the harness sandbox cancels the call. true => Delegate below full access degrades to ordinary Agent with a durable typed receipt.","type":"boolean"},"prompt_cache_ttls":{"description":"Prompt-cache lifetimes this adapter translates into native controls; a requested lifetime outside the list (or with the list absent) is disclosed as ignored.","items":{"description":"Native prompt-cache lifetime for the main conversation and helper requests of a harness that declares it. Omission sends no override: native defaults, profile settings and the inherited environment stay in effect.","enum":["5m","1h"],"type":"string"},"type":"array"}},"type":"object"},"display_name":{"description":"Human display name of the harness.","type":"string"},"id":{"description":"Harness id (codex, claude, cursor, opencode, raw-api, ...).","minLength":1,"type":"string"},"kind":{"description":"Kind of harness adapter: a local vendor CLI, a remote API, or a fake used for tests.","enum":["local_cli","remote_api","fake"],"type":"string"},"provider_family":{"default":"unknown","description":"Vendor/provider family a harness routes to, used for route-diversity reasoning; open-ended via \"unknown\".","enum":["openai","anthropic","google","cursor","opencode","xai","local","unknown"],"type":"string"},"version":{"description":"Vendor CLI/API version, when discovered.","type":"string"}},"required":["id","display_name","kind","capabilities"],"type":"object"},{"type":"null"}],"description":"The harness's declared manifest, when available."},"readiness":{"default":[],"description":"Display-ready readiness checks, daemon-normalized from the raw evidence.","items":{"additionalProperties":false,"description":"One display-ready readiness check row (daemon-normalized).","properties":{"detail":{"default":null,"description":"Redacted human-readable evidence for the outcome.","type":["string","null"]},"id":{"description":"Stable machine id of the check (adapter probe id or auth source).","type":"string"},"kind":{"description":"What KIND of readiness this is: binary presence, credential source, isolated smoke, configured-model validity, or a generic capability probe.","enum":["binary","auth","smoke","model","probe"],"type":"string"},"status":{"description":"Outcome; skip = not run / not applicable.","enum":["pass","fail","skip"],"type":"string"},"title":{"description":"Human display name of the check.","type":"string"}},"required":["id","kind","title","status"],"type":"object"},"type":"array"},"reasons":{"default":[],"description":"Human-readable reasons for degraded/unavailable status.","items":{"type":"string"},"type":"array"},"routableIntents":{"default":[],"description":"Intents the harness is actually routable for right now (doctor-gated); the server-side availability truth surfaces must read instead of re-deriving.","items":{"type":"string"},"type":"array"},"setupLogin":{"anyOf":[{"additionalProperties":false,"description":"Effective setup-login flow for this harness on the current host.","properties":{"mode":{"description":"in_app requests the daemon-hosted login flow; external_terminal requests the existing client PTY flow.","enum":["in_app","external_terminal"],"type":"string"}},"required":["mode"],"type":"object"},{"type":"null"}],"description":"Effective setup-login flow for this harness on the current host; current producers emit null or an object, while omission identifies a legacy row."},"status":{"description":"Doctor verdict for a harness: ok (usable), degraded (usable with limitations), or unavailable.","enum":["ok","degraded","unavailable"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"profiles":{"description":"Every registered credential profile paired with its doctor readiness projection and non-secret identity.","items":{"additionalProperties":false,"properties":{"identity":{"anyOf":[{"additionalProperties":false,"description":"Non-secret {email, plan} identity of one account, derived daemon-side from a sanctioned scoped credential source or an allowlisted harness CLI status observation; never carries raw status or token material.","properties":{"email":{"description":"Login email of the account (codex id_token `email`, claude oauthAccount `emailAddress`, or an allowlisted harness CLI status observation).","minLength":1,"type":"string"},"plan":{"description":"Subscription/plan label (codex `chatgpt_plan_type` / claude oauthAccount `organizationType`).","minLength":1,"type":"string"}},"type":"object"},{"type":"null"}],"default":null,"description":"Non-secret {email, plan} of this profile, derived daemon-side from its scoped credential source or allowlisted harness CLI status observation; null when absent/undisclosed."},"profile":{"additionalProperties":false,"description":"Durable non-secret named binding for one harness; credential material may live in Claudexor-owned scoped state, a managed secret store, or a platform-declared vendor/OS-user store, never in this row.","properties":{"created_at":{"anyOf":[{"description":"ISO-8601 timestamp string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"When the profile was registered; null for hand-written config entries."},"credential_kind":{"description":"Binding kind for a profile: Claudexor-owned scoped vendor state, a managed OAuth secret, or a managed API-key secret; a vendor OS-user credential may remain outside that state.","enum":["config_dir_login","oauth_token","api_key"],"type":"string"},"display_name":{"description":"Human label shown wherever the profile appears.","minLength":1,"type":"string"},"enabled":{"default":true,"description":"Disabled profiles are never routable.","type":"boolean"},"harness_id":{"description":"Harness family this profile belongs to.","minLength":1,"type":"string"},"isolation_locator":{"default":null,"description":"Canonical absolute path to Claudexor-owned scoped vendor state for config_dir_login bindings; null for secret-ref kinds.","type":["string","null"]},"profile_id":{"description":"Stable user-chosen profile identifier (unique per harness).","minLength":1,"type":"string"},"secret_ref":{"default":null,"description":"Namespaced secret-store name (e.g. claude_oauth:work) for oauth_token/api_key profiles; null for config_dir_login.","type":["string","null"]}},"required":["profile_id","harness_id","display_name","credential_kind"],"type":"object"},"status":{"additionalProperties":false,"description":"Doctor-owned readiness projection for one credential profile; never durable config.","properties":{"availability":{"enum":["available","unavailable","unknown"],"type":"string"},"detail":{"description":"Redacted human-readable probe evidence.","type":"string"},"harness_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"last_verified_at":{"anyOf":[{"description":"ISO-8601 timestamp string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"When the verification verdict was established, by the method named in verification_source; null = never verified."},"profile_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"stale":{"description":"True only for a bounded stale last-known-good observation; stale is never a fresh passed verification.","type":"boolean"},"stale_age_ms":{"description":"Age in milliseconds of the bounded stale observation, when stale is true.","minimum":0,"type":"integer"},"stale_basis":{"description":"Basis of a stale observation: last_positive_after_timeout = the status probe did not answer within its budget and this row store's last positive status answer, still inside its bounded interval, stands in; unpinned pool admission alone may consume it. Absent = the generic last-known-good grace, consumable only by an already selected route.","enum":["last_positive_after_timeout"],"type":"string"},"verification":{"enum":["passed","failed","not_run"],"type":"string"},"verification_source":{"default":"local_store","description":"How the verification verdict was reached: local_store = the binding's required local state or managed secret is present (says nothing about a token being live); vendor = the vendor answered under the exact binding environment and effective platform credential policy.","enum":["local_store","vendor"],"type":"string"}},"required":["profile_id","harness_id","availability","verification"],"type":"object"}},"required":["profile","status"],"type":"object"},"type":"array"},"quota":{"additionalProperties":false,"description":"Fresh quota response used to compute next-up in this exact Accounts snapshot epoch, decorated with the same server-owned availability projection as /v2/quota.","properties":{"absences":{"default":[],"description":"Every registered subject reports a snapshot or a typed absence; a refresh gap may coexist with a stale last-known snapshot.","items":{"additionalProperties":false,"description":"A registered subject's typed quota observation gap; may accompany stale last-known data.","properties":{"detail":{"default":null,"type":["string","null"]},"observed_at":{"format":"date-time","type":"string"},"reason":{"description":"Why a registered subject has no fresh quota snapshot, in the source's own vocabulary.","enum":["not_logged_in","transport_unavailable","platform_unsupported","refresh_failed","no_source","auth_revoked","rate_limited","probe_skipped_rate_limited","poll_paced","credential_profile_ambiguous"],"type":"string"},"retry_after_ms":{"minimum":0,"type":"integer"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"}},"required":["subject","reason","observed_at"],"type":"object"},"type":"array"},"refresh_skipped":{"items":{"additionalProperties":false,"description":"One subject a refresh cycle did not re-fetch because its poll rate-limit cooldown is active, or a retained legacy vendor floor when subject is absent; its snapshots/absences in the same response are last-known registry data.","properties":{"not_before":{"format":"date-time","type":"string"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"},"vendor":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["vendor","not_before"],"type":"object"},"type":"array"},"refreshed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"snapshots":{"items":{"additionalProperties":false,"description":"One vendor-owned quota snapshot plus its derived availability projection.","properties":{"availability":{"additionalProperties":false,"description":"Typed server-owned availability projection derived at the /v2/quota and atomic Accounts response boundaries; absent from raw journal/projection storage.","properties":{"blocking_constraints":{"description":"Ids of the constraints that produced a non-available state.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"model_scoped_exhaustions":{"description":"Every spent/cooling model-scoped window, listed regardless of state so consumers see partial exhaustion without re-deriving constraint scope.","items":{"additionalProperties":false,"description":"A spent or cooling window that applies only to the named models or declared model-id prefixes. Without a requested model only a window that DECLARES it governs the unspecified-model route can exhaust the subject; when the request names a model it covers, it blocks that request too (and is then also listed in blocking_constraints). resets_at is its earliest known release instant (null = unknown).","properties":{"applies_to_model_prefixes":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"applies_to_models":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"constraint_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}},"required":["constraint_id","applies_to_models","resets_at"],"type":"object"},"type":"array"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Earliest known instant at which any blocking constraint may release; null when nothing blocks or no reset is known."},"state":{"description":"Spendability verdict for one snapshot: exhausted = a spent window blocks every applicable request; cooldown = an applicable window is only rate-limit-cooling; available = nothing applicable blocks.","enum":["available","exhausted","cooldown"],"type":"string"}},"required":["state","blocking_constraints","resets_at","model_scoped_exhaustions"],"type":"object"},"constraints":{"items":{"additionalProperties":false,"description":"One independent vendor quota window; without model ids or declared prefixes it applies to every model, and null usage stays unknown.","properties":{"applies_to_model_prefixes":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"applies_to_models":{"anyOf":[{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},{"type":"null"}]},"applies_to_request_kinds":{"description":"Vendor-declared operation scope. Absent applies to both text and image; model scope still applies independently.","items":{"enum":["text","image"],"type":"string"},"minItems":1,"type":"array"},"applies_to_unspecified_model":{"type":"boolean"},"cooldown_until":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null},"id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"label":{"minLength":1,"type":"string"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"used_ratio":{"anyOf":[{"maximum":1,"minimum":0,"type":"number"},{"type":"null"}]},"window_seconds":{"anyOf":[{"exclusiveMinimum":0,"type":"number"},{"type":"null"}]}},"required":["id","label","used_ratio","window_seconds","resets_at"],"type":"object"},"type":"array"},"freshness":{"description":"Freshness of a quota snapshot at read time.","enum":["fresh","stale","unknown"],"type":"string"},"observed_at":{"format":"date-time","type":"string"},"snapshot_id":{"description":"Server-derived stable snapshot identity for consumers; absent from raw journal evidence and optional for legacy responses.","minLength":1,"type":"string"},"source":{"description":"Machine-readable source of quota evidence, classified by schema-owned traits.","enum":["codex_app_server","codex_rollout","claude_statusline","claude_api_retry","claude_oauth_usage","agy_command_usage","cursor_rate_limit","grok_rate_limit","claude_rate_limit_event","codex_app_server_event","codex_image_response"],"type":"string"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"}},"required":["subject","constraints","source","observed_at","freshness"],"type":"object"},"type":"array"}},"required":["snapshots","refreshed_at"],"type":"object"},"quotaEventCursor":{"description":"Opaque global-journal cursor fencing the returned quota response; pass it verbatim as Last-Event-ID only for the dedicated quota event observer, never the general stream.","maxLength":4096,"minLength":1,"type":"string"},"routingEvidence":{"additionalProperties":false,"description":"Model-scoped routing evidence; absent when the engine predates the read or the read failed.","properties":{"capabilities":{"description":"Temporary capability marks; absent from engines that predate them. A mark clears on a success there or a catalog or credential change; after expires_at one operation may probe the account.","items":{"additionalProperties":false,"description":"A temporary capability mark for one account and one model. It only orders auto selection: the account stays enabled and usable as a last fallback.","properties":{"account_fingerprint":{"description":"Provider account identity the mark is bound to; null when the adapter has none.","type":["string","null"]},"expires_at":{"description":"Probe becomes eligible at this time; not a vendor reset.","minLength":1,"type":"string"},"harness_id":{"description":"Harness family of the account.","minLength":1,"type":"string"},"observed_at":{"description":"Start of this mark's episode, when its row was created (a recognized refusal, or the service elsewhere that confirmed an unrecognized one); renewals and probes keep it.","minLength":1,"type":"string"},"profile_id":{"description":"Account row that refused this model before generation started.","minLength":1,"type":"string"},"provider_reason":{"description":"Latest refusal diagnostic, redacted and at most 1024 characters: the provider's reason for a recognized refusal, the engine's message and vendor code otherwise.","type":"string"},"requested_model":{"description":"Model the refused request named.","type":"string"},"state":{"description":"provisional = refused here; confirmed = another account then served the correlated retry; probe_due = expired, the next selection may probe it; probing = one operation holds that probe.","enum":["provisional","confirmed","probe_due","probing"],"type":"string"}},"required":["harness_id","profile_id","requested_model","account_fingerprint","provider_reason","observed_at","expires_at","state"],"type":"object"},"type":"array"},"lastService":{"description":"Latest observed service per registered account and requested model, most recent service first.","items":{"additionalProperties":false,"description":"The latest observed service of one account for one requested model under its current credential binding.","properties":{"harness_id":{"description":"Harness family of the account.","minLength":1,"type":"string"},"observed_at":{"description":"When the account was observed serving that request.","minLength":1,"type":"string"},"profile_id":{"description":"Account row that served the request.","minLength":1,"type":"string"},"requested_model":{"description":"Model the run asked for; null = the harness default model.","type":["string","null"]}},"required":["harness_id","profile_id","requested_model","observed_at"],"type":"object"},"type":"array"},"refusals":{"description":"Live pre-progress refusal observations, each scoped to one requested model.","items":{"additionalProperties":false,"description":"A bounded, self-expiring typed observation that an account refused a started session before any progress; it orders the account pool and never excludes a row.","properties":{"expires_at":{"description":"Self-expiry instant (observation retention, not a vendor reset time); after this the observation is ignored.","minLength":1,"type":"string"},"harness_id":{"description":"Harness family the observed account belongs to.","minLength":1,"type":"string"},"observed_at":{"description":"When the pre-progress refusal was observed.","minLength":1,"type":"string"},"profile_id":{"description":"Account row whose started session was refused before progress.","minLength":1,"type":"string"},"requested_model":{"description":"Model the run asked this account for; null = the harness default model.","type":["string","null"]}},"required":["harness_id","profile_id","requested_model","observed_at","expires_at"],"type":"object"},"type":"array"}},"required":["refusals","lastService"],"type":"object"},"routingEvidenceProblem":{"description":"One diagnostic when the routing-evidence read failed; the account listing is still authoritative.","type":"string"}},"required":["profiles","harnesses","git","quota","quotaEventCursor"],"type":"object"},{"additionalProperties":false,"description":"Atomic Accounts snapshot: profiles, next-up authority, fresh harness readiness, Git capability, and quota from one server-authored epoch.","properties":{"accountPools":{"default":[],"description":"Additive per-harness pool authority of the unified account model: routing facts (next_up incl. the api_key_route kind) live here so legacy strict next_up decoders never see unknown kinds. Old clients ignore this key.","items":{"additionalProperties":false,"description":"Per-harness pool authority (unified account model): who an unpinned run routes to next.","properties":{"harness_id":{"description":"Harness family this pool verdict belongs to.","minLength":1,"type":"string"},"next_up":{"anyOf":[{"additionalProperties":false,"description":"An enabled account row is who an unpinned run routes to next.","properties":{"kind":{"const":"profile","type":"string"},"profileId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["kind","profileId"],"type":"object"},{"additionalProperties":false,"description":"The account pool is empty or exhausted; the unpinned route is the policy-governed API key (INV-061) — a route, never an account row.","properties":{"kind":{"const":"api_key_route","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"description":"An unpinned run has nothing routable, with a human reason.","properties":{"kind":{"const":"none","type":"string"},"reason":{"type":"string"}},"required":["kind","reason"],"type":"object"}],"description":"Server-computed pool routing verdict for one harness's unpinned runs (unified account model)."}},"required":["harness_id","next_up"],"type":"object"},"type":"array"},"git":{"additionalProperties":false,"description":"Git readiness from the same Accounts refresh cycle.","properties":{"detail":{"type":["string","null"]},"remediation":{"type":["string","null"]},"status":{"enum":["available","missing","developer_tools_stub","failed"],"type":"string"},"version":{"type":["string","null"]}},"required":["status","version","detail","remediation"],"type":"object"},"harnessAccounts":{"default":[],"description":"Per-harness accounts authority (INV-135): the native CLI-login pseudo-row state and the server-computed Active identity, so no surface re-derives the accounts symmetry. A unified-model engine emits [] here (the key must stay present for legacy strict clients) and carries routing facts in accountPools instead.","items":{"additionalProperties":false,"description":"Per-harness accounts authority: native CLI-login state + the informational next-up identity.","properties":{"harness_id":{"description":"Harness family these accounts belong to.","minLength":1,"type":"string"},"identity":{"anyOf":[{"additionalProperties":false,"description":"Non-secret {email, plan} identity of one account, derived daemon-side from a sanctioned scoped credential source or an allowlisted harness CLI status observation; never carries raw status or token material.","properties":{"email":{"description":"Login email of the account (codex id_token `email`, claude oauthAccount `emailAddress`, or an allowlisted harness CLI status observation).","minLength":1,"type":"string"},"plan":{"description":"Subscription/plan label (codex `chatgpt_plan_type` / claude oauthAccount `organizationType`).","minLength":1,"type":"string"}},"type":"object"},{"type":"null"}],"default":null,"description":"Non-secret {email, plan} of the native/CLI login, derived daemon-side from a sanctioned credential source or allowlisted harness CLI status observation; null when absent/undisclosed."},"native_credentials_enabled":{"description":"Whether the native/CLI login participates in this harness's credential ladder.","type":"boolean"},"native_login_detected":{"description":"Whether a native/default vendor login is currently detected available (the CLI login pseudo-row state).","type":"boolean"},"next_up":{"anyOf":[{"additionalProperties":false,"description":"An enabled credential profile is who an unpinned run routes to next.","properties":{"kind":{"const":"profile","type":"string"},"profileId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["kind","profileId"],"type":"object"},{"additionalProperties":false,"description":"The unprofiled/default credential is the subject of an unpinned run.","properties":{"kind":{"const":"native","type":"string"},"route":{"description":"Effective route of the unprofiled/default subject; omitted by older daemons.","enum":["local_session","api_key"],"type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"description":"An unpinned run has nothing routable (the default credential is disabled and no account is pinned).","properties":{"kind":{"const":"none","type":"string"},"reason":{"type":"string"}},"required":["kind","reason"],"type":"object"}],"description":"Server-computed identity an unpinned run of this harness would route to next."}},"required":["harness_id","native_credentials_enabled","native_login_detected","next_up"],"type":"object"},"type":"array"},"harnesses":{"description":"Fresh harness readiness used for the account next-up projection.","items":{"additionalProperties":false,"description":"Doctor-backed status row for one harness: status, intents, checks, and configured-model validity.","properties":{"authSources":{"default":[],"description":"Doctor-backed readiness by authentication source; an empty array means readiness was not reported.","items":{"additionalProperties":false,"description":"Doctor-backed readiness for one exact credential source.","properties":{"availability":{"enum":["available","unavailable","unknown"],"type":"string"},"detail":{"description":"Redacted human-readable source evidence.","type":"string"},"source":{"description":"Concrete credential source used or probed by a harness.","enum":["native_session","oauth_token_env","api_key_env","api_key_flag","provider_auth_file","none"],"type":"string"},"verification":{"enum":["passed","failed","not_run"],"type":"string"}},"required":["source","availability","verification"],"type":"object"},"type":"array"},"checks":{"default":[],"description":"Doctor probe results.","items":{"additionalProperties":false,"description":"Result of a conformance probe for one capability check.","properties":{"detail":{"description":"Human-readable detail for the outcome.","type":"string"},"duration_ms":{"description":"How long the check took, in milliseconds.","minimum":0,"type":"integer"},"id":{"description":"Check id.","type":"string"},"status":{"description":"Outcome of the check: pass, fail, or skip.","enum":["pass","fail","skip"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"configuredModel":{"default":null,"description":"The user's configured per-harness default model, if any.","type":["string","null"]},"configuredModelCheck":{"anyOf":[{"additionalProperties":false,"properties":{"message":{"default":null,"description":"Actionable rejection message, when rejected.","type":["string","null"]},"status":{"description":"Whether the configured model is admitted (listed, or unlisted on an advisory harness) or refused by an authoritative list.","enum":["ok","rejected"],"type":"string"}},"required":["status"],"type":"object"},{"type":"null"}],"default":null,"description":"Truth-source check of configuredModel under the harness's own absence declaration; ok with a message is an advisory admission; null when no model is configured."},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate capability projection for one harness and installed runtime.","properties":{"available":{"description":"Whether this harness can receive the packaged delegation belt.","type":"boolean"},"reason":{"description":"Stable reason for the current delegation capability verdict.","enum":["ready","runtime_unavailable","manifest_unsupported"],"type":"string"},"remediation":{"default":null,"description":"Concrete update/repair guidance when unavailable; null when ready.","type":["string","null"]},"requiresFullAccess":{"default":false,"description":"Whether this harness can reach the belt only under a full-access profile.","type":"boolean"}},"required":["available","reason"],"type":"object"},{"type":"null"}],"default":null,"description":"Engine-owned Delegate capability for this harness and installed runtime; null on legacy status rows."},"disabledIntents":{"default":[],"description":"Intents the doctor disabled.","items":{"type":"string"},"type":"array"},"enabledIntents":{"default":[],"description":"Intents the gateway will route to this harness.","items":{"type":"string"},"type":"array"},"id":{"description":"Harness id.","type":"string"},"manifest":{"anyOf":[{"additionalProperties":false,"description":"Static manifest an adapter declares for its harness: identity, kind, capabilities, auth modes, and access profiles.","properties":{"access_profiles_supported":{"default":[],"description":"Access profiles the adapter can enforce.","items":{"description":"Active filesystem/command access profile for a run: readonly (no writes), workspace_write (use the harness's native workspace-write policy), full (unrestricted; requires the per-repo trust allow for a run an operator starts at a surface, not for an execution.delegated run), inherit_native (defer to the harness's own native settings).","enum":["readonly","workspace_write","full","inherit_native"],"type":"string"},"type":"array"},"adapter_version":{"description":"Version of the Claudexor adapter itself.","type":"string"},"auth_modes":{"default":[],"description":"Auth modes the harness supports (availability only, not readiness).","items":{"enum":["local_session","api_key","none"],"type":"string"},"type":"array"},"capabilities":{"additionalProperties":false,"description":"Declared harness capabilities the engine actually consumes for intent gating, routing, knob support, and disclosure.","properties":{"browser_tool":{"default":false,"description":"The adapter can inject a browser-automation MCP server (Playwright MCP) the harness drives as browser_* tools; never injected when web policy is off.","type":"boolean"},"create_from_scratch":{"default":false,"description":"The harness can scaffold new projects (create_from_scratch intent).","type":"boolean"},"effort_levels":{"default":[],"description":"Ordered (weakest to strongest) reasoning-effort levels this harness accepts across all its models; empty means effort is not a tunable surface.","items":{"description":"Cross-harness reasoning-effort level as a lowercase slug (open vocabulary, mirroring the vendor contract); adapters advertise the levels they accept per model, ordered weakest to strongest by the vendor itself, and a shared normalizer passes advertised levels through, clamps inside the vendor order, places a word the vendor order lacks by the shared preference order (none < minimal < low < medium < high < xhigh < max < ultra) onto an advertised level, and refuses words neither order places.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"type":"array"},"effort_levels_verified_against":{"default":null,"description":"Vendor CLI version the effort ladders were last verified against; null = never verified / not applicable.","type":["string","null"]},"implement":{"default":false,"description":"The harness can implement code changes (implement intent).","type":"boolean"},"implementation_transport":{"default":"workspace","description":"Typed producer/consumer transport used when implement=true.","enum":["workspace","git_patch_envelope"],"type":"string"},"interactive":{"default":false,"description":"The adapter can surface interactive user questions (interaction_requested events) and deliver typed answers back into the live session.","type":"boolean"},"json_schema_output":{"default":false,"description":"The harness can constrain its final message to a caller-supplied JSON Schema (native structured-output flag).","type":"boolean"},"known_models":{"default":[],"description":"Manifest-declared model ids/aliases this harness accepts (bare string = every credential route; object form scopes a model to specific routes), used as the model truth source when the adapter has no live inventory and judged under model_inventory_absence: an authoritative harness refuses an explicit model outside it, an advisory harness forwards it with a note.","items":{"anyOf":[{"type":"string"},{"additionalProperties":false,"properties":{"id":{"description":"Model id/alias.","minLength":1,"type":"string"},"routes":{"description":"Credential routes this model is available on.","items":{"enum":["local_session","api_key"],"type":"string"},"minItems":1,"type":"array"}},"required":["id","routes"],"type":"object"}]},"type":"array"},"known_models_verified_against":{"default":null,"description":"Vendor CLI version the known_models hints were last verified against; null = never verified / not applicable.","type":["string","null"]},"max_turns":{"default":false,"description":"Honors HarnessRunSpec.max_turns (e.g. a native --max-turns flag).","type":"boolean"},"model_effort_levels":{"additionalProperties":{"additionalProperties":false,"description":"Reasoning-effort vocabulary a single model advertises.","properties":{"default":{"anyOf":[{"description":"Cross-harness reasoning-effort level as a lowercase slug (open vocabulary, mirroring the vendor contract); adapters advertise the levels they accept per model, ordered weakest to strongest by the vendor itself, and a shared normalizer passes advertised levels through, clamps inside the vendor order, places a word the vendor order lacks by the shared preference order (none < minimal < low < medium < high < xhigh < max < ultra) onto an advertised level, and refuses words neither order places.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},{"type":"null"}],"default":null,"description":"The effort level the vendor uses for this model when none is requested."},"levels":{"default":[],"description":"Ordered (weakest to strongest) reasoning-effort levels this model advertises, in the vendor's own order.","items":{"description":"Cross-harness reasoning-effort level as a lowercase slug (open vocabulary, mirroring the vendor contract); adapters advertise the levels they accept per model, ordered weakest to strongest by the vendor itself, and a shared normalizer passes advertised levels through, clamps inside the vendor order, places a word the vendor order lacks by the shared preference order (none < minimal < low < medium < high < xhigh < max < ultra) onto an advertised level, and refuses words neither order places.","maxLength":32,"minLength":1,"pattern":"^[a-z0-9]+(?:[_-][a-z0-9]+)*$","type":"string"},"type":"array"}},"type":"object"},"default":{},"description":"Per-model advertised reasoning-effort vocabulary keyed by model id; a model absent here falls back to the harness-wide effort_levels union.","type":"object"},"model_inventory_absence":{"description":"Whether an absence from this harness's model lists (the live models() answer and the manifest known_models alike) proves a model is ABSENT; omitted = authoritative (an unlisted model is refused). advisory = absence is not proof, so an explicit model is forwarded to the vendor and disclosed instead of refused.","enum":["authoritative","advisory"],"type":"string"},"model_inventory_routes":{"description":"Credential routes supported by the adapter's live models() producer; omitted preserves all-route support. Other routes use manifest known_models, never another account's live inventory.","items":{"enum":["local_session","api_key"],"type":"string"},"minItems":1,"type":"array"},"plan":{"default":false,"description":"The harness can produce plans (plan intent).","type":"boolean"},"processing_preferences":{"description":"Service preferences translated by this adapter; model/account support is separate.","items":{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},"type":"array"},"read_files":{"default":false,"description":"The harness can read project files.","type":"boolean"},"review":{"default":false,"description":"The harness can act as a reviewer (review intent).","type":"boolean"},"structured_output_channel":{"default":"final_message","description":"Where a schema-constrained answer surfaces: side_tool (rides a tool; final message stays markdown) or final_message (constrains the final message itself).","enum":["side_tool","final_message"],"type":"string"},"synthesize":{"default":false,"description":"The harness can synthesize across candidate outputs (synthesize intent).","type":"boolean"},"tool_lists":{"default":false,"description":"Honors tool_permission_policy allow/deny lists (e.g. a native --allowedTools flag).","type":"boolean"},"verify":{"default":false,"description":"The harness can act as the FinalVerifier (verify intent).","type":"boolean"},"web_policy":{"default":"none","description":"How a harness can honor the external web policy: native (a native config surface), tools (permissioned tools the adapter can allow/deny), uncontrolled (can reach the web but exposes no enforceable switch), or none (no web access at all).","enum":["native","tools","uncontrolled","none"],"type":"string"},"work_report_transport":{"default":"unsupported","description":"How the harness carries the D-16 WorkReport envelope: constrained (native schema transport), validated (instructed terminal metadata), or unsupported (work_state stays unverified).","enum":["constrained","validated","unsupported"],"type":"string"}},"type":"object"},"capability_profile":{"additionalProperties":false,"default":{},"description":"Structured per-harness facts the engine consumes: auth routing, isolation containment, readonly mechanism, finite attachment inputs, MCP injection, live input into a running session, and translated prompt-cache lifetimes.","properties":{"access_control":{"additionalProperties":false,"default":{},"description":"Declared access-control facts for a harness.","properties":{"auxiliary_writable_roots":{"default":false,"description":"The adapter applies HarnessRunSpec.auxiliary_writable_roots natively under workspace_write, and a later spec carrying none receives no earlier grant; false = such a lane refuses (explicit pool) or is filtered (auto pool).","type":"boolean"},"readonly_mechanism":{"default":"none","description":"How read-only access is enforced for a harness: a filesystem sandbox, permission denial, a tool allowlist, or none (read-only intent is advisory).","enum":["fs_sandbox","permission_deny","tool_allowlist","none"],"type":"string"},"write_mechanism":{"default":"none","description":"How workspace_write access is CONFINED for a harness: a filesystem/network base sandbox (codex seatbelt; the harness's native automatic reviewer may still admit individual actions outside it, so fs_sandbox does not mean every admitted action stays inside), a tool-permission policy with no FS/network fence (claude — an allowed shell is unconfined), or none (write intent is advisory).","enum":["fs_sandbox","tool_policy","none"],"type":"string"}},"type":"object"},"attachment_inputs":{"default":[],"items":{"additionalProperties":false,"description":"Finite MIME, size, count and transport limits declared by one adapter.","properties":{"kind":{"description":"Kind of attached resource: image input or generic file bytes.","enum":["image","file"],"type":"string"},"max_bytes":{"exclusiveMinimum":0,"type":"integer"},"max_count":{"exclusiveMinimum":0,"type":"integer"},"mime_types":{"items":{"minLength":1,"type":"string"},"minItems":1,"type":"array"},"transport":{"description":"Native adapter transport used for one supported attachment class.","enum":["file_path","base64_stream","base64_inline","text_inline"],"type":"string"}},"required":["kind","mime_types","max_bytes","max_count","transport"],"type":"object"},"type":"array"},"auth":{"additionalProperties":false,"default":{},"description":"Declared auth routing facts for a harness.","properties":{"credential_profile_policies":{"description":"Platform-specific profile identity/cardinality/cleanup policy; absent uses the backward-compatible profile-scoped, unbounded, Claudexor-owned defaults.","items":{"additionalProperties":false,"description":"Platform-specific identity scope, enabled-profile cardinality, and credential cleanup ownership for one auth source.","properties":{"cleanup_owner":{"description":"Who owns cleanup of the credential when its Claudexor profile binding is removed.","enum":["claudexor","vendor"],"type":"string"},"identity_scope":{"description":"Identity boundary selected by a credential profile: the named profile itself or the host OS user/login vault.","enum":["profile","os_user"],"type":"string"},"max_enabled_profiles":{"anyOf":[{"exclusiveMinimum":0,"type":"integer"},{"type":"null"}],"description":"Maximum enabled profile bindings on these platforms; null means unbounded."},"platforms":{"description":"Nonempty host-platform set governed by this policy row.","items":{"description":"Host platform used to resolve credential and managed-login policy.","enum":["darwin","linux","win32"],"type":"string"},"minItems":1,"type":"array"},"source":{"description":"Concrete credential source used or probed by a harness.","enum":["native_session","oauth_token_env","api_key_env","api_key_flag","provider_auth_file","none"],"type":"string"}},"required":["source","platforms","identity_scope","max_enabled_profiles","cleanup_owner"],"type":"object"},"type":"array"},"credential_transports":{"default":[],"description":"Declared credential transports per auth source.","items":{"additionalProperties":false,"description":"How a credential from one auth source physically reaches the harness process.","properties":{"kind":{"description":"Mechanism that carries a credential to the harness process (config file, env var, OAuth token env, OS keychain, HTTP header, or none).","enum":["config_file","env_var","oauth_token_env","os_keychain","http_header","none"],"type":"string"},"platforms":{"description":"Host platforms on which this physical credential transport applies; absent means every supported platform for backward compatibility.","items":{"description":"Host platform used to resolve credential and managed-login policy.","enum":["darwin","linux","win32"],"type":"string"},"minItems":1,"type":"array"},"relocatable_by":{"default":[],"description":"Relocation levers that can move this transport into a scoped environment.","items":{"description":"Which relocation lever moves the credential into a scoped environment (HOME, a config dir override, env injection, or none).","enum":["HOME","CONFIG_DIR","ENV","none"],"type":"string"},"type":"array"},"source":{"description":"Concrete credential source used or probed by a harness.","enum":["native_session","oauth_token_env","api_key_env","api_key_flag","provider_auth_file","none"],"type":"string"}},"required":["source","kind"],"type":"object"},"type":"array"},"managed_login":{"anyOf":[{"additionalProperties":false,"description":"Managed-login input requirement; command, argv, flow, and time window remain owned by the native-login registry.","properties":{"stdin":{"description":"Input transport the vendor login command requires.","enum":["none","pipe","terminal"],"type":"string"}},"required":["stdin"],"type":"object"},{"type":"null"}],"description":"Managed subscription-login input requirement; null means this harness defines no managed login, absent is a legacy manifest."},"preferred_source":{"anyOf":[{"description":"Concrete credential source used or probed by a harness.","enum":["native_session","oauth_token_env","api_key_env","api_key_flag","provider_auth_file","none"],"type":"string"},{"type":"null"}],"default":null,"description":"Auth source the adapter prefers; null when it has no preference."},"supported_sources":{"default":[],"description":"Auth sources this harness supports.","items":{"description":"Concrete credential source used or probed by a harness.","enum":["native_session","oauth_token_env","api_key_env","api_key_flag","provider_auth_file","none"],"type":"string"},"type":"array"}},"type":"object"},"input_limits":{"items":{"additionalProperties":false,"description":"Adapter-owned observed input bound, not a predictive refusal or a model-window claim.","properties":{"limit":{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"},"verified_against":{"description":"Native runtime version against which the bound was observed.","minLength":1,"type":"string"}},"required":["scope","unit","limit","source","verified_against"],"type":"object"},"type":"array"},"isolation":{"additionalProperties":false,"default":{},"description":"Declared isolation containment facts for a harness.","properties":{"supported_containment":{"default":["env_or_file_injection"],"description":"Containment mechanisms the adapter can run under.","items":{"description":"Isolation containment level an adapter supports for run environments, from env/file injection through scoped-HOME keychain bridging or a private per-profile keychain to process sandboxes and containers.","enum":["env_or_file_injection","scoped_home_keychain_bridge","private_per_profile_keychain","host_user_context","process_sandbox","container"],"type":"string"},"type":"array"}},"type":"object"},"live_input":{"default":"none","description":"How a live message enters a running session: mid_turn (consumed inside the active turn), next_tool_boundary (queued until the same turn's next tool boundary), none (no truthful channel; the engine answers unsupported).","enum":["mid_turn","next_tool_boundary","none"],"type":"string"},"mcp_injection":{"default":false,"description":"The adapter can inject engine-owned MCP servers into the harness sandbox (browser tool, delegation belt); false = browser MCP is refused and Delegate degrades to ordinary Agent with a durable typed receipt.","type":"boolean"},"mcp_injection_requires_full_access":{"default":false,"description":"An injected MCP server can only reach the daemon (belt) at full access; below it the harness sandbox cancels the call. true => Delegate below full access degrades to ordinary Agent with a durable typed receipt.","type":"boolean"},"prompt_cache_ttls":{"description":"Prompt-cache lifetimes this adapter translates into native controls; a requested lifetime outside the list (or with the list absent) is disclosed as ignored.","items":{"description":"Native prompt-cache lifetime for the main conversation and helper requests of a harness that declares it. Omission sends no override: native defaults, profile settings and the inherited environment stay in effect.","enum":["5m","1h"],"type":"string"},"type":"array"}},"type":"object"},"display_name":{"description":"Human display name of the harness.","type":"string"},"id":{"description":"Harness id (codex, claude, cursor, opencode, raw-api, ...).","minLength":1,"type":"string"},"kind":{"description":"Kind of harness adapter: a local vendor CLI, a remote API, or a fake used for tests.","enum":["local_cli","remote_api","fake"],"type":"string"},"provider_family":{"default":"unknown","description":"Vendor/provider family a harness routes to, used for route-diversity reasoning; open-ended via \"unknown\".","enum":["openai","anthropic","google","cursor","opencode","xai","local","unknown"],"type":"string"},"version":{"description":"Vendor CLI/API version, when discovered.","type":"string"}},"required":["id","display_name","kind","capabilities"],"type":"object"},{"type":"null"}],"description":"The harness's declared manifest, when available."},"readiness":{"default":[],"description":"Display-ready readiness checks, daemon-normalized from the raw evidence.","items":{"additionalProperties":false,"description":"One display-ready readiness check row (daemon-normalized).","properties":{"detail":{"default":null,"description":"Redacted human-readable evidence for the outcome.","type":["string","null"]},"id":{"description":"Stable machine id of the check (adapter probe id or auth source).","type":"string"},"kind":{"description":"What KIND of readiness this is: binary presence, credential source, isolated smoke, configured-model validity, or a generic capability probe.","enum":["binary","auth","smoke","model","probe"],"type":"string"},"status":{"description":"Outcome; skip = not run / not applicable.","enum":["pass","fail","skip"],"type":"string"},"title":{"description":"Human display name of the check.","type":"string"}},"required":["id","kind","title","status"],"type":"object"},"type":"array"},"reasons":{"default":[],"description":"Human-readable reasons for degraded/unavailable status.","items":{"type":"string"},"type":"array"},"routableIntents":{"default":[],"description":"Intents the harness is actually routable for right now (doctor-gated); the server-side availability truth surfaces must read instead of re-deriving.","items":{"type":"string"},"type":"array"},"setupLogin":{"anyOf":[{"additionalProperties":false,"description":"Effective setup-login flow for this harness on the current host.","properties":{"mode":{"description":"in_app requests the daemon-hosted login flow; external_terminal requests the existing client PTY flow.","enum":["in_app","external_terminal"],"type":"string"}},"required":["mode"],"type":"object"},{"type":"null"}],"description":"Effective setup-login flow for this harness on the current host; current producers emit null or an object, while omission identifies a legacy row."},"status":{"description":"Doctor verdict for a harness: ok (usable), degraded (usable with limitations), or unavailable.","enum":["ok","degraded","unavailable"],"type":"string"}},"required":["id","status"],"type":"object"},"type":"array"},"profiles":{"description":"Every registered credential profile paired with its doctor readiness projection and non-secret identity.","items":{"additionalProperties":false,"properties":{"identity":{"anyOf":[{"additionalProperties":false,"description":"Non-secret {email, plan} identity of one account, derived daemon-side from a sanctioned scoped credential source or an allowlisted harness CLI status observation; never carries raw status or token material.","properties":{"email":{"description":"Login email of the account (codex id_token `email`, claude oauthAccount `emailAddress`, or an allowlisted harness CLI status observation).","minLength":1,"type":"string"},"plan":{"description":"Subscription/plan label (codex `chatgpt_plan_type` / claude oauthAccount `organizationType`).","minLength":1,"type":"string"}},"type":"object"},{"type":"null"}],"default":null,"description":"Non-secret {email, plan} of this profile, derived daemon-side from its scoped credential source or allowlisted harness CLI status observation; null when absent/undisclosed."},"profile":{"additionalProperties":false,"description":"Durable non-secret named binding for one harness; credential material may live in Claudexor-owned scoped state, a managed secret store, or a platform-declared vendor/OS-user store, never in this row.","properties":{"created_at":{"anyOf":[{"description":"ISO-8601 timestamp string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"When the profile was registered; null for hand-written config entries."},"credential_kind":{"description":"Binding kind for a profile: Claudexor-owned scoped vendor state, a managed OAuth secret, or a managed API-key secret; a vendor OS-user credential may remain outside that state.","enum":["config_dir_login","oauth_token","api_key"],"type":"string"},"display_name":{"description":"Human label shown wherever the profile appears.","minLength":1,"type":"string"},"enabled":{"default":true,"description":"Disabled profiles are never routable.","type":"boolean"},"harness_id":{"description":"Harness family this profile belongs to.","minLength":1,"type":"string"},"isolation_locator":{"default":null,"description":"Canonical absolute path to Claudexor-owned scoped vendor state for config_dir_login bindings; null for secret-ref kinds.","type":["string","null"]},"profile_id":{"description":"Stable user-chosen profile identifier (unique per harness).","minLength":1,"type":"string"},"secret_ref":{"default":null,"description":"Namespaced secret-store name (e.g. claude_oauth:work) for oauth_token/api_key profiles; null for config_dir_login.","type":["string","null"]}},"required":["profile_id","harness_id","display_name","credential_kind"],"type":"object"},"status":{"additionalProperties":false,"description":"Doctor-owned readiness projection for one credential profile; never durable config.","properties":{"availability":{"enum":["available","unavailable","unknown"],"type":"string"},"detail":{"description":"Redacted human-readable probe evidence.","type":"string"},"harness_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"last_verified_at":{"anyOf":[{"description":"ISO-8601 timestamp string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"When the verification verdict was established, by the method named in verification_source; null = never verified."},"profile_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"stale":{"description":"True only for a bounded stale last-known-good observation; stale is never a fresh passed verification.","type":"boolean"},"stale_age_ms":{"description":"Age in milliseconds of the bounded stale observation, when stale is true.","minimum":0,"type":"integer"},"stale_basis":{"description":"Basis of a stale observation: last_positive_after_timeout = the status probe did not answer within its budget and this row store's last positive status answer, still inside its bounded interval, stands in; unpinned pool admission alone may consume it. Absent = the generic last-known-good grace, consumable only by an already selected route.","enum":["last_positive_after_timeout"],"type":"string"},"verification":{"enum":["passed","failed","not_run"],"type":"string"},"verification_source":{"default":"local_store","description":"How the verification verdict was reached: local_store = the binding's required local state or managed secret is present (says nothing about a token being live); vendor = the vendor answered under the exact binding environment and effective platform credential policy.","enum":["local_store","vendor"],"type":"string"}},"required":["profile_id","harness_id","availability","verification"],"type":"object"}},"required":["profile","status"],"type":"object"},"type":"array"},"quota":{"additionalProperties":false,"description":"Current quota snapshots without a fabricated aggregate.","properties":{"absences":{"default":[],"description":"Every registered subject reports a snapshot or a typed absence; a refresh gap may coexist with a stale last-known snapshot.","items":{"additionalProperties":false,"description":"A registered subject's typed quota observation gap; may accompany stale last-known data.","properties":{"detail":{"default":null,"type":["string","null"]},"observed_at":{"format":"date-time","type":"string"},"reason":{"description":"Why a registered subject has no fresh quota snapshot, in the source's own vocabulary.","enum":["not_logged_in","transport_unavailable","platform_unsupported","refresh_failed","no_source","auth_revoked","rate_limited","probe_skipped_rate_limited","poll_paced","credential_profile_ambiguous"],"type":"string"},"retry_after_ms":{"minimum":0,"type":"integer"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"}},"required":["subject","reason","observed_at"],"type":"object"},"type":"array"},"refresh_skipped":{"items":{"additionalProperties":false,"description":"One subject a refresh cycle did not re-fetch because its poll rate-limit cooldown is active, or a retained legacy vendor floor when subject is absent; its snapshots/absences in the same response are last-known registry data.","properties":{"not_before":{"format":"date-time","type":"string"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"},"vendor":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["vendor","not_before"],"type":"object"},"type":"array"},"refreshed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"resources":{"items":{"additionalProperties":false,"properties":{"balances":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"amount":{"type":["string","null"]},"currency":{"type":["string","null"]},"decimal_places":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"fee_included":{"description":"Whether the reported amount includes fees; null means the source did not establish this.","type":["boolean","null"]},"has_balance":{"type":["boolean","null"]},"id":{"type":"string"},"label":{"type":"string"},"period":{"additionalProperties":false,"properties":{"ends_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"starts_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}},"required":["starts_at","ends_at"],"type":"object"},"scope":{"enum":["personal","team"],"type":"string"},"unit":{"type":"string"},"unlimited":{"type":["boolean","null"]},"usage_kind":{"enum":["included","bonus","on_demand","total"],"type":"string"}},"required":["id","label","amount","unit","currency","decimal_places","has_balance","unlimited"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"diagnostics":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"code":{"type":"string"},"detail":{"type":["string","null"]}},"required":["code","detail"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"resets":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"available_count":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"description":{"type":["string","null"]},"eligible":{"type":["boolean","null"]},"grants":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"available_count":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"clears":{"items":{"type":"string"},"type":"array"},"description":{"type":["string","null"]},"expires_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"id":{"type":"string"},"label":{"type":"string"},"starts_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"total_count":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"usable_now":{"type":["boolean","null"]}},"required":["id","label","description","available_count","total_count","usable_now","starts_at","expires_at","clears"],"type":"object"},"type":"array"},{"type":"null"}]},"id":{"type":"string"},"kind":{"enum":["granted_reset","session_refill"],"type":"string"},"label":{"type":"string"},"reason":{"type":["string","null"]},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"usable_now":{"type":["boolean","null"]},"weekly_limit_applies":{"type":"boolean"}},"required":["id","kind","label","description","available_count","eligible","usable_now","reason","resets_at","weekly_limit_applies","grants"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"spending":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"currency":{"type":["string","null"]},"decimal_places":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"enabled":{"type":["boolean","null"]},"fee_included":{"description":"Whether the reported amount includes fees; null means the source did not establish this.","type":["boolean","null"]},"id":{"type":"string"},"label":{"type":"string"},"limit":{"type":["string","null"]},"period":{"additionalProperties":false,"properties":{"ends_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"starts_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}},"required":["starts_at","ends_at"],"type":"object"},"reason":{"type":["string","null"]},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"scope":{"enum":["personal","team"],"type":"string"},"unit":{"type":"string"},"usage_kind":{"enum":["included","bonus","on_demand","total"],"type":"string"},"used":{"type":["string","null"]}},"required":["id","label","enabled","used","limit","unit","currency","decimal_places","resets_at","reason"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"target":{"additionalProperties":false,"properties":{"harness":{"minLength":1,"type":"string"},"profile_id":{"minLength":1,"type":"string"}},"required":["harness","profile_id"],"type":"object"}},"required":["target","balances","spending","resets","diagnostics"],"type":"object"},"type":"array"},"snapshots":{"items":{"additionalProperties":false,"description":"One vendor-owned quota snapshot plus its derived availability projection.","properties":{"availability":{"additionalProperties":false,"description":"Typed server-owned availability projection derived at the /v2/quota and atomic Accounts response boundaries; absent from raw journal/projection storage.","properties":{"blocking_constraints":{"description":"Ids of the constraints that produced a non-available state.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"model_scoped_exhaustions":{"description":"Every spent/cooling model-scoped window, listed regardless of state so consumers see partial exhaustion without re-deriving constraint scope.","items":{"additionalProperties":false,"description":"A spent or cooling window that applies only to the named models or declared model-id prefixes. Without a requested model only a window that DECLARES it governs the unspecified-model route can exhaust the subject; when the request names a model it covers, it blocks that request too (and is then also listed in blocking_constraints). resets_at is its earliest known release instant (null = unknown).","properties":{"applies_to_model_prefixes":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"applies_to_models":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"constraint_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}},"required":["constraint_id","applies_to_models","resets_at"],"type":"object"},"type":"array"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Earliest known instant at which any blocking constraint may release; null when nothing blocks or no reset is known."},"state":{"description":"Spendability verdict for one snapshot: exhausted = a spent window blocks every applicable request; cooldown = an applicable window is only rate-limit-cooling; available = nothing applicable blocks.","enum":["available","exhausted","cooldown"],"type":"string"}},"required":["state","blocking_constraints","resets_at","model_scoped_exhaustions"],"type":"object"},"constraints":{"items":{"additionalProperties":false,"description":"One independent vendor quota window; without model ids or declared prefixes it applies to every model, and null usage stays unknown.","properties":{"applies_to_model_prefixes":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"applies_to_models":{"anyOf":[{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},{"type":"null"}]},"applies_to_request_kinds":{"description":"Vendor-declared operation scope. Absent applies to both text and image; model scope still applies independently.","items":{"enum":["text","image"],"type":"string"},"minItems":1,"type":"array"},"applies_to_unspecified_model":{"type":"boolean"},"cooldown_until":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null},"id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"label":{"minLength":1,"type":"string"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"used_ratio":{"anyOf":[{"maximum":1,"minimum":0,"type":"number"},{"type":"null"}]},"window_seconds":{"anyOf":[{"exclusiveMinimum":0,"type":"number"},{"type":"null"}]}},"required":["id","label","used_ratio","window_seconds","resets_at"],"type":"object"},"type":"array"},"freshness":{"description":"Freshness of a quota snapshot at read time.","enum":["fresh","stale","unknown"],"type":"string"},"observed_at":{"format":"date-time","type":"string"},"snapshot_id":{"description":"Server-derived stable snapshot identity for consumers; absent from raw journal evidence and optional for legacy responses.","minLength":1,"type":"string"},"source":{"description":"Machine-readable source of quota evidence, classified by schema-owned traits.","enum":["codex_app_server","codex_rollout","claude_statusline","claude_api_retry","claude_oauth_usage","agy_command_usage","cursor_rate_limit","grok_rate_limit","claude_rate_limit_event","codex_app_server_event","codex_image_response"],"type":"string"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"}},"required":["subject","constraints","source","observed_at","freshness"],"type":"object"},"type":"array"}},"required":["snapshots","refreshed_at","resources"],"type":"object"},"quotaEventCursor":{"description":"Opaque global-journal cursor fencing the returned quota response; pass it verbatim as Last-Event-ID only for the dedicated quota event observer, never the general stream.","maxLength":4096,"minLength":1,"type":"string"},"routingEvidence":{"additionalProperties":false,"description":"Model-scoped routing evidence; absent when the engine predates the read or the read failed.","properties":{"capabilities":{"description":"Temporary capability marks; absent from engines that predate them. A mark clears on a success there or a catalog or credential change; after expires_at one operation may probe the account.","items":{"additionalProperties":false,"description":"A temporary capability mark for one account and one model. It only orders auto selection: the account stays enabled and usable as a last fallback.","properties":{"account_fingerprint":{"description":"Provider account identity the mark is bound to; null when the adapter has none.","type":["string","null"]},"expires_at":{"description":"Probe becomes eligible at this time; not a vendor reset.","minLength":1,"type":"string"},"harness_id":{"description":"Harness family of the account.","minLength":1,"type":"string"},"observed_at":{"description":"Start of this mark's episode, when its row was created (a recognized refusal, or the service elsewhere that confirmed an unrecognized one); renewals and probes keep it.","minLength":1,"type":"string"},"profile_id":{"description":"Account row that refused this model before generation started.","minLength":1,"type":"string"},"provider_reason":{"description":"Latest refusal diagnostic, redacted and at most 1024 characters: the provider's reason for a recognized refusal, the engine's message and vendor code otherwise.","type":"string"},"requested_model":{"description":"Model the refused request named.","type":"string"},"state":{"description":"provisional = refused here; confirmed = another account then served the correlated retry; probe_due = expired, the next selection may probe it; probing = one operation holds that probe.","enum":["provisional","confirmed","probe_due","probing"],"type":"string"}},"required":["harness_id","profile_id","requested_model","account_fingerprint","provider_reason","observed_at","expires_at","state"],"type":"object"},"type":"array"},"lastService":{"description":"Latest observed service per registered account and requested model, most recent service first.","items":{"additionalProperties":false,"description":"The latest observed service of one account for one requested model under its current credential binding.","properties":{"harness_id":{"description":"Harness family of the account.","minLength":1,"type":"string"},"observed_at":{"description":"When the account was observed serving that request.","minLength":1,"type":"string"},"profile_id":{"description":"Account row that served the request.","minLength":1,"type":"string"},"requested_model":{"description":"Model the run asked for; null = the harness default model.","type":["string","null"]}},"required":["harness_id","profile_id","requested_model","observed_at"],"type":"object"},"type":"array"},"refusals":{"description":"Live pre-progress refusal observations, each scoped to one requested model.","items":{"additionalProperties":false,"description":"A bounded, self-expiring typed observation that an account refused a started session before any progress; it orders the account pool and never excludes a row.","properties":{"expires_at":{"description":"Self-expiry instant (observation retention, not a vendor reset time); after this the observation is ignored.","minLength":1,"type":"string"},"harness_id":{"description":"Harness family the observed account belongs to.","minLength":1,"type":"string"},"observed_at":{"description":"When the pre-progress refusal was observed.","minLength":1,"type":"string"},"profile_id":{"description":"Account row whose started session was refused before progress.","minLength":1,"type":"string"},"requested_model":{"description":"Model the run asked this account for; null = the harness default model.","type":["string","null"]}},"required":["harness_id","profile_id","requested_model","observed_at","expires_at"],"type":"object"},"type":"array"}},"required":["refusals","lastService"],"type":"object"},"routingEvidenceProblem":{"description":"One diagnostic when the routing-evidence read failed; the account listing is still authoritative.","type":"string"}},"required":["profiles","harnesses","git","quota","quotaEventCursor"],"type":"object"}],"description":"Accounts listing or atomic snapshot joined with model-scoped routing evidence.","type":"object"}},{"annotations":{"readOnlyHint":true},"description":"Read typed account balances, spending, reset offers and quota. refresh:true requests provider data; target selects one exact registered account, including a disabled portable profile. No login or spending-policy change.","inputSchema":{"additionalProperties":false,"properties":{"model":{"type":"string"},"refresh":{"type":"boolean"},"target":{"additionalProperties":false,"properties":{"harness":{"minLength":1,"type":"string"},"profile_id":{"minLength":1,"type":"string"}},"required":["harness","profile_id"],"type":"object"}},"type":"object"},"name":"claudexor_account_resources","outputSchema":{"additionalProperties":false,"description":"Current quota snapshots without a fabricated aggregate.","properties":{"absences":{"default":[],"description":"Every registered subject reports a snapshot or a typed absence; a refresh gap may coexist with a stale last-known snapshot.","items":{"additionalProperties":false,"description":"A registered subject's typed quota observation gap; may accompany stale last-known data.","properties":{"detail":{"default":null,"type":["string","null"]},"observed_at":{"format":"date-time","type":"string"},"reason":{"description":"Why a registered subject has no fresh quota snapshot, in the source's own vocabulary.","enum":["not_logged_in","transport_unavailable","platform_unsupported","refresh_failed","no_source","auth_revoked","rate_limited","probe_skipped_rate_limited","poll_paced","credential_profile_ambiguous"],"type":"string"},"retry_after_ms":{"minimum":0,"type":"integer"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"}},"required":["subject","reason","observed_at"],"type":"object"},"type":"array"},"refresh_skipped":{"items":{"additionalProperties":false,"description":"One subject a refresh cycle did not re-fetch because its poll rate-limit cooldown is active, or a retained legacy vendor floor when subject is absent; its snapshots/absences in the same response are last-known registry data.","properties":{"not_before":{"format":"date-time","type":"string"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"},"vendor":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["vendor","not_before"],"type":"object"},"type":"array"},"refreshed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"resources":{"items":{"additionalProperties":false,"properties":{"balances":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"amount":{"type":["string","null"]},"currency":{"type":["string","null"]},"decimal_places":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"fee_included":{"description":"Whether the reported amount includes fees; null means the source did not establish this.","type":["boolean","null"]},"has_balance":{"type":["boolean","null"]},"id":{"type":"string"},"label":{"type":"string"},"period":{"additionalProperties":false,"properties":{"ends_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"starts_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}},"required":["starts_at","ends_at"],"type":"object"},"scope":{"enum":["personal","team"],"type":"string"},"unit":{"type":"string"},"unlimited":{"type":["boolean","null"]},"usage_kind":{"enum":["included","bonus","on_demand","total"],"type":"string"}},"required":["id","label","amount","unit","currency","decimal_places","has_balance","unlimited"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"diagnostics":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"code":{"type":"string"},"detail":{"type":["string","null"]}},"required":["code","detail"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"resets":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"available_count":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"description":{"type":["string","null"]},"eligible":{"type":["boolean","null"]},"grants":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"available_count":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"clears":{"items":{"type":"string"},"type":"array"},"description":{"type":["string","null"]},"expires_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"id":{"type":"string"},"label":{"type":"string"},"starts_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"total_count":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"usable_now":{"type":["boolean","null"]}},"required":["id","label","description","available_count","total_count","usable_now","starts_at","expires_at","clears"],"type":"object"},"type":"array"},{"type":"null"}]},"id":{"type":"string"},"kind":{"enum":["granted_reset","session_refill"],"type":"string"},"label":{"type":"string"},"reason":{"type":["string","null"]},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"usable_now":{"type":["boolean","null"]},"weekly_limit_applies":{"type":"boolean"}},"required":["id","kind","label","description","available_count","eligible","usable_now","reason","resets_at","weekly_limit_applies","grants"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"spending":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"currency":{"type":["string","null"]},"decimal_places":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"enabled":{"type":["boolean","null"]},"fee_included":{"description":"Whether the reported amount includes fees; null means the source did not establish this.","type":["boolean","null"]},"id":{"type":"string"},"label":{"type":"string"},"limit":{"type":["string","null"]},"period":{"additionalProperties":false,"properties":{"ends_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"starts_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}},"required":["starts_at","ends_at"],"type":"object"},"reason":{"type":["string","null"]},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"scope":{"enum":["personal","team"],"type":"string"},"unit":{"type":"string"},"usage_kind":{"enum":["included","bonus","on_demand","total"],"type":"string"},"used":{"type":["string","null"]}},"required":["id","label","enabled","used","limit","unit","currency","decimal_places","resets_at","reason"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"target":{"additionalProperties":false,"properties":{"harness":{"minLength":1,"type":"string"},"profile_id":{"minLength":1,"type":"string"}},"required":["harness","profile_id"],"type":"object"}},"required":["target","balances","spending","resets","diagnostics"],"type":"object"},"type":"array"},"snapshots":{"items":{"additionalProperties":false,"description":"One vendor-owned quota snapshot plus its derived availability projection.","properties":{"availability":{"additionalProperties":false,"description":"Typed server-owned availability projection derived at the /v2/quota and atomic Accounts response boundaries; absent from raw journal/projection storage.","properties":{"blocking_constraints":{"description":"Ids of the constraints that produced a non-available state.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"model_scoped_exhaustions":{"description":"Every spent/cooling model-scoped window, listed regardless of state so consumers see partial exhaustion without re-deriving constraint scope.","items":{"additionalProperties":false,"description":"A spent or cooling window that applies only to the named models or declared model-id prefixes. Without a requested model only a window that DECLARES it governs the unspecified-model route can exhaust the subject; when the request names a model it covers, it blocks that request too (and is then also listed in blocking_constraints). resets_at is its earliest known release instant (null = unknown).","properties":{"applies_to_model_prefixes":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"applies_to_models":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"constraint_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}},"required":["constraint_id","applies_to_models","resets_at"],"type":"object"},"type":"array"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Earliest known instant at which any blocking constraint may release; null when nothing blocks or no reset is known."},"state":{"description":"Spendability verdict for one snapshot: exhausted = a spent window blocks every applicable request; cooldown = an applicable window is only rate-limit-cooling; available = nothing applicable blocks.","enum":["available","exhausted","cooldown"],"type":"string"}},"required":["state","blocking_constraints","resets_at","model_scoped_exhaustions"],"type":"object"},"constraints":{"items":{"additionalProperties":false,"description":"One independent vendor quota window; without model ids or declared prefixes it applies to every model, and null usage stays unknown.","properties":{"applies_to_model_prefixes":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"applies_to_models":{"anyOf":[{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},{"type":"null"}]},"applies_to_request_kinds":{"description":"Vendor-declared operation scope. Absent applies to both text and image; model scope still applies independently.","items":{"enum":["text","image"],"type":"string"},"minItems":1,"type":"array"},"applies_to_unspecified_model":{"type":"boolean"},"cooldown_until":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null},"id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"label":{"minLength":1,"type":"string"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"used_ratio":{"anyOf":[{"maximum":1,"minimum":0,"type":"number"},{"type":"null"}]},"window_seconds":{"anyOf":[{"exclusiveMinimum":0,"type":"number"},{"type":"null"}]}},"required":["id","label","used_ratio","window_seconds","resets_at"],"type":"object"},"type":"array"},"freshness":{"description":"Freshness of a quota snapshot at read time.","enum":["fresh","stale","unknown"],"type":"string"},"observed_at":{"format":"date-time","type":"string"},"snapshot_id":{"description":"Server-derived stable snapshot identity for consumers; absent from raw journal evidence and optional for legacy responses.","minLength":1,"type":"string"},"source":{"description":"Machine-readable source of quota evidence, classified by schema-owned traits.","enum":["codex_app_server","codex_rollout","claude_statusline","claude_api_retry","claude_oauth_usage","agy_command_usage","cursor_rate_limit","grok_rate_limit","claude_rate_limit_event","codex_app_server_event","codex_image_response"],"type":"string"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"}},"required":["subject","constraints","source","observed_at","freshness"],"type":"object"},"type":"array"}},"required":["snapshots","refreshed_at","resources"],"type":"object"}},{"annotations":{"destructiveHint":true,"idempotentHint":true,"readOnlyHint":false},"description":"Explicitly consume a selected account reset, outside inference capacity. Supply target, offer_id, optional grant_id and idempotency_key. Retain the original key and request after a timeout and repeat them to recover; never replace the key automatically. Or supply operation_id to read a receipt. Provider outcome and resource readback are separate; Claude already_used is not proof of this operation's success.","inputSchema":{"additionalProperties":false,"oneOf":[{"not":{"required":["operation_id"]},"required":["target","offer_id","idempotency_key"]},{"not":{"anyOf":[{"required":["target"]},{"required":["offer_id"]},{"required":["grant_id"]},{"required":["idempotency_key"]}]},"required":["operation_id"]}],"properties":{"grant_id":{"minLength":1,"type":"string"},"idempotency_key":{"minLength":1,"type":"string"},"offer_id":{"minLength":1,"type":"string"},"operation_id":{"minLength":1,"type":"string"},"target":{"additionalProperties":false,"properties":{"harness":{"minLength":1,"type":"string"},"profile_id":{"minLength":1,"type":"string"}},"required":["harness","profile_id"],"type":"object"}},"type":"object"},"name":"claudexor_account_reset","outputSchema":{"additionalProperties":false,"properties":{"completed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"created_at":{"format":"date-time","type":"string"},"detail":{"type":["string","null"]},"id":{"type":"string"},"outcome":{"enum":["pending","reset","already_redeemed","already_used","nothing_to_reset","no_credit","not_eligible","cooldown","unavailable","unknown"],"type":"string"},"readback":{"additionalProperties":false,"properties":{"attempted_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"detail":{"type":["string","null"]},"state":{"enum":["pending","fresh","failed"],"type":"string"}},"required":["state","attempted_at","detail"],"type":"object"},"request":{"additionalProperties":false,"properties":{"grant_id":{"minLength":1,"type":"string"},"offer_id":{"minLength":1,"type":"string"},"target":{"additionalProperties":false,"properties":{"harness":{"minLength":1,"type":"string"},"profile_id":{"minLength":1,"type":"string"}},"required":["harness","profile_id"],"type":"object"}},"required":["target","offer_id"],"type":"object"},"resources":{"anyOf":[{"additionalProperties":false,"description":"Current quota snapshots without a fabricated aggregate.","properties":{"absences":{"default":[],"description":"Every registered subject reports a snapshot or a typed absence; a refresh gap may coexist with a stale last-known snapshot.","items":{"additionalProperties":false,"description":"A registered subject's typed quota observation gap; may accompany stale last-known data.","properties":{"detail":{"default":null,"type":["string","null"]},"observed_at":{"format":"date-time","type":"string"},"reason":{"description":"Why a registered subject has no fresh quota snapshot, in the source's own vocabulary.","enum":["not_logged_in","transport_unavailable","platform_unsupported","refresh_failed","no_source","auth_revoked","rate_limited","probe_skipped_rate_limited","poll_paced","credential_profile_ambiguous"],"type":"string"},"retry_after_ms":{"minimum":0,"type":"integer"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"}},"required":["subject","reason","observed_at"],"type":"object"},"type":"array"},"refresh_skipped":{"items":{"additionalProperties":false,"description":"One subject a refresh cycle did not re-fetch because its poll rate-limit cooldown is active, or a retained legacy vendor floor when subject is absent; its snapshots/absences in the same response are last-known registry data.","properties":{"not_before":{"format":"date-time","type":"string"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"},"vendor":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["vendor","not_before"],"type":"object"},"type":"array"},"refreshed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"resources":{"items":{"additionalProperties":false,"properties":{"balances":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"amount":{"type":["string","null"]},"currency":{"type":["string","null"]},"decimal_places":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"fee_included":{"description":"Whether the reported amount includes fees; null means the source did not establish this.","type":["boolean","null"]},"has_balance":{"type":["boolean","null"]},"id":{"type":"string"},"label":{"type":"string"},"period":{"additionalProperties":false,"properties":{"ends_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"starts_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}},"required":["starts_at","ends_at"],"type":"object"},"scope":{"enum":["personal","team"],"type":"string"},"unit":{"type":"string"},"unlimited":{"type":["boolean","null"]},"usage_kind":{"enum":["included","bonus","on_demand","total"],"type":"string"}},"required":["id","label","amount","unit","currency","decimal_places","has_balance","unlimited"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"diagnostics":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"code":{"type":"string"},"detail":{"type":["string","null"]}},"required":["code","detail"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"resets":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"available_count":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"description":{"type":["string","null"]},"eligible":{"type":["boolean","null"]},"grants":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"available_count":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"clears":{"items":{"type":"string"},"type":"array"},"description":{"type":["string","null"]},"expires_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"id":{"type":"string"},"label":{"type":"string"},"starts_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"total_count":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"usable_now":{"type":["boolean","null"]}},"required":["id","label","description","available_count","total_count","usable_now","starts_at","expires_at","clears"],"type":"object"},"type":"array"},{"type":"null"}]},"id":{"type":"string"},"kind":{"enum":["granted_reset","session_refill"],"type":"string"},"label":{"type":"string"},"reason":{"type":["string","null"]},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"usable_now":{"type":["boolean","null"]},"weekly_limit_applies":{"type":"boolean"}},"required":["id","kind","label","description","available_count","eligible","usable_now","reason","resets_at","weekly_limit_applies","grants"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"spending":{"additionalProperties":false,"properties":{"freshness":{"enum":["fresh","stale","unknown"],"type":"string"},"last_attempt_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"last_error":{"type":["string","null"]},"observed_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"source":{"type":["string","null"]},"value":{"anyOf":[{"items":{"additionalProperties":false,"properties":{"currency":{"type":["string","null"]},"decimal_places":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}]},"enabled":{"type":["boolean","null"]},"fee_included":{"description":"Whether the reported amount includes fees; null means the source did not establish this.","type":["boolean","null"]},"id":{"type":"string"},"label":{"type":"string"},"limit":{"type":["string","null"]},"period":{"additionalProperties":false,"properties":{"ends_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"starts_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}},"required":["starts_at","ends_at"],"type":"object"},"reason":{"type":["string","null"]},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"scope":{"enum":["personal","team"],"type":"string"},"unit":{"type":"string"},"usage_kind":{"enum":["included","bonus","on_demand","total"],"type":"string"},"used":{"type":["string","null"]}},"required":["id","label","enabled","used","limit","unit","currency","decimal_places","resets_at","reason"],"type":"object"},"type":"array"},{"type":"null"}]}},"required":["value","source","observed_at","freshness","last_attempt_at","last_error"],"type":"object"},"target":{"additionalProperties":false,"properties":{"harness":{"minLength":1,"type":"string"},"profile_id":{"minLength":1,"type":"string"}},"required":["harness","profile_id"],"type":"object"}},"required":["target","balances","spending","resets","diagnostics"],"type":"object"},"type":"array"},"snapshots":{"items":{"additionalProperties":false,"description":"One vendor-owned quota snapshot plus its derived availability projection.","properties":{"availability":{"additionalProperties":false,"description":"Typed server-owned availability projection derived at the /v2/quota and atomic Accounts response boundaries; absent from raw journal/projection storage.","properties":{"blocking_constraints":{"description":"Ids of the constraints that produced a non-available state.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"model_scoped_exhaustions":{"description":"Every spent/cooling model-scoped window, listed regardless of state so consumers see partial exhaustion without re-deriving constraint scope.","items":{"additionalProperties":false,"description":"A spent or cooling window that applies only to the named models or declared model-id prefixes. Without a requested model only a window that DECLARES it governs the unspecified-model route can exhaust the subject; when the request names a model it covers, it blocks that request too (and is then also listed in blocking_constraints). resets_at is its earliest known release instant (null = unknown).","properties":{"applies_to_model_prefixes":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"applies_to_models":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"constraint_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]}},"required":["constraint_id","applies_to_models","resets_at"],"type":"object"},"type":"array"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"description":"Earliest known instant at which any blocking constraint may release; null when nothing blocks or no reset is known."},"state":{"description":"Spendability verdict for one snapshot: exhausted = a spent window blocks every applicable request; cooldown = an applicable window is only rate-limit-cooling; available = nothing applicable blocks.","enum":["available","exhausted","cooldown"],"type":"string"}},"required":["state","blocking_constraints","resets_at","model_scoped_exhaustions"],"type":"object"},"constraints":{"items":{"additionalProperties":false,"description":"One independent vendor quota window; without model ids or declared prefixes it applies to every model, and null usage stays unknown.","properties":{"applies_to_model_prefixes":{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"applies_to_models":{"anyOf":[{"items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},{"type":"null"}]},"applies_to_request_kinds":{"description":"Vendor-declared operation scope. Absent applies to both text and image; model scope still applies independently.","items":{"enum":["text","image"],"type":"string"},"minItems":1,"type":"array"},"applies_to_unspecified_model":{"type":"boolean"},"cooldown_until":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null},"id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"label":{"minLength":1,"type":"string"},"resets_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}]},"used_ratio":{"anyOf":[{"maximum":1,"minimum":0,"type":"number"},{"type":"null"}]},"window_seconds":{"anyOf":[{"exclusiveMinimum":0,"type":"number"},{"type":"null"}]}},"required":["id","label","used_ratio","window_seconds","resets_at"],"type":"object"},"type":"array"},"freshness":{"description":"Freshness of a quota snapshot at read time.","enum":["fresh","stale","unknown"],"type":"string"},"observed_at":{"format":"date-time","type":"string"},"snapshot_id":{"description":"Server-derived stable snapshot identity for consumers; absent from raw journal evidence and optional for legacy responses.","minLength":1,"type":"string"},"source":{"description":"Machine-readable source of quota evidence, classified by schema-owned traits.","enum":["codex_app_server","codex_rollout","claude_statusline","claude_api_retry","claude_oauth_usage","agy_command_usage","cursor_rate_limit","grok_rate_limit","claude_rate_limit_event","codex_app_server_event","codex_image_response"],"type":"string"},"subject":{"additionalProperties":false,"description":"Quota owner and credential route; subject_id is the credential-profile id (null = the engine-default credential).","properties":{"credential_route":{"enum":["vendor_native","managed_api_key","local"],"type":"string"},"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"plan_label":{"default":null,"type":["string","null"]},"subject_id":{"default":null,"type":["string","null"]}},"required":["harness","credential_route"],"type":"object"}},"required":["subject","constraints","source","observed_at","freshness"],"type":"object"},"type":"array"}},"required":["snapshots","refreshed_at","resources"],"type":"object"},{"type":"null"}],"description":"Current quota snapshots without a fabricated aggregate."},"state":{"enum":["running","completed"],"type":"string"}},"required":["id","request","state","created_at","completed_at","outcome","detail","readback","resources"],"type":"object"}},{"annotations":{"readOnlyHint":true},"description":"List recent daemon-tracked Claudexor runs (recovery: find a lost runId).","inputSchema":{"additionalProperties":false,"properties":{},"type":"object"},"name":"claudexor_runs"},{"annotations":{"readOnlyHint":true},"description":"Inspect a daemon-tracked run: status, summary, decision verdict, and the derived applyEligibility (what unblocks apply).","inputSchema":{"additionalProperties":false,"properties":{"runId":{"description":"Daemon run id (from a run tool's runId trailer or claudexor_runs).","minLength":1,"type":"string"}},"required":["runId"],"type":"object"},"name":"claudexor_inspect","outputSchema":{"additionalProperties":false,"description":"Structured MCP result for Claudexor durable-run read tools (inspect/status/result).","properties":{"applyEligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived apply-gate verdict; null for read-only runs or when no patch exists."},"attemptExecution":{"items":{"additionalProperties":false,"description":"Compact projection of existing attempt execution and amount evidence.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"harnessId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"processing":{"additionalProperties":false,"description":"Requested intent, submitted native control, and observed execution are independent facts. A submitted flag never proves observed service; mixed or missing session observations remain explicit.","properties":{"observed":{"enum":["standard","fast","economy","mixed","unknown"],"type":"string"},"observedNative":{"items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"reason":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"requested":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"submitted":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"submittedNative":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."}},"required":["requested","submitted","submittedNative","observed","observedNative","reason","source"],"type":"object"},"processingCostBasis":{"additionalProperties":false,"description":"Mode-qualified billing evidence for an existing cost record. Authentication alone does not establish included premium service; credits, cash, and token valuation stay distinct.","properties":{"debit":{"const":"unobserved","description":"The route reports no actual cash or purchased-credit debit. Included service still admits the work, but its cash stays unknown instead of zero and is outside the finite cap; absence keeps proven ordinary inclusion as zero cash.","type":"string"},"kind":{"enum":["included","paid_credits","cash","valuation","unknown"],"type":"string"},"nativeMode":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"}},"required":["nativeMode","kind","source"],"type":"object"},"usageCost":{"additionalProperties":false,"description":"Observed usage components. An amount of unknown meaning is not charged cash; separately proven included service can still establish exact zero incremental cash unless its route reports no actual debit.","properties":{"cashKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"cashUsd":{"minimum":0,"type":"number"},"unknownUsd":{"minimum":0,"type":"number"},"valuationKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"minimum":0,"type":"number"}},"required":["cashUsd","valuationUsd","unknownUsd","cashKnowledge","valuationKnowledge"],"type":"object"}},"required":["attemptId","harnessId"],"type":"object"},"type":"array"},"budget":{"anyOf":[{"additionalProperties":false,"description":"Budget snapshot for a run: cap, spend, and provenance.","properties":{"cashKnowledge":{"description":"Cash certainty from the ledger; explicit unknown keeps spendUsd null independently of valuation.","enum":["exact","estimated","unknown"],"type":"string"},"controllableSpendUsd":{"default":null,"description":"Cash governed by the finite cap: settled amounts on routes Claudexor controls; null when that cash is unknown. spendUsd can still be null when an included subscription reports no actual debit.","type":["number","null"]},"estimated":{"default":false,"description":"True when settled cash is estimated rather than exact; subscription valuation confidence is reported separately.","type":"boolean"},"evidence":{"default":"complete","description":"Integrity of the canonical events this spend fallback read: 'incomplete' when malformed/non-object event lines were skipped, 'unavailable' when the events file was unreadable, else 'complete'. A non-complete value means the projected spend may disagree with disk truth.","enum":["complete","incomplete","unavailable"],"type":"string"},"paidBudget":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"unlimited","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"finite","type":"string"},"maxUsd":{"minimum":0,"type":"number"}},"required":["kind","maxUsd"],"type":"object"}],"default":{"kind":"unlimited"},"description":"Incremental-cash budget: explicitly unlimited or a finite non-negative USD cap."},"remainingUsd":{"default":null,"description":"Remaining finite cap after controllableSpendUsd; null when no cap or unknown.","type":["number","null"]},"source":{"default":"unknown","description":"Where the snapshot came from: the decision record, live events, settings, or unknown.","enum":["decision","events","settings","unknown"],"type":"string"},"spendUsd":{"default":null,"description":"CASH spend so far in USD; null when unknown.","type":["number","null"]},"valuationKnowledge":{"default":"unknown","description":"Confidence of valuationUsd: 'estimated' when token-derived, 'unknown' when no usage was reported (valuationUsd is then null), 'exact' when natively priced.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"default":null,"description":"Subscription valuation in USD (separate from billed cash); null when unknown — never a fabricated $0 (QA-023c).","type":["number","null"]}},"type":"object"},{"type":"null"}],"default":null,"description":"Run budget snapshot (cash + subscription valuation, QA-023c); null when unavailable."},"continueFrom":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Predecessor run this run continues; null for an ordinary run, omitted when the detail did not project it."},"continuity":{"description":"Per-try continuation receipts (carrier, cause, accounts, model) from the run's event log; omitted when not projected.","items":{"additionalProperties":false,"description":"Receipt of one continued try: carrier, cause, accounts, memory, model attestation.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"carrier":{"description":"Carrier of a continued try: native (the vendor's own session, same account), native_moved (the session file made visible in the next account's store, then resumed there), packet (a fresh session re-grounded by an evidence index), or fresh (nothing to carry — a replay of the original prompt).","enum":["native","native_moved","packet","fresh"],"type":"string"},"cause":{"description":"Typed reason the previous process stopped: a vendor limit (next account eligible), the whole pool spent, a pinned account's limit, a transport death (crash, timeout, watchdog), a confirmed native tool permission refusal, context exhaustion, the wall-clock deadline, a cancel, a daemon/host restart, a model that asked for input, or another typed cause.","enum":["vendor_limit","pool_exhausted","pinned_limit","transport","permission_denied","context_exhausted","wall_clock","cancelled","host_restart","input_required","other"],"type":"string"},"from":{"additionalProperties":false,"properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"profileId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"runId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["runId","attemptId","profileId"],"type":"object"},"identityCheck":{"description":"Whether the resumed vendor session was the one requested, judged at the earliest handshake (codex thread/resume before turn/start; claude system/init): matched, mismatch caught before the child could act, mismatch caught after it may have acted, or not applicable (no resume was requested, or a harness without the continuity capability answered with another session id, which is recorded as before).","enum":["matched_before_effects","mismatch_before_effects","mismatch_after_possible_effects","not_applicable"],"type":"string"},"inputDelivery":{"description":"Whether the predecessor's last input (its turn prompt or an admitted steering message) is known to be in the vendor history: confirmed, uncertain (carried in the notice as a reference to reconcile, never replayed blindly), or not applicable.","enum":["confirmed","uncertain","not_applicable"],"type":"string"},"instructions":{"description":"as_sent: the successor's instructions equal the predecessor's; vendor_snapshot: they differ, and the vendor may resend its recorded system prompt instead (claude records it on the first request).","enum":["as_sent","vendor_snapshot"],"type":"string"},"memory":{"description":"Its own fact: a native resume carries the whole history (full); a packet re-brief is partial; a native resume that lost history (e.g. a rejected compacted item) is partial/unknown.","enum":["full","partial","unknown"],"type":"string"},"modelMismatch":{"type":["boolean","null"]},"observedModel":{"description":"THIS try's attested model (never borrowed from another try).","type":["string","null"]},"reingestedTokens":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"description":"Input + cache-creation tokens of the first resumed request, when known."},"to":{"additionalProperties":false,"properties":{"profileId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["profileId"],"type":"object"},"tryIndex":{"description":"Native try within the attempt; joins the receipt to its try.","minimum":0,"type":"integer"},"workspace":{"description":"Whether the continued try runs in the predecessor's execution root.","enum":["same_root","different_root"],"type":"string"}},"required":["tryIndex","attemptId","carrier","cause","from","to","workspace","memory","instructions","reingestedTokens","observedModel","modelMismatch","identityCheck","inputDelivery"],"type":"object"},"type":"array"},"council":{"anyOf":[{"additionalProperties":false,"description":"Council membership + merge disclosure for a --council plan run.","properties":{"degraded":{"default":false,"description":"True when fewer contract-accepted drafts than requested, including any retained unverified contribution; failures remain disclosed per member.","type":"boolean"},"drafted":{"description":"Members with contract-accepted drafts; excludes retained unverified inputs and is not a work-completion or verification count.","minimum":0,"type":"integer"},"members":{"default":[],"description":"Per-member role and outcome.","items":{"additionalProperties":false,"description":"One council member's role and draft/merge outcome.","properties":{"error":{"default":null,"description":"First redacted draft error; null unless the member failed.","type":["string","null"]},"harnessId":{"description":"Harness that drafted (or merged) this member's plan.","minLength":1,"type":"string"},"role":{"description":"primary = the merger that synthesizes the unified plan; member = draft only.","enum":["primary","member"],"type":"string"},"status":{"description":"Draft outcome: drafted = contract-accepted input; merged = accepted draft and successful merge; failed stays failed even when its unverified text helped the merger.","enum":["drafted","failed","merged"],"type":"string"}},"required":["harnessId","role","status"],"type":"object"},"type":"array"},"mergedBy":{"default":null,"description":"Harness that produced the unified plan (the primary); null if the merge failed.","type":["string","null"]},"requested":{"description":"Requested member count (n; at least 2, up to the configured Council cap).","exclusiveMinimum":0,"type":"integer"}},"required":["requested","drafted"],"type":"object"},{"type":"null"}],"default":null,"description":"Council membership + merge disclosure (QA-023b); null for solo/non-plan runs."},"decisionStatus":{"default":null,"description":"The arbitration decision status, when the run reached arbitration.","type":["string","null"]},"deferredMessage":{"anyOf":[{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"},{"type":"null"}],"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved."},"delegatedFromRunId":{"default":null,"description":"Claudexor Delegate parent id; null for ordinary runs and native subagents.","type":["string","null"]},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.","properties":{"effective":{"default":false,"type":"boolean"},"reason":{"default":"not_requested","enum":["pending","not_requested","injected_unused","used","runtime_unavailable","manifest_unsupported","access_profile_incompatible","partially_degraded","startup_failed"],"type":"string"},"remediation":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null},"requested":{"default":false,"type":"boolean"},"used":{"default":false,"type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Typed Delegate receipt; null when unavailable or legacy."},"detailProblem":{"anyOf":[{"additionalProperties":false,"description":"Typed failure of a post-run detail read whose durable run result still survives.","properties":{"code":{"description":"Stable machine code of the detail problem, if any.","type":["string","null"]},"message":{"description":"Human-readable description of the detail problem.","type":"string"},"retryable":{"description":"Whether retrying the detail read may help.","type":["boolean","null"]}},"required":["code","message","retryable"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed post-terminal detail-read problem (the durable run handle survives); null when the detail read succeeded."},"failure":{"anyOf":[{"additionalProperties":false,"description":"Typed failure record for a run: phase, category, evidence references, and suggested next actions.","properties":{"attemptId":{"default":null,"description":"Attempt involved in the failure, when known.","type":["string","null"]},"captureFailure":{"additionalProperties":false,"properties":{"bufferBudgetBytes":{"minimum":0,"type":"integer"},"causeCode":{"type":"string"},"cleanup":{"additionalProperties":false,"properties":{"code":{"type":["string","null"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"code":{"enum":["capture_output_exceeded","capture_output_incomplete","capture_preview_truncated","capture_failed"],"type":"string"},"drain":{"const":"truncated","type":"string"},"message":{"type":"string"},"stream":{"enum":["stdout","stderr"],"type":"string"}},"required":["code","message"],"type":"object"},"category":{"default":"unknown","description":"Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness.","enum":["validation","project","auth","harness_unavailable","harness_error","config_error","budget","policy","cancelled","internal","unknown"],"type":"string"},"code":{"anyOf":[{"description":"Machine-readable failure sub-code within a RunFailure category, including historical delegated-run failures and active access-profile refusals.","enum":["finite_zero","hard_cap","estimate_headroom","unknown_paid_in_flight","budget_overshoot","cost_unverifiable","delegation_child_drain_timeout","subscription_window_exhausted","credential_pool_exhausted","input_too_large","vendor_cli_too_old","credential_source_unconfirmed","delegated_home_unavailable","delegated_confinement_unavailable","delegated_evidence_incomplete","access_profile_incompatible","auxiliary_writable_roots_unsupported","retired_access_profile"],"type":"string"},{"type":"null"}],"default":null,"description":"Machine-readable failure sub-code within the category; null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage."},"eventRefs":{"default":[],"description":"Event references relevant to the failure.","items":{"type":"string"},"type":"array"},"harnessId":{"default":null,"description":"Harness involved in the failure, when known.","type":["string","null"]},"logRefs":{"default":[],"description":"Log artifact paths relevant to the failure.","items":{"type":"string"},"type":"array"},"nextActions":{"default":[],"description":"Suggested operator next actions.","items":{"type":"string"},"type":"array"},"phase":{"default":"unknown","description":"Pipeline phase where the failure happened.","type":"string"},"poolAttempts":{"default":[],"description":"Every failed execution try in order, each with its own account and error text; empty when no try failed (and for records written before this field existed).","items":{"additionalProperties":false,"description":"Per-try account attribution of a failed execution try (diagnostic evidence only).","properties":{"attemptId":{"description":"Attempt the try belongs to.","minLength":1,"type":"string"},"category":{"description":"Typed failure category of the try; untyped errors are unknown_harness_error.","enum":["timeout","rate_limited","auth_failed","capability_refused","process_crash","config_error","unknown_harness_error"],"type":"string"},"error":{"description":"The try's own error text with its original wording and whitespace, redacted.","type":"string"},"harnessId":{"description":"Harness the try ran on.","minLength":1,"type":"string"},"observedAt":{"description":"When the try's first error was observed.","format":"date-time","type":"string"},"phase":{"description":"How far the try got: before a typed session start, after start but before agent progress, or after progress.","enum":["pre_start","pre_progress","after_progress"],"type":"string"},"profileDisplayName":{"description":"The row's display name at try time (redacted); null for the default route.","type":["string","null"]},"profileId":{"description":"Account row the try ran on; null = the harness default route.","type":["string","null"]},"requestedModel":{"description":"Model the try asked for; null = the harness default model.","type":["string","null"]},"tryIndex":{"description":"Zero-based try index within the attempt.","minimum":0,"type":"integer"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"description":"The vendor's own typed failure for this try, when the adapter attached one."}},"required":["harnessId","profileId","profileDisplayName","requestedModel","attemptId","tryIndex","observedAt","phase","category","error","vendorFailure"],"type":"object"},"type":"array"},"rawDetailRef":{"default":null,"description":"Artifact path holding the raw (redacted) failure detail.","type":["string","null"]},"requestRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"actual":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"kind":{"const":"input_too_large","type":"string"},"limit":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"native_code":{"minLength":1,"type":"string"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"}},"required":["scope","unit","limit","source","kind","actual","native_code"],"type":"object"},{"additionalProperties":false,"properties":{"binary_path":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"installed_version":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"kind":{"const":"vendor_cli_too_old","type":"string"},"native_code":{"const":"claude_code_version_too_old","type":"string"},"source":{"const":"claude_stdout","type":"string"}},"required":["kind","native_code","source","binary_path","installed_version"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"credential_source_unconfirmed","type":"string"},"native_code":{"const":"grok_credential_source_unconfirmed","type":"string"},"reported_source":{"description":"Redacted credential source the vendor's startup frame reported.","maxLength":80,"type":"string"},"source":{"const":"grok_init","type":"string"}},"required":["kind","native_code","source","reported_source"],"type":"object"}],"description":"Vendor-attested request refusal that stops retries and account rotation on its harness; input, executable and credential-source causes carry their own evidence."},"resetsAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the refused window reopens (a spent subscription quota window), or null when the failure has no such time. Callers schedule a retry off this field, never off safeMessage."},"runDir":{"default":null,"description":"Run artifact directory.","type":["string","null"]},"safeMessage":{"description":"Redacted human-readable failure message.","type":"string"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"default":null,"description":"The vendor's own typed failure for the attempt this record speaks for, or null when no vendor-typed evidence exists (every harness without such a channel, and any unreadable record). Facts only: carries no remedy."}},"required":["safeMessage"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed terminal failure detail and recovery actions; null for non-failed runs."},"outcomeBanner":{"default":null,"description":"Server-owned outcome headline (D18); null while non-terminal.","type":["string","null"]},"outcomeFacts":{"anyOf":[{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},{"type":"null"}],"default":null,"description":"The D8 terminal outcome axes (checks/review/reason/noChanges), when terminal."},"parentRunId":{"default":null,"description":"Server-owned ordinary parent/follow-up run id, when present.","type":["string","null"]},"pendingInteractions":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Count of questions still awaiting answers, when known."},"planReadiness":{"anyOf":[{"additionalProperties":false,"description":"Server-derived readiness of a plan run (one derivation owner; D17).","properties":{"questionCount":{"default":0,"minimum":0,"type":"integer"},"state":{"description":"Derived plan readiness: ready (block parsed, zero open questions), needs_answers (open questions remain), unverified (no parseable block — the planner ignored the format).","enum":["ready","needs_answers","unverified"],"type":"string"}},"required":["state"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived plan readiness (plan runs only, D17); null otherwise."},"resumable":{"anyOf":[{"additionalProperties":false,"description":"Terminal facts of a stopped run that can be continued: cause, limit evidence, available carriers, the native session and the workspace.","properties":{"carriers":{"description":"Continuity representations still available (NOT quota readiness; readiness is described by the limit facts).","items":{"description":"A continuity representation still available for a stopped run.","enum":["native","native_moved","packet"],"type":"string"},"type":"array"},"cause":{"description":"Typed reason the previous process stopped: a vendor limit (next account eligible), the whole pool spent, a pinned account's limit, a transport death (crash, timeout, watchdog), a confirmed native tool permission refusal, context exhaustion, the wall-clock deadline, a cancel, a daemon/host restart, a model that asked for input, or another typed cause.","enum":["vendor_limit","pool_exhausted","pinned_limit","transport","permission_denied","context_exhausted","wall_clock","cancelled","host_restart","input_required","other"],"type":"string"},"limitCode":{"description":"The typed vendor limit code that ended the work, when any.","type":["string","null"]},"limitEvidence":{"anyOf":[{"description":"window: the vendor named the spent window (a reset instant or a constraint id); unspecified: a typed limit without a window — a bare backoff frame is transport, not a limit.","enum":["window","unspecified"],"type":"string"},{"type":"null"}],"description":"window: the vendor named the spent window (a reset instant or a constraint id); unspecified: a typed limit without a window — a bare backoff frame is transport, not a limit."},"limitWindow":{"description":"The vendor's own name for the spent window (e.g. five_hour, seven_day_opus), when known.","type":["string","null"]},"resetsAt":{"description":"When the spent vendor window reopens, only from a vendor signal; never fabricated.","type":["string","null"]},"session":{"anyOf":[{"additionalProperties":false,"properties":{"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"holderProfileId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"nativeSessionId":{"minLength":1,"type":"string"}},"required":["harness","nativeSessionId","holderProfileId"],"type":"object"},{"type":"null"}],"description":"The native session a continuation can resume, when one exists."},"workspace":{"additionalProperties":false,"description":"Where the stopped work's tree is: the live root, a retained envelope, or gone.","properties":{"kind":{"enum":["in_place","retained_envelope","none"],"type":"string"},"root":{"type":["string","null"]}},"required":["kind","root"],"type":"object"}},"required":["cause","resetsAt","limitWindow","limitEvidence","carriers","limitCode","session","workspace"],"type":"object"},{"type":"null"}],"description":"Terminal facts of stopped unfinished work that claudexor_run_continue can continue (cause, resetsAt, carriers, session, workspace); null when the work finished or the run is not terminal, omitted when not projected."},"retainedEnvelope":{"anyOf":[{"additionalProperties":false,"description":"An isolated envelope kept for continuation: continue it with continueFrom, or release it with the discard decision.","properties":{"bytes":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"description":"Disk use of the kept envelope (tree + scoped home); null when not measured."},"cause":{"anyOf":[{"description":"Typed reason the previous process stopped: a vendor limit (next account eligible), the whole pool spent, a pinned account's limit, a transport death (crash, timeout, watchdog), a confirmed native tool permission refusal, context exhaustion, the wall-clock deadline, a cancel, a daemon/host restart, a model that asked for input, or another typed cause.","enum":["vendor_limit","pool_exhausted","pinned_limit","transport","permission_denied","context_exhausted","wall_clock","cancelled","host_restart","input_required","other"],"type":"string"},{"type":"null"}],"description":"Why the run stopped, when recorded."},"retainedAt":{"description":"When the envelope was kept.","type":"string"},"root":{"description":"Absolute path of the kept working tree.","type":"string"}},"required":["root","bytes","retainedAt","cause"],"type":"object"},{"type":"null"}],"description":"Isolated envelope kept for a successor (disk use visible); null when none, omitted when not projected."},"runDir":{"default":null,"description":"Artifact directory; null when absent.","type":["string","null"]},"runFacts":{"anyOf":[{"additionalProperties":false,"description":"Validated immutable terminal facts for one run.","properties":{"apply":{"additionalProperties":false,"description":"Terminal apply eligibility and operator-decision state.","properties":{"eligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Delivery-gate eligibility at terminalization; null when nothing is applyable."},"operator_decision_present":{"default":false,"description":"Whether a valid operator decision was present when the receipt was finalized.","type":"boolean"}},"type":"object"},"deliverable":{"additionalProperties":false,"description":"Canonical primary-output presence and identity for a terminal run.","properties":{"kind":{"anyOf":[{"enum":["answer","report","plan","patch","files","structured_output"],"type":"string"},{"type":"null"}],"description":"Kind of canonical primary deliverable; null when none exists."},"path":{"description":"Run-relative path of the canonical primary deliverable; null when absent.","type":["string","null"]},"present":{"description":"Whether the canonical primary deliverable exists.","type":"boolean"},"producer_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt that produced the deliverable, when known."}},"required":["present","kind","path"],"type":"object"},"gates":{"additionalProperties":false,"description":"Canonical gate configuration and terminal receipt projection.","properties":{"configured":{"description":"Whether the frozen task configured deterministic gates.","type":"boolean"},"executed":{"description":"Whether the terminal attempt executed the gate set.","type":"boolean"},"receipt_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt whose gate receipt decides this projection; null when no gates executed."},"required":{"description":"Number of configured required gates.","minimum":0,"type":"integer"},"state":{"description":"Terminal state of the configured deterministic gate set.","enum":["not_configured","passed","failed","skipped"],"type":"string"},"total":{"description":"Total configured deterministic gates.","minimum":0,"type":"integer"}},"required":["configured","required","total","executed","state"],"type":"object"},"generated_at":{"description":"When this immutable terminal receipt was finalized.","minLength":1,"type":"string"},"mode":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"outcome":{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},"participants":{"additionalProperties":false,"description":"Terminal participant graph plus its planner-lane count.","properties":{"attempts":{"default":[],"description":"Role-labelled participant roster.","items":{"additionalProperties":false,"description":"One role-labelled participant in the terminal run graph.","properties":{"attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Attempt id when the participant owns an orchestrator attempt; null for reviewer-panel members."},"deliverable_present":{"default":false,"description":"Whether this participant produced the deliverable its role requested.","type":"boolean"},"harness_id":{"description":"Harness that served this participant role.","minLength":1,"type":"string"},"role":{"description":"Canonical role of one participant in the terminal run graph.","enum":["planner","merge","candidate","scout","reducer","reviewer"],"type":"string"},"status":{"anyOf":[{"description":"Terminal outcome recorded for one run participant.","enum":["success","success_with_warnings","blocked","failed"],"type":"string"},{"type":"null"}],"default":null,"description":"Participant outcome when recorded; null for artifact-only reviewer membership."}},"required":["attempt_id","harness_id","role"],"type":"object"},"type":"array"},"planners":{"description":"Number of participants whose canonical role is planner.","minimum":0,"type":"integer"}},"required":["planners"],"type":"object"},"presentation":{"additionalProperties":false,"description":"Immutable terminal output state and primary artifact. Absent only on legacy RunFacts receipts.","properties":{"primary":{"anyOf":[{"additionalProperties":false,"description":"Primary user-facing artifact selected once during terminal preparation.","properties":{"kind":{"description":"Presentation kind of the terminal primary artifact.","enum":["answer","report","plan","patch","files","structured_output","diagnostic"],"type":"string"},"path":{"description":"Normalized run-relative path of the terminal primary artifact.","minLength":1,"type":"string"}},"required":["kind","path"],"type":"object"},{"type":"null"}],"description":"Selected terminal primary artifact, or null when the receipt announces readiness without a primary deliverable."},"state":{"description":"Terminal output readiness decided by the last valid output.ready receipt.","enum":["ready","diagnostic"],"type":"string"}},"required":["state","primary"],"type":"object"},"required_actions":{"default":[],"description":"Typed actions required to unblock this terminal outcome.","items":{"additionalProperties":false,"description":"One typed required operator action derived from a run's terminal outcome facts.","properties":{"detail":{"description":"Human-readable guidance for this action (English-only, INV-141).","type":"string"},"id":{"description":"Stable machine id for a required operator action on a blocked terminal run.","enum":["provide_required_input","complete_incomplete_work","resolve_review_block","fix_failed_checks","record_operator_decision"],"type":"string"}},"required":["id","detail"],"type":"object"},"type":"array"},"review":{"additionalProperties":false,"description":"Canonical terminal review verdict and blocking-finding identity.","properties":{"blocker_ids":{"default":[],"description":"Stable ids of accepted evidence-backed blocking findings.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"blockers":{"description":"Number of blocking findings.","minimum":0,"type":"integer"},"state":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"}},"required":["state","blockers"],"type":"object"},"run_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"schema_version":{"const":2,"description":"Schema version of the artifact; bumped on breaking ABI changes.","type":"number"},"task_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["schema_version","run_id","task_id","mode","outcome","deliverable","participants","gates","review","apply","generated_at"],"type":"object"},{"type":"null"}],"default":null,"description":"Validated canonical terminal RunFacts receipt; null while active, unavailable, or for legacy runs."},"runId":{"default":null,"description":"The daemon run id, when known.","type":["string","null"]},"secretLike":{"anyOf":[{"additionalProperties":false,"description":"What a run's saved copies hide: secret-like strings kept in the work, hidden on disk.","properties":{"answerMatches":{"description":"Strings hidden in the answer.","minimum":0,"type":"integer"},"binaryPaths":{"description":"Binary files whose payload the saved patch omits.","items":{"type":"string"},"type":"array"},"exactPatchRecorded":{"description":"For a redacted copy: whether the private exact patch object was recorded (false = deferred Apply answers patch_exact_bytes_unavailable); null for an exact copy.","type":["boolean","null"]},"files":{"description":"Changed files with hidden strings in the saved patch copy.","items":{"additionalProperties":false,"properties":{"kinds":{"description":"Content-rule ids that matched.","items":{"type":"string"},"type":"array"},"matches":{"description":"Strings hidden in that file's diff.","minimum":0,"type":"integer"},"path":{"description":"Changed file whose saved diff hides strings.","type":"string"}},"required":["path","matches","kinds"],"type":"object"},"type":"array"},"mediaWithheld":{"description":"Images that were not saved as produced outputs.","items":{"type":"string"},"type":"array"},"persistedPatch":{"description":"Whether the saved final/patch.diff is byte-exact or a display-only redacted copy.","enum":["exact","redacted"],"type":"string"},"totalMatches":{"description":"Strings hidden across patch and answer.","minimum":0,"type":"integer"}},"required":["totalMatches","answerMatches","files","binaryPaths","mediaWithheld","persistedPatch","exactPatchRecorded"],"type":"object"},{"type":"null"}],"default":null,"description":"INV-062 disclosure: secret-like strings kept in the work but hidden in saved copies (paths and counts only); null when nothing was hidden."},"status":{"default":null,"description":"The run's terminal or in-flight lifecycle state, when known.","type":["string","null"]},"summary":{"description":"Human-readable outcome/status text (same as the tool's text content).","type":"string"}},"required":["summary"],"type":"object"}},{"annotations":{"readOnlyHint":true},"description":"Read the current daemon-acknowledged state of a durable Claudexor run.","inputSchema":{"additionalProperties":false,"properties":{"runId":{"description":"Daemon run id (from a run tool's runId trailer or claudexor_runs).","minLength":1,"type":"string"}},"required":["runId"],"type":"object"},"name":"claudexor_run_status","outputSchema":{"additionalProperties":false,"description":"Structured MCP result for Claudexor durable-run read tools (inspect/status/result).","properties":{"applyEligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived apply-gate verdict; null for read-only runs or when no patch exists."},"attemptExecution":{"items":{"additionalProperties":false,"description":"Compact projection of existing attempt execution and amount evidence.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"harnessId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"processing":{"additionalProperties":false,"description":"Requested intent, submitted native control, and observed execution are independent facts. A submitted flag never proves observed service; mixed or missing session observations remain explicit.","properties":{"observed":{"enum":["standard","fast","economy","mixed","unknown"],"type":"string"},"observedNative":{"items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"reason":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"requested":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"submitted":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"submittedNative":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."}},"required":["requested","submitted","submittedNative","observed","observedNative","reason","source"],"type":"object"},"processingCostBasis":{"additionalProperties":false,"description":"Mode-qualified billing evidence for an existing cost record. Authentication alone does not establish included premium service; credits, cash, and token valuation stay distinct.","properties":{"debit":{"const":"unobserved","description":"The route reports no actual cash or purchased-credit debit. Included service still admits the work, but its cash stays unknown instead of zero and is outside the finite cap; absence keeps proven ordinary inclusion as zero cash.","type":"string"},"kind":{"enum":["included","paid_credits","cash","valuation","unknown"],"type":"string"},"nativeMode":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"}},"required":["nativeMode","kind","source"],"type":"object"},"usageCost":{"additionalProperties":false,"description":"Observed usage components. An amount of unknown meaning is not charged cash; separately proven included service can still establish exact zero incremental cash unless its route reports no actual debit.","properties":{"cashKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"cashUsd":{"minimum":0,"type":"number"},"unknownUsd":{"minimum":0,"type":"number"},"valuationKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"minimum":0,"type":"number"}},"required":["cashUsd","valuationUsd","unknownUsd","cashKnowledge","valuationKnowledge"],"type":"object"}},"required":["attemptId","harnessId"],"type":"object"},"type":"array"},"budget":{"anyOf":[{"additionalProperties":false,"description":"Budget snapshot for a run: cap, spend, and provenance.","properties":{"cashKnowledge":{"description":"Cash certainty from the ledger; explicit unknown keeps spendUsd null independently of valuation.","enum":["exact","estimated","unknown"],"type":"string"},"controllableSpendUsd":{"default":null,"description":"Cash governed by the finite cap: settled amounts on routes Claudexor controls; null when that cash is unknown. spendUsd can still be null when an included subscription reports no actual debit.","type":["number","null"]},"estimated":{"default":false,"description":"True when settled cash is estimated rather than exact; subscription valuation confidence is reported separately.","type":"boolean"},"evidence":{"default":"complete","description":"Integrity of the canonical events this spend fallback read: 'incomplete' when malformed/non-object event lines were skipped, 'unavailable' when the events file was unreadable, else 'complete'. A non-complete value means the projected spend may disagree with disk truth.","enum":["complete","incomplete","unavailable"],"type":"string"},"paidBudget":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"unlimited","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"finite","type":"string"},"maxUsd":{"minimum":0,"type":"number"}},"required":["kind","maxUsd"],"type":"object"}],"default":{"kind":"unlimited"},"description":"Incremental-cash budget: explicitly unlimited or a finite non-negative USD cap."},"remainingUsd":{"default":null,"description":"Remaining finite cap after controllableSpendUsd; null when no cap or unknown.","type":["number","null"]},"source":{"default":"unknown","description":"Where the snapshot came from: the decision record, live events, settings, or unknown.","enum":["decision","events","settings","unknown"],"type":"string"},"spendUsd":{"default":null,"description":"CASH spend so far in USD; null when unknown.","type":["number","null"]},"valuationKnowledge":{"default":"unknown","description":"Confidence of valuationUsd: 'estimated' when token-derived, 'unknown' when no usage was reported (valuationUsd is then null), 'exact' when natively priced.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"default":null,"description":"Subscription valuation in USD (separate from billed cash); null when unknown — never a fabricated $0 (QA-023c).","type":["number","null"]}},"type":"object"},{"type":"null"}],"default":null,"description":"Run budget snapshot (cash + subscription valuation, QA-023c); null when unavailable."},"continueFrom":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Predecessor run this run continues; null for an ordinary run, omitted when the detail did not project it."},"continuity":{"description":"Per-try continuation receipts (carrier, cause, accounts, model) from the run's event log; omitted when not projected.","items":{"additionalProperties":false,"description":"Receipt of one continued try: carrier, cause, accounts, memory, model attestation.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"carrier":{"description":"Carrier of a continued try: native (the vendor's own session, same account), native_moved (the session file made visible in the next account's store, then resumed there), packet (a fresh session re-grounded by an evidence index), or fresh (nothing to carry — a replay of the original prompt).","enum":["native","native_moved","packet","fresh"],"type":"string"},"cause":{"description":"Typed reason the previous process stopped: a vendor limit (next account eligible), the whole pool spent, a pinned account's limit, a transport death (crash, timeout, watchdog), a confirmed native tool permission refusal, context exhaustion, the wall-clock deadline, a cancel, a daemon/host restart, a model that asked for input, or another typed cause.","enum":["vendor_limit","pool_exhausted","pinned_limit","transport","permission_denied","context_exhausted","wall_clock","cancelled","host_restart","input_required","other"],"type":"string"},"from":{"additionalProperties":false,"properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"profileId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"runId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["runId","attemptId","profileId"],"type":"object"},"identityCheck":{"description":"Whether the resumed vendor session was the one requested, judged at the earliest handshake (codex thread/resume before turn/start; claude system/init): matched, mismatch caught before the child could act, mismatch caught after it may have acted, or not applicable (no resume was requested, or a harness without the continuity capability answered with another session id, which is recorded as before).","enum":["matched_before_effects","mismatch_before_effects","mismatch_after_possible_effects","not_applicable"],"type":"string"},"inputDelivery":{"description":"Whether the predecessor's last input (its turn prompt or an admitted steering message) is known to be in the vendor history: confirmed, uncertain (carried in the notice as a reference to reconcile, never replayed blindly), or not applicable.","enum":["confirmed","uncertain","not_applicable"],"type":"string"},"instructions":{"description":"as_sent: the successor's instructions equal the predecessor's; vendor_snapshot: they differ, and the vendor may resend its recorded system prompt instead (claude records it on the first request).","enum":["as_sent","vendor_snapshot"],"type":"string"},"memory":{"description":"Its own fact: a native resume carries the whole history (full); a packet re-brief is partial; a native resume that lost history (e.g. a rejected compacted item) is partial/unknown.","enum":["full","partial","unknown"],"type":"string"},"modelMismatch":{"type":["boolean","null"]},"observedModel":{"description":"THIS try's attested model (never borrowed from another try).","type":["string","null"]},"reingestedTokens":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"description":"Input + cache-creation tokens of the first resumed request, when known."},"to":{"additionalProperties":false,"properties":{"profileId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["profileId"],"type":"object"},"tryIndex":{"description":"Native try within the attempt; joins the receipt to its try.","minimum":0,"type":"integer"},"workspace":{"description":"Whether the continued try runs in the predecessor's execution root.","enum":["same_root","different_root"],"type":"string"}},"required":["tryIndex","attemptId","carrier","cause","from","to","workspace","memory","instructions","reingestedTokens","observedModel","modelMismatch","identityCheck","inputDelivery"],"type":"object"},"type":"array"},"council":{"anyOf":[{"additionalProperties":false,"description":"Council membership + merge disclosure for a --council plan run.","properties":{"degraded":{"default":false,"description":"True when fewer contract-accepted drafts than requested, including any retained unverified contribution; failures remain disclosed per member.","type":"boolean"},"drafted":{"description":"Members with contract-accepted drafts; excludes retained unverified inputs and is not a work-completion or verification count.","minimum":0,"type":"integer"},"members":{"default":[],"description":"Per-member role and outcome.","items":{"additionalProperties":false,"description":"One council member's role and draft/merge outcome.","properties":{"error":{"default":null,"description":"First redacted draft error; null unless the member failed.","type":["string","null"]},"harnessId":{"description":"Harness that drafted (or merged) this member's plan.","minLength":1,"type":"string"},"role":{"description":"primary = the merger that synthesizes the unified plan; member = draft only.","enum":["primary","member"],"type":"string"},"status":{"description":"Draft outcome: drafted = contract-accepted input; merged = accepted draft and successful merge; failed stays failed even when its unverified text helped the merger.","enum":["drafted","failed","merged"],"type":"string"}},"required":["harnessId","role","status"],"type":"object"},"type":"array"},"mergedBy":{"default":null,"description":"Harness that produced the unified plan (the primary); null if the merge failed.","type":["string","null"]},"requested":{"description":"Requested member count (n; at least 2, up to the configured Council cap).","exclusiveMinimum":0,"type":"integer"}},"required":["requested","drafted"],"type":"object"},{"type":"null"}],"default":null,"description":"Council membership + merge disclosure (QA-023b); null for solo/non-plan runs."},"decisionStatus":{"default":null,"description":"The arbitration decision status, when the run reached arbitration.","type":["string","null"]},"deferredMessage":{"anyOf":[{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"},{"type":"null"}],"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved."},"delegatedFromRunId":{"default":null,"description":"Claudexor Delegate parent id; null for ordinary runs and native subagents.","type":["string","null"]},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.","properties":{"effective":{"default":false,"type":"boolean"},"reason":{"default":"not_requested","enum":["pending","not_requested","injected_unused","used","runtime_unavailable","manifest_unsupported","access_profile_incompatible","partially_degraded","startup_failed"],"type":"string"},"remediation":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null},"requested":{"default":false,"type":"boolean"},"used":{"default":false,"type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Typed Delegate receipt; null when unavailable or legacy."},"detailProblem":{"anyOf":[{"additionalProperties":false,"description":"Typed failure of a post-run detail read whose durable run result still survives.","properties":{"code":{"description":"Stable machine code of the detail problem, if any.","type":["string","null"]},"message":{"description":"Human-readable description of the detail problem.","type":"string"},"retryable":{"description":"Whether retrying the detail read may help.","type":["boolean","null"]}},"required":["code","message","retryable"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed post-terminal detail-read problem (the durable run handle survives); null when the detail read succeeded."},"failure":{"anyOf":[{"additionalProperties":false,"description":"Typed failure record for a run: phase, category, evidence references, and suggested next actions.","properties":{"attemptId":{"default":null,"description":"Attempt involved in the failure, when known.","type":["string","null"]},"captureFailure":{"additionalProperties":false,"properties":{"bufferBudgetBytes":{"minimum":0,"type":"integer"},"causeCode":{"type":"string"},"cleanup":{"additionalProperties":false,"properties":{"code":{"type":["string","null"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"code":{"enum":["capture_output_exceeded","capture_output_incomplete","capture_preview_truncated","capture_failed"],"type":"string"},"drain":{"const":"truncated","type":"string"},"message":{"type":"string"},"stream":{"enum":["stdout","stderr"],"type":"string"}},"required":["code","message"],"type":"object"},"category":{"default":"unknown","description":"Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness.","enum":["validation","project","auth","harness_unavailable","harness_error","config_error","budget","policy","cancelled","internal","unknown"],"type":"string"},"code":{"anyOf":[{"description":"Machine-readable failure sub-code within a RunFailure category, including historical delegated-run failures and active access-profile refusals.","enum":["finite_zero","hard_cap","estimate_headroom","unknown_paid_in_flight","budget_overshoot","cost_unverifiable","delegation_child_drain_timeout","subscription_window_exhausted","credential_pool_exhausted","input_too_large","vendor_cli_too_old","credential_source_unconfirmed","delegated_home_unavailable","delegated_confinement_unavailable","delegated_evidence_incomplete","access_profile_incompatible","auxiliary_writable_roots_unsupported","retired_access_profile"],"type":"string"},{"type":"null"}],"default":null,"description":"Machine-readable failure sub-code within the category; null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage."},"eventRefs":{"default":[],"description":"Event references relevant to the failure.","items":{"type":"string"},"type":"array"},"harnessId":{"default":null,"description":"Harness involved in the failure, when known.","type":["string","null"]},"logRefs":{"default":[],"description":"Log artifact paths relevant to the failure.","items":{"type":"string"},"type":"array"},"nextActions":{"default":[],"description":"Suggested operator next actions.","items":{"type":"string"},"type":"array"},"phase":{"default":"unknown","description":"Pipeline phase where the failure happened.","type":"string"},"poolAttempts":{"default":[],"description":"Every failed execution try in order, each with its own account and error text; empty when no try failed (and for records written before this field existed).","items":{"additionalProperties":false,"description":"Per-try account attribution of a failed execution try (diagnostic evidence only).","properties":{"attemptId":{"description":"Attempt the try belongs to.","minLength":1,"type":"string"},"category":{"description":"Typed failure category of the try; untyped errors are unknown_harness_error.","enum":["timeout","rate_limited","auth_failed","capability_refused","process_crash","config_error","unknown_harness_error"],"type":"string"},"error":{"description":"The try's own error text with its original wording and whitespace, redacted.","type":"string"},"harnessId":{"description":"Harness the try ran on.","minLength":1,"type":"string"},"observedAt":{"description":"When the try's first error was observed.","format":"date-time","type":"string"},"phase":{"description":"How far the try got: before a typed session start, after start but before agent progress, or after progress.","enum":["pre_start","pre_progress","after_progress"],"type":"string"},"profileDisplayName":{"description":"The row's display name at try time (redacted); null for the default route.","type":["string","null"]},"profileId":{"description":"Account row the try ran on; null = the harness default route.","type":["string","null"]},"requestedModel":{"description":"Model the try asked for; null = the harness default model.","type":["string","null"]},"tryIndex":{"description":"Zero-based try index within the attempt.","minimum":0,"type":"integer"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"description":"The vendor's own typed failure for this try, when the adapter attached one."}},"required":["harnessId","profileId","profileDisplayName","requestedModel","attemptId","tryIndex","observedAt","phase","category","error","vendorFailure"],"type":"object"},"type":"array"},"rawDetailRef":{"default":null,"description":"Artifact path holding the raw (redacted) failure detail.","type":["string","null"]},"requestRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"actual":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"kind":{"const":"input_too_large","type":"string"},"limit":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"native_code":{"minLength":1,"type":"string"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"}},"required":["scope","unit","limit","source","kind","actual","native_code"],"type":"object"},{"additionalProperties":false,"properties":{"binary_path":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"installed_version":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"kind":{"const":"vendor_cli_too_old","type":"string"},"native_code":{"const":"claude_code_version_too_old","type":"string"},"source":{"const":"claude_stdout","type":"string"}},"required":["kind","native_code","source","binary_path","installed_version"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"credential_source_unconfirmed","type":"string"},"native_code":{"const":"grok_credential_source_unconfirmed","type":"string"},"reported_source":{"description":"Redacted credential source the vendor's startup frame reported.","maxLength":80,"type":"string"},"source":{"const":"grok_init","type":"string"}},"required":["kind","native_code","source","reported_source"],"type":"object"}],"description":"Vendor-attested request refusal that stops retries and account rotation on its harness; input, executable and credential-source causes carry their own evidence."},"resetsAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the refused window reopens (a spent subscription quota window), or null when the failure has no such time. Callers schedule a retry off this field, never off safeMessage."},"runDir":{"default":null,"description":"Run artifact directory.","type":["string","null"]},"safeMessage":{"description":"Redacted human-readable failure message.","type":"string"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"default":null,"description":"The vendor's own typed failure for the attempt this record speaks for, or null when no vendor-typed evidence exists (every harness without such a channel, and any unreadable record). Facts only: carries no remedy."}},"required":["safeMessage"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed terminal failure detail and recovery actions; null for non-failed runs."},"outcomeBanner":{"default":null,"description":"Server-owned outcome headline (D18); null while non-terminal.","type":["string","null"]},"outcomeFacts":{"anyOf":[{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},{"type":"null"}],"default":null,"description":"The D8 terminal outcome axes (checks/review/reason/noChanges), when terminal."},"parentRunId":{"default":null,"description":"Server-owned ordinary parent/follow-up run id, when present.","type":["string","null"]},"pendingInteractions":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Count of questions still awaiting answers, when known."},"planReadiness":{"anyOf":[{"additionalProperties":false,"description":"Server-derived readiness of a plan run (one derivation owner; D17).","properties":{"questionCount":{"default":0,"minimum":0,"type":"integer"},"state":{"description":"Derived plan readiness: ready (block parsed, zero open questions), needs_answers (open questions remain), unverified (no parseable block — the planner ignored the format).","enum":["ready","needs_answers","unverified"],"type":"string"}},"required":["state"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived plan readiness (plan runs only, D17); null otherwise."},"resumable":{"anyOf":[{"additionalProperties":false,"description":"Terminal facts of a stopped run that can be continued: cause, limit evidence, available carriers, the native session and the workspace.","properties":{"carriers":{"description":"Continuity representations still available (NOT quota readiness; readiness is described by the limit facts).","items":{"description":"A continuity representation still available for a stopped run.","enum":["native","native_moved","packet"],"type":"string"},"type":"array"},"cause":{"description":"Typed reason the previous process stopped: a vendor limit (next account eligible), the whole pool spent, a pinned account's limit, a transport death (crash, timeout, watchdog), a confirmed native tool permission refusal, context exhaustion, the wall-clock deadline, a cancel, a daemon/host restart, a model that asked for input, or another typed cause.","enum":["vendor_limit","pool_exhausted","pinned_limit","transport","permission_denied","context_exhausted","wall_clock","cancelled","host_restart","input_required","other"],"type":"string"},"limitCode":{"description":"The typed vendor limit code that ended the work, when any.","type":["string","null"]},"limitEvidence":{"anyOf":[{"description":"window: the vendor named the spent window (a reset instant or a constraint id); unspecified: a typed limit without a window — a bare backoff frame is transport, not a limit.","enum":["window","unspecified"],"type":"string"},{"type":"null"}],"description":"window: the vendor named the spent window (a reset instant or a constraint id); unspecified: a typed limit without a window — a bare backoff frame is transport, not a limit."},"limitWindow":{"description":"The vendor's own name for the spent window (e.g. five_hour, seven_day_opus), when known.","type":["string","null"]},"resetsAt":{"description":"When the spent vendor window reopens, only from a vendor signal; never fabricated.","type":["string","null"]},"session":{"anyOf":[{"additionalProperties":false,"properties":{"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"holderProfileId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"nativeSessionId":{"minLength":1,"type":"string"}},"required":["harness","nativeSessionId","holderProfileId"],"type":"object"},{"type":"null"}],"description":"The native session a continuation can resume, when one exists."},"workspace":{"additionalProperties":false,"description":"Where the stopped work's tree is: the live root, a retained envelope, or gone.","properties":{"kind":{"enum":["in_place","retained_envelope","none"],"type":"string"},"root":{"type":["string","null"]}},"required":["kind","root"],"type":"object"}},"required":["cause","resetsAt","limitWindow","limitEvidence","carriers","limitCode","session","workspace"],"type":"object"},{"type":"null"}],"description":"Terminal facts of stopped unfinished work that claudexor_run_continue can continue (cause, resetsAt, carriers, session, workspace); null when the work finished or the run is not terminal, omitted when not projected."},"retainedEnvelope":{"anyOf":[{"additionalProperties":false,"description":"An isolated envelope kept for continuation: continue it with continueFrom, or release it with the discard decision.","properties":{"bytes":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"description":"Disk use of the kept envelope (tree + scoped home); null when not measured."},"cause":{"anyOf":[{"description":"Typed reason the previous process stopped: a vendor limit (next account eligible), the whole pool spent, a pinned account's limit, a transport death (crash, timeout, watchdog), a confirmed native tool permission refusal, context exhaustion, the wall-clock deadline, a cancel, a daemon/host restart, a model that asked for input, or another typed cause.","enum":["vendor_limit","pool_exhausted","pinned_limit","transport","permission_denied","context_exhausted","wall_clock","cancelled","host_restart","input_required","other"],"type":"string"},{"type":"null"}],"description":"Why the run stopped, when recorded."},"retainedAt":{"description":"When the envelope was kept.","type":"string"},"root":{"description":"Absolute path of the kept working tree.","type":"string"}},"required":["root","bytes","retainedAt","cause"],"type":"object"},{"type":"null"}],"description":"Isolated envelope kept for a successor (disk use visible); null when none, omitted when not projected."},"runDir":{"default":null,"description":"Artifact directory; null when absent.","type":["string","null"]},"runFacts":{"anyOf":[{"additionalProperties":false,"description":"Validated immutable terminal facts for one run.","properties":{"apply":{"additionalProperties":false,"description":"Terminal apply eligibility and operator-decision state.","properties":{"eligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Delivery-gate eligibility at terminalization; null when nothing is applyable."},"operator_decision_present":{"default":false,"description":"Whether a valid operator decision was present when the receipt was finalized.","type":"boolean"}},"type":"object"},"deliverable":{"additionalProperties":false,"description":"Canonical primary-output presence and identity for a terminal run.","properties":{"kind":{"anyOf":[{"enum":["answer","report","plan","patch","files","structured_output"],"type":"string"},{"type":"null"}],"description":"Kind of canonical primary deliverable; null when none exists."},"path":{"description":"Run-relative path of the canonical primary deliverable; null when absent.","type":["string","null"]},"present":{"description":"Whether the canonical primary deliverable exists.","type":"boolean"},"producer_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt that produced the deliverable, when known."}},"required":["present","kind","path"],"type":"object"},"gates":{"additionalProperties":false,"description":"Canonical gate configuration and terminal receipt projection.","properties":{"configured":{"description":"Whether the frozen task configured deterministic gates.","type":"boolean"},"executed":{"description":"Whether the terminal attempt executed the gate set.","type":"boolean"},"receipt_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt whose gate receipt decides this projection; null when no gates executed."},"required":{"description":"Number of configured required gates.","minimum":0,"type":"integer"},"state":{"description":"Terminal state of the configured deterministic gate set.","enum":["not_configured","passed","failed","skipped"],"type":"string"},"total":{"description":"Total configured deterministic gates.","minimum":0,"type":"integer"}},"required":["configured","required","total","executed","state"],"type":"object"},"generated_at":{"description":"When this immutable terminal receipt was finalized.","minLength":1,"type":"string"},"mode":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"outcome":{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},"participants":{"additionalProperties":false,"description":"Terminal participant graph plus its planner-lane count.","properties":{"attempts":{"default":[],"description":"Role-labelled participant roster.","items":{"additionalProperties":false,"description":"One role-labelled participant in the terminal run graph.","properties":{"attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Attempt id when the participant owns an orchestrator attempt; null for reviewer-panel members."},"deliverable_present":{"default":false,"description":"Whether this participant produced the deliverable its role requested.","type":"boolean"},"harness_id":{"description":"Harness that served this participant role.","minLength":1,"type":"string"},"role":{"description":"Canonical role of one participant in the terminal run graph.","enum":["planner","merge","candidate","scout","reducer","reviewer"],"type":"string"},"status":{"anyOf":[{"description":"Terminal outcome recorded for one run participant.","enum":["success","success_with_warnings","blocked","failed"],"type":"string"},{"type":"null"}],"default":null,"description":"Participant outcome when recorded; null for artifact-only reviewer membership."}},"required":["attempt_id","harness_id","role"],"type":"object"},"type":"array"},"planners":{"description":"Number of participants whose canonical role is planner.","minimum":0,"type":"integer"}},"required":["planners"],"type":"object"},"presentation":{"additionalProperties":false,"description":"Immutable terminal output state and primary artifact. Absent only on legacy RunFacts receipts.","properties":{"primary":{"anyOf":[{"additionalProperties":false,"description":"Primary user-facing artifact selected once during terminal preparation.","properties":{"kind":{"description":"Presentation kind of the terminal primary artifact.","enum":["answer","report","plan","patch","files","structured_output","diagnostic"],"type":"string"},"path":{"description":"Normalized run-relative path of the terminal primary artifact.","minLength":1,"type":"string"}},"required":["kind","path"],"type":"object"},{"type":"null"}],"description":"Selected terminal primary artifact, or null when the receipt announces readiness without a primary deliverable."},"state":{"description":"Terminal output readiness decided by the last valid output.ready receipt.","enum":["ready","diagnostic"],"type":"string"}},"required":["state","primary"],"type":"object"},"required_actions":{"default":[],"description":"Typed actions required to unblock this terminal outcome.","items":{"additionalProperties":false,"description":"One typed required operator action derived from a run's terminal outcome facts.","properties":{"detail":{"description":"Human-readable guidance for this action (English-only, INV-141).","type":"string"},"id":{"description":"Stable machine id for a required operator action on a blocked terminal run.","enum":["provide_required_input","complete_incomplete_work","resolve_review_block","fix_failed_checks","record_operator_decision"],"type":"string"}},"required":["id","detail"],"type":"object"},"type":"array"},"review":{"additionalProperties":false,"description":"Canonical terminal review verdict and blocking-finding identity.","properties":{"blocker_ids":{"default":[],"description":"Stable ids of accepted evidence-backed blocking findings.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"blockers":{"description":"Number of blocking findings.","minimum":0,"type":"integer"},"state":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"}},"required":["state","blockers"],"type":"object"},"run_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"schema_version":{"const":2,"description":"Schema version of the artifact; bumped on breaking ABI changes.","type":"number"},"task_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["schema_version","run_id","task_id","mode","outcome","deliverable","participants","gates","review","apply","generated_at"],"type":"object"},{"type":"null"}],"default":null,"description":"Validated canonical terminal RunFacts receipt; null while active, unavailable, or for legacy runs."},"runId":{"default":null,"description":"The daemon run id, when known.","type":["string","null"]},"secretLike":{"anyOf":[{"additionalProperties":false,"description":"What a run's saved copies hide: secret-like strings kept in the work, hidden on disk.","properties":{"answerMatches":{"description":"Strings hidden in the answer.","minimum":0,"type":"integer"},"binaryPaths":{"description":"Binary files whose payload the saved patch omits.","items":{"type":"string"},"type":"array"},"exactPatchRecorded":{"description":"For a redacted copy: whether the private exact patch object was recorded (false = deferred Apply answers patch_exact_bytes_unavailable); null for an exact copy.","type":["boolean","null"]},"files":{"description":"Changed files with hidden strings in the saved patch copy.","items":{"additionalProperties":false,"properties":{"kinds":{"description":"Content-rule ids that matched.","items":{"type":"string"},"type":"array"},"matches":{"description":"Strings hidden in that file's diff.","minimum":0,"type":"integer"},"path":{"description":"Changed file whose saved diff hides strings.","type":"string"}},"required":["path","matches","kinds"],"type":"object"},"type":"array"},"mediaWithheld":{"description":"Images that were not saved as produced outputs.","items":{"type":"string"},"type":"array"},"persistedPatch":{"description":"Whether the saved final/patch.diff is byte-exact or a display-only redacted copy.","enum":["exact","redacted"],"type":"string"},"totalMatches":{"description":"Strings hidden across patch and answer.","minimum":0,"type":"integer"}},"required":["totalMatches","answerMatches","files","binaryPaths","mediaWithheld","persistedPatch","exactPatchRecorded"],"type":"object"},{"type":"null"}],"default":null,"description":"INV-062 disclosure: secret-like strings kept in the work but hidden in saved copies (paths and counts only); null when nothing was hidden."},"status":{"default":null,"description":"The run's terminal or in-flight lifecycle state, when known.","type":["string","null"]},"summary":{"description":"Human-readable outcome/status text (same as the tool's text content).","type":"string"}},"required":["summary"],"type":"object"}},{"annotations":{"readOnlyHint":true},"description":"Read a durable run's terminal result and apply eligibility; non-terminal runs report their current state without pretending to be complete.","inputSchema":{"additionalProperties":false,"properties":{"runId":{"description":"Daemon run id (from a run tool's runId trailer or claudexor_runs).","minLength":1,"type":"string"}},"required":["runId"],"type":"object"},"name":"claudexor_run_result","outputSchema":{"additionalProperties":false,"description":"Structured MCP result for Claudexor durable-run read tools (inspect/status/result).","properties":{"applyEligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived apply-gate verdict; null for read-only runs or when no patch exists."},"attemptExecution":{"items":{"additionalProperties":false,"description":"Compact projection of existing attempt execution and amount evidence.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"harnessId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"processing":{"additionalProperties":false,"description":"Requested intent, submitted native control, and observed execution are independent facts. A submitted flag never proves observed service; mixed or missing session observations remain explicit.","properties":{"observed":{"enum":["standard","fast","economy","mixed","unknown"],"type":"string"},"observedNative":{"items":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"type":"array"},"reason":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"requested":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},"submitted":{"anyOf":[{"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence.","enum":["standard","fast","economy"],"type":"string"},{"type":"null"}],"description":"Advisory service preference. Fast or Economy may use ordinary Standard service; fallback never introduces Fast. Omission preserves native defaults. Explicit native serviceTier takes precedence."},"submittedNative":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."}},"required":["requested","submitted","submittedNative","observed","observedNative","reason","source"],"type":"object"},"processingCostBasis":{"additionalProperties":false,"description":"Mode-qualified billing evidence for an existing cost record. Authentication alone does not establish included premium service; credits, cash, and token valuation stay distinct.","properties":{"debit":{"const":"unobserved","description":"The route reports no actual cash or purchased-credit debit. Included service still admits the work, but its cash stays unknown instead of zero and is outside the finite cap; absence keeps proven ordinary inclusion as zero cash.","type":"string"},"kind":{"enum":["included","paid_credits","cash","valuation","unknown"],"type":"string"},"nativeMode":{"anyOf":[{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"},{"type":"null"}],"description":"User-supplied string that must contain visible content, not just whitespace."},"source":{"description":"User-supplied string that must contain visible content, not just whitespace.","minLength":1,"pattern":"\\S","type":"string"}},"required":["nativeMode","kind","source"],"type":"object"},"usageCost":{"additionalProperties":false,"description":"Observed usage components. An amount of unknown meaning is not charged cash; separately proven included service can still establish exact zero incremental cash unless its route reports no actual debit.","properties":{"cashKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"cashUsd":{"minimum":0,"type":"number"},"unknownUsd":{"minimum":0,"type":"number"},"valuationKnowledge":{"description":"Quality of incremental-cash cost evidence for an operation.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"minimum":0,"type":"number"}},"required":["cashUsd","valuationUsd","unknownUsd","cashKnowledge","valuationKnowledge"],"type":"object"}},"required":["attemptId","harnessId"],"type":"object"},"type":"array"},"budget":{"anyOf":[{"additionalProperties":false,"description":"Budget snapshot for a run: cap, spend, and provenance.","properties":{"cashKnowledge":{"description":"Cash certainty from the ledger; explicit unknown keeps spendUsd null independently of valuation.","enum":["exact","estimated","unknown"],"type":"string"},"controllableSpendUsd":{"default":null,"description":"Cash governed by the finite cap: settled amounts on routes Claudexor controls; null when that cash is unknown. spendUsd can still be null when an included subscription reports no actual debit.","type":["number","null"]},"estimated":{"default":false,"description":"True when settled cash is estimated rather than exact; subscription valuation confidence is reported separately.","type":"boolean"},"evidence":{"default":"complete","description":"Integrity of the canonical events this spend fallback read: 'incomplete' when malformed/non-object event lines were skipped, 'unavailable' when the events file was unreadable, else 'complete'. A non-complete value means the projected spend may disagree with disk truth.","enum":["complete","incomplete","unavailable"],"type":"string"},"paidBudget":{"anyOf":[{"additionalProperties":false,"properties":{"kind":{"const":"unlimited","type":"string"}},"required":["kind"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"finite","type":"string"},"maxUsd":{"minimum":0,"type":"number"}},"required":["kind","maxUsd"],"type":"object"}],"default":{"kind":"unlimited"},"description":"Incremental-cash budget: explicitly unlimited or a finite non-negative USD cap."},"remainingUsd":{"default":null,"description":"Remaining finite cap after controllableSpendUsd; null when no cap or unknown.","type":["number","null"]},"source":{"default":"unknown","description":"Where the snapshot came from: the decision record, live events, settings, or unknown.","enum":["decision","events","settings","unknown"],"type":"string"},"spendUsd":{"default":null,"description":"CASH spend so far in USD; null when unknown.","type":["number","null"]},"valuationKnowledge":{"default":"unknown","description":"Confidence of valuationUsd: 'estimated' when token-derived, 'unknown' when no usage was reported (valuationUsd is then null), 'exact' when natively priced.","enum":["exact","estimated","unknown"],"type":"string"},"valuationUsd":{"default":null,"description":"Subscription valuation in USD (separate from billed cash); null when unknown — never a fabricated $0 (QA-023c).","type":["number","null"]}},"type":"object"},{"type":"null"}],"default":null,"description":"Run budget snapshot (cash + subscription valuation, QA-023c); null when unavailable."},"continueFrom":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Predecessor run this run continues; null for an ordinary run, omitted when the detail did not project it."},"continuity":{"description":"Per-try continuation receipts (carrier, cause, accounts, model) from the run's event log; omitted when not projected.","items":{"additionalProperties":false,"description":"Receipt of one continued try: carrier, cause, accounts, memory, model attestation.","properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"carrier":{"description":"Carrier of a continued try: native (the vendor's own session, same account), native_moved (the session file made visible in the next account's store, then resumed there), packet (a fresh session re-grounded by an evidence index), or fresh (nothing to carry — a replay of the original prompt).","enum":["native","native_moved","packet","fresh"],"type":"string"},"cause":{"description":"Typed reason the previous process stopped: a vendor limit (next account eligible), the whole pool spent, a pinned account's limit, a transport death (crash, timeout, watchdog), a confirmed native tool permission refusal, context exhaustion, the wall-clock deadline, a cancel, a daemon/host restart, a model that asked for input, or another typed cause.","enum":["vendor_limit","pool_exhausted","pinned_limit","transport","permission_denied","context_exhausted","wall_clock","cancelled","host_restart","input_required","other"],"type":"string"},"from":{"additionalProperties":false,"properties":{"attemptId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"profileId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"runId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["runId","attemptId","profileId"],"type":"object"},"identityCheck":{"description":"Whether the resumed vendor session was the one requested, judged at the earliest handshake (codex thread/resume before turn/start; claude system/init): matched, mismatch caught before the child could act, mismatch caught after it may have acted, or not applicable (no resume was requested, or a harness without the continuity capability answered with another session id, which is recorded as before).","enum":["matched_before_effects","mismatch_before_effects","mismatch_after_possible_effects","not_applicable"],"type":"string"},"inputDelivery":{"description":"Whether the predecessor's last input (its turn prompt or an admitted steering message) is known to be in the vendor history: confirmed, uncertain (carried in the notice as a reference to reconcile, never replayed blindly), or not applicable.","enum":["confirmed","uncertain","not_applicable"],"type":"string"},"instructions":{"description":"as_sent: the successor's instructions equal the predecessor's; vendor_snapshot: they differ, and the vendor may resend its recorded system prompt instead (claude records it on the first request).","enum":["as_sent","vendor_snapshot"],"type":"string"},"memory":{"description":"Its own fact: a native resume carries the whole history (full); a packet re-brief is partial; a native resume that lost history (e.g. a rejected compacted item) is partial/unknown.","enum":["full","partial","unknown"],"type":"string"},"modelMismatch":{"type":["boolean","null"]},"observedModel":{"description":"THIS try's attested model (never borrowed from another try).","type":["string","null"]},"reingestedTokens":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"description":"Input + cache-creation tokens of the first resumed request, when known."},"to":{"additionalProperties":false,"properties":{"profileId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["profileId"],"type":"object"},"tryIndex":{"description":"Native try within the attempt; joins the receipt to its try.","minimum":0,"type":"integer"},"workspace":{"description":"Whether the continued try runs in the predecessor's execution root.","enum":["same_root","different_root"],"type":"string"}},"required":["tryIndex","attemptId","carrier","cause","from","to","workspace","memory","instructions","reingestedTokens","observedModel","modelMismatch","identityCheck","inputDelivery"],"type":"object"},"type":"array"},"council":{"anyOf":[{"additionalProperties":false,"description":"Council membership + merge disclosure for a --council plan run.","properties":{"degraded":{"default":false,"description":"True when fewer contract-accepted drafts than requested, including any retained unverified contribution; failures remain disclosed per member.","type":"boolean"},"drafted":{"description":"Members with contract-accepted drafts; excludes retained unverified inputs and is not a work-completion or verification count.","minimum":0,"type":"integer"},"members":{"default":[],"description":"Per-member role and outcome.","items":{"additionalProperties":false,"description":"One council member's role and draft/merge outcome.","properties":{"error":{"default":null,"description":"First redacted draft error; null unless the member failed.","type":["string","null"]},"harnessId":{"description":"Harness that drafted (or merged) this member's plan.","minLength":1,"type":"string"},"role":{"description":"primary = the merger that synthesizes the unified plan; member = draft only.","enum":["primary","member"],"type":"string"},"status":{"description":"Draft outcome: drafted = contract-accepted input; merged = accepted draft and successful merge; failed stays failed even when its unverified text helped the merger.","enum":["drafted","failed","merged"],"type":"string"}},"required":["harnessId","role","status"],"type":"object"},"type":"array"},"mergedBy":{"default":null,"description":"Harness that produced the unified plan (the primary); null if the merge failed.","type":["string","null"]},"requested":{"description":"Requested member count (n; at least 2, up to the configured Council cap).","exclusiveMinimum":0,"type":"integer"}},"required":["requested","drafted"],"type":"object"},{"type":"null"}],"default":null,"description":"Council membership + merge disclosure (QA-023b); null for solo/non-plan runs."},"decisionStatus":{"default":null,"description":"The arbitration decision status, when the run reached arbitration.","type":["string","null"]},"deferredMessage":{"anyOf":[{"additionalProperties":false,"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved.","properties":{"dispatchedRevision":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},{"type":"null"}]},"draftId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"hold":{"anyOf":[{"additionalProperties":false,"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation.","properties":{"code":{"enum":["predecessor_failed","predecessor_cancelled","predecessor_interrupted","predecessor_needs_input","predecessor_incomplete","predecessor_facts_unavailable","predecessor_work_unverified","predecessor_checks_failed","predecessor_review_blocked","predecessor_output_unavailable","settlement_unknown","stop_requested","shutdown","restart_requires_controller","partition_retired","admission_refused"],"type":"string"},"problem":{"additionalProperties":false,"description":"Typed, sanitized problem for a thread turn that could not start.","properties":{"code":{"default":null,"description":"Machine-readable refusal code carried from the throwing gate; null when the failure had no typed code.","type":["string","null"]},"context":{"additionalProperties":{},"default":{},"description":"Bounded typed recovery context; never arbitrary provider or environment output.","type":"object"},"message":{"description":"Human-readable refusal message.","type":"string"},"required_actions":{"default":[],"description":"Bounded user actions that may make an exact retry succeed.","items":{"maxLength":512,"minLength":1,"type":"string"},"maxItems":16,"type":"array"},"retryable":{"default":true,"description":"True when retry can replay this turn (a job was recorded before the failure); false when no job exists to replay.","type":"boolean"}},"required":["message"],"type":"object"}},"required":["code"],"type":"object"},{"type":"null"}],"description":"Stable hold. Editing, observation and readiness restoration never rearm it; inspect the predecessor result and clear before an ordinary continuation."},"predecessorJobId":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"predecessorResult":{"description":"Existing addressed run-detail/result path; no duplicate result store.","type":"string"},"predecessorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"revision":{"exclusiveMinimum":0,"maximum":9007199254740991,"type":"integer"},"state":{"enum":["waiting","held","dispatched","cleared"],"type":"string"},"successorJobId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"successorRunId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."}},"required":["draftId","revision","state","predecessorJobId","predecessorRunId","predecessorResult","hold","dispatchedRevision","successorJobId","successorRunId"],"type":"object"},{"type":"null"}],"description":"Compact addressed draft state, with exact predecessor result and successor handles. A terminal predecessor does not imply the draft has resolved."},"delegatedFromRunId":{"default":null,"description":"Claudexor Delegate parent id; null for ordinary runs and native subagents.","type":["string","null"]},"delegation":{"anyOf":[{"additionalProperties":false,"description":"Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.","properties":{"effective":{"default":false,"type":"boolean"},"reason":{"default":"not_requested","enum":["pending","not_requested","injected_unused","used","runtime_unavailable","manifest_unsupported","access_profile_incompatible","partially_degraded","startup_failed"],"type":"string"},"remediation":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}],"default":null},"requested":{"default":false,"type":"boolean"},"used":{"default":false,"type":"boolean"}},"type":"object"},{"type":"null"}],"default":null,"description":"Typed Delegate receipt; null when unavailable or legacy."},"detailProblem":{"anyOf":[{"additionalProperties":false,"description":"Typed failure of a post-run detail read whose durable run result still survives.","properties":{"code":{"description":"Stable machine code of the detail problem, if any.","type":["string","null"]},"message":{"description":"Human-readable description of the detail problem.","type":"string"},"retryable":{"description":"Whether retrying the detail read may help.","type":["boolean","null"]}},"required":["code","message","retryable"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed post-terminal detail-read problem (the durable run handle survives); null when the detail read succeeded."},"failure":{"anyOf":[{"additionalProperties":false,"description":"Typed failure record for a run: phase, category, evidence references, and suggested next actions.","properties":{"attemptId":{"default":null,"description":"Attempt involved in the failure, when known.","type":["string","null"]},"captureFailure":{"additionalProperties":false,"properties":{"bufferBudgetBytes":{"minimum":0,"type":"integer"},"causeCode":{"type":"string"},"cleanup":{"additionalProperties":false,"properties":{"code":{"type":["string","null"]},"message":{"type":"string"}},"required":["code","message"],"type":"object"},"code":{"enum":["capture_output_exceeded","capture_output_incomplete","capture_preview_truncated","capture_failed"],"type":"string"},"drain":{"const":"truncated","type":"string"},"message":{"type":"string"},"stream":{"enum":["stdout","stderr"],"type":"string"}},"required":["code","message"],"type":"object"},"category":{"default":"unknown","description":"Typed failure category (validation, project, auth, harness, config, budget, policy, cancelled, internal, unknown). config_error is a settings/routing misconfiguration (e.g. quality routing with no comparable tier), corrected by changing configuration, not by re-auth or waiting for a harness.","enum":["validation","project","auth","harness_unavailable","harness_error","config_error","budget","policy","cancelled","internal","unknown"],"type":"string"},"code":{"anyOf":[{"description":"Machine-readable failure sub-code within a RunFailure category, including historical delegated-run failures and active access-profile refusals.","enum":["finite_zero","hard_cap","estimate_headroom","unknown_paid_in_flight","budget_overshoot","cost_unverifiable","delegation_child_drain_timeout","subscription_window_exhausted","credential_pool_exhausted","input_too_large","vendor_cli_too_old","credential_source_unconfirmed","delegated_home_unavailable","delegated_confinement_unavailable","delegated_evidence_incomplete","access_profile_incompatible","auxiliary_writable_roots_unsupported","retired_access_profile"],"type":"string"},{"type":"null"}],"default":null,"description":"Machine-readable failure sub-code within the category; null when the category alone is sufficient. Surfaces choose remediation from this, never by parsing safeMessage."},"eventRefs":{"default":[],"description":"Event references relevant to the failure.","items":{"type":"string"},"type":"array"},"harnessId":{"default":null,"description":"Harness involved in the failure, when known.","type":["string","null"]},"logRefs":{"default":[],"description":"Log artifact paths relevant to the failure.","items":{"type":"string"},"type":"array"},"nextActions":{"default":[],"description":"Suggested operator next actions.","items":{"type":"string"},"type":"array"},"phase":{"default":"unknown","description":"Pipeline phase where the failure happened.","type":"string"},"poolAttempts":{"default":[],"description":"Every failed execution try in order, each with its own account and error text; empty when no try failed (and for records written before this field existed).","items":{"additionalProperties":false,"description":"Per-try account attribution of a failed execution try (diagnostic evidence only).","properties":{"attemptId":{"description":"Attempt the try belongs to.","minLength":1,"type":"string"},"category":{"description":"Typed failure category of the try; untyped errors are unknown_harness_error.","enum":["timeout","rate_limited","auth_failed","capability_refused","process_crash","config_error","unknown_harness_error"],"type":"string"},"error":{"description":"The try's own error text with its original wording and whitespace, redacted.","type":"string"},"harnessId":{"description":"Harness the try ran on.","minLength":1,"type":"string"},"observedAt":{"description":"When the try's first error was observed.","format":"date-time","type":"string"},"phase":{"description":"How far the try got: before a typed session start, after start but before agent progress, or after progress.","enum":["pre_start","pre_progress","after_progress"],"type":"string"},"profileDisplayName":{"description":"The row's display name at try time (redacted); null for the default route.","type":["string","null"]},"profileId":{"description":"Account row the try ran on; null = the harness default route.","type":["string","null"]},"requestedModel":{"description":"Model the try asked for; null = the harness default model.","type":["string","null"]},"tryIndex":{"description":"Zero-based try index within the attempt.","minimum":0,"type":"integer"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"description":"The vendor's own typed failure for this try, when the adapter attached one."}},"required":["harnessId","profileId","profileDisplayName","requestedModel","attemptId","tryIndex","observedAt","phase","category","error","vendorFailure"],"type":"object"},"type":"array"},"rawDetailRef":{"default":null,"description":"Artifact path holding the raw (redacted) failure detail.","type":["string","null"]},"requestRefusal":{"anyOf":[{"additionalProperties":false,"properties":{"actual":{"anyOf":[{"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"kind":{"const":"input_too_large","type":"string"},"limit":{"anyOf":[{"exclusiveMinimum":0,"maximum":9007199254740991,"minimum":-9007199254740991,"type":"integer"},{"type":"null"}]},"native_code":{"minLength":1,"type":"string"},"scope":{"const":"turn_text","description":"All text input items in one native turn; separate instructions are excluded.","type":"string"},"source":{"minLength":1,"type":"string"},"unit":{"const":"unicode_scalars","type":"string"}},"required":["scope","unit","limit","source","kind","actual","native_code"],"type":"object"},{"additionalProperties":false,"properties":{"binary_path":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"installed_version":{"anyOf":[{"minLength":1,"type":"string"},{"type":"null"}]},"kind":{"const":"vendor_cli_too_old","type":"string"},"native_code":{"const":"claude_code_version_too_old","type":"string"},"source":{"const":"claude_stdout","type":"string"}},"required":["kind","native_code","source","binary_path","installed_version"],"type":"object"},{"additionalProperties":false,"properties":{"kind":{"const":"credential_source_unconfirmed","type":"string"},"native_code":{"const":"grok_credential_source_unconfirmed","type":"string"},"reported_source":{"description":"Redacted credential source the vendor's startup frame reported.","maxLength":80,"type":"string"},"source":{"const":"grok_init","type":"string"}},"required":["kind","native_code","source","reported_source"],"type":"object"}],"description":"Vendor-attested request refusal that stops retries and account rotation on its harness; input, executable and credential-source causes carry their own evidence."},"resetsAt":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When the refused window reopens (a spent subscription quota window), or null when the failure has no such time. Callers schedule a retry off this field, never off safeMessage."},"runDir":{"default":null,"description":"Run artifact directory.","type":["string","null"]},"safeMessage":{"description":"Redacted human-readable failure message.","type":"string"},"vendorFailure":{"anyOf":[{"additionalProperties":false,"description":"Vendor-typed failure evidence read from a vendor-owned machine-readable record, never parsed from prose.","properties":{"code":{"anyOf":[{"maxLength":128,"minLength":1,"type":"string"},{"type":"null"}],"description":"The vendor's own machine-readable failure code, verbatim; null when the vendor recorded an error without one."},"message":{"anyOf":[{"maxLength":4000,"type":"string"},{"type":"null"}],"description":"The vendor's own words from the same record, verbatim (redacted); null when absent."},"source":{"description":"Evidence channel the code was read from (codex: `codex_rollout`). An open vocabulary: consumers display it, never branch on it.","maxLength":64,"minLength":1,"type":"string"}},"required":["code","message","source"],"type":"object"},{"type":"null"}],"default":null,"description":"The vendor's own typed failure for the attempt this record speaks for, or null when no vendor-typed evidence exists (every harness without such a channel, and any unreadable record). Facts only: carries no remedy."}},"required":["safeMessage"],"type":"object"},{"type":"null"}],"default":null,"description":"Typed terminal failure detail and recovery actions; null for non-failed runs."},"outcomeBanner":{"default":null,"description":"Server-owned outcome headline (D18); null while non-terminal.","type":["string","null"]},"outcomeFacts":{"anyOf":[{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},{"type":"null"}],"default":null,"description":"The D8 terminal outcome axes (checks/review/reason/noChanges), when terminal."},"parentRunId":{"default":null,"description":"Server-owned ordinary parent/follow-up run id, when present.","type":["string","null"]},"pendingInteractions":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"default":null,"description":"Count of questions still awaiting answers, when known."},"planReadiness":{"anyOf":[{"additionalProperties":false,"description":"Server-derived readiness of a plan run (one derivation owner; D17).","properties":{"questionCount":{"default":0,"minimum":0,"type":"integer"},"state":{"description":"Derived plan readiness: ready (block parsed, zero open questions), needs_answers (open questions remain), unverified (no parseable block — the planner ignored the format).","enum":["ready","needs_answers","unverified"],"type":"string"}},"required":["state"],"type":"object"},{"type":"null"}],"default":null,"description":"Derived plan readiness (plan runs only, D17); null otherwise."},"resumable":{"anyOf":[{"additionalProperties":false,"description":"Terminal facts of a stopped run that can be continued: cause, limit evidence, available carriers, the native session and the workspace.","properties":{"carriers":{"description":"Continuity representations still available (NOT quota readiness; readiness is described by the limit facts).","items":{"description":"A continuity representation still available for a stopped run.","enum":["native","native_moved","packet"],"type":"string"},"type":"array"},"cause":{"description":"Typed reason the previous process stopped: a vendor limit (next account eligible), the whole pool spent, a pinned account's limit, a transport death (crash, timeout, watchdog), a confirmed native tool permission refusal, context exhaustion, the wall-clock deadline, a cancel, a daemon/host restart, a model that asked for input, or another typed cause.","enum":["vendor_limit","pool_exhausted","pinned_limit","transport","permission_denied","context_exhausted","wall_clock","cancelled","host_restart","input_required","other"],"type":"string"},"limitCode":{"description":"The typed vendor limit code that ended the work, when any.","type":["string","null"]},"limitEvidence":{"anyOf":[{"description":"window: the vendor named the spent window (a reset instant or a constraint id); unspecified: a typed limit without a window — a bare backoff frame is transport, not a limit.","enum":["window","unspecified"],"type":"string"},{"type":"null"}],"description":"window: the vendor named the spent window (a reset instant or a constraint id); unspecified: a typed limit without a window — a bare backoff frame is transport, not a limit."},"limitWindow":{"description":"The vendor's own name for the spent window (e.g. five_hour, seven_day_opus), when known.","type":["string","null"]},"resetsAt":{"description":"When the spent vendor window reopens, only from a vendor signal; never fabricated.","type":["string","null"]},"session":{"anyOf":[{"additionalProperties":false,"properties":{"harness":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"holderProfileId":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Non-empty identifier string."},"nativeSessionId":{"minLength":1,"type":"string"}},"required":["harness","nativeSessionId","holderProfileId"],"type":"object"},{"type":"null"}],"description":"The native session a continuation can resume, when one exists."},"workspace":{"additionalProperties":false,"description":"Where the stopped work's tree is: the live root, a retained envelope, or gone.","properties":{"kind":{"enum":["in_place","retained_envelope","none"],"type":"string"},"root":{"type":["string","null"]}},"required":["kind","root"],"type":"object"}},"required":["cause","resetsAt","limitWindow","limitEvidence","carriers","limitCode","session","workspace"],"type":"object"},{"type":"null"}],"description":"Terminal facts of stopped unfinished work that claudexor_run_continue can continue (cause, resetsAt, carriers, session, workspace); null when the work finished or the run is not terminal, omitted when not projected."},"retainedEnvelope":{"anyOf":[{"additionalProperties":false,"description":"An isolated envelope kept for continuation: continue it with continueFrom, or release it with the discard decision.","properties":{"bytes":{"anyOf":[{"minimum":0,"type":"integer"},{"type":"null"}],"description":"Disk use of the kept envelope (tree + scoped home); null when not measured."},"cause":{"anyOf":[{"description":"Typed reason the previous process stopped: a vendor limit (next account eligible), the whole pool spent, a pinned account's limit, a transport death (crash, timeout, watchdog), a confirmed native tool permission refusal, context exhaustion, the wall-clock deadline, a cancel, a daemon/host restart, a model that asked for input, or another typed cause.","enum":["vendor_limit","pool_exhausted","pinned_limit","transport","permission_denied","context_exhausted","wall_clock","cancelled","host_restart","input_required","other"],"type":"string"},{"type":"null"}],"description":"Why the run stopped, when recorded."},"retainedAt":{"description":"When the envelope was kept.","type":"string"},"root":{"description":"Absolute path of the kept working tree.","type":"string"}},"required":["root","bytes","retainedAt","cause"],"type":"object"},{"type":"null"}],"description":"Isolated envelope kept for a successor (disk use visible); null when none, omitted when not projected."},"runDir":{"default":null,"description":"Artifact directory; null when absent.","type":["string","null"]},"runFacts":{"anyOf":[{"additionalProperties":false,"description":"Validated immutable terminal facts for one run.","properties":{"apply":{"additionalProperties":false,"description":"Terminal apply eligibility and operator-decision state.","properties":{"eligibility":{"anyOf":[{"additionalProperties":false,"description":"Derived apply-gate verdict for a run's WorkProduct (single producer in the delivery gate).","properties":{"eligible":{"description":"True when the apply gate would accept this run's patch right now.","type":"boolean"},"reason":{"description":"The gate's refusal text when not eligible (null when eligible).","type":["string","null"]},"requiredAction":{"description":"Honest guidance for what actually unblocks apply (typed operator decision, add gates, re-run, or nothing to apply).","type":["string","null"]},"state":{"description":"The gate's apply-eligibility classification (e.g. needs_review | not_verified | no_changes | ok) when known.","type":["string","null"]}},"required":["eligible","state","reason","requiredAction"],"type":"object"},{"type":"null"}],"default":null,"description":"Delivery-gate eligibility at terminalization; null when nothing is applyable."},"operator_decision_present":{"default":false,"description":"Whether a valid operator decision was present when the receipt was finalized.","type":"boolean"}},"type":"object"},"deliverable":{"additionalProperties":false,"description":"Canonical primary-output presence and identity for a terminal run.","properties":{"kind":{"anyOf":[{"enum":["answer","report","plan","patch","files","structured_output"],"type":"string"},{"type":"null"}],"description":"Kind of canonical primary deliverable; null when none exists."},"path":{"description":"Run-relative path of the canonical primary deliverable; null when absent.","type":["string","null"]},"present":{"description":"Whether the canonical primary deliverable exists.","type":"boolean"},"producer_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt that produced the deliverable, when known."}},"required":["present","kind","path"],"type":"object"},"gates":{"additionalProperties":false,"description":"Canonical gate configuration and terminal receipt projection.","properties":{"configured":{"description":"Whether the frozen task configured deterministic gates.","type":"boolean"},"executed":{"description":"Whether the terminal attempt executed the gate set.","type":"boolean"},"receipt_attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"default":null,"description":"Attempt whose gate receipt decides this projection; null when no gates executed."},"required":{"description":"Number of configured required gates.","minimum":0,"type":"integer"},"state":{"description":"Terminal state of the configured deterministic gate set.","enum":["not_configured","passed","failed","skipped"],"type":"string"},"total":{"description":"Total configured deterministic gates.","minimum":0,"type":"integer"}},"required":["configured","required","total","executed","state"],"type":"object"},"generated_at":{"description":"When this immutable terminal receipt was finalized.","minLength":1,"type":"string"},"mode":{"description":"Canonical run mode: ask and plan are read-only, agent writes. Strategy controls are separate schema-owned fields, never modes.","enum":["ask","plan","agent"],"type":"string"},"outcome":{"additionalProperties":false,"description":"Independent terminal outcome axes of a run (D8/D18).","properties":{"checks":{"default":"not_configured","description":"Deterministic checks axis: configured project checks passed, failed, or none are configured (a named state, never a stand-in for review results).","enum":["passed","failed","not_configured"],"type":"string"},"lifecycle":{"description":"Terminal lifecycle of the run.","enum":["succeeded","failed","cancelled","interrupted"],"type":"string"},"noChanges":{"default":false,"description":"True when the run finished without changing any files (the ex no_op fact).","type":["boolean","null"]},"reason":{"anyOf":[{"description":"Typed reason qualifying a non-clean terminal; null on a clean success.","enum":["harness_failed","no_changes","review_blocked","checks_failed","budget_exhausted","budget_overshoot","cost_unverifiable","not_converged","stuck_no_progress","wall_clock_exceeded","user_cancelled","host_cancelled","owner_task_gone","crash_interrupted","workspace_unavailable","input_required","work_incomplete","context_capacity_exhausted","work_report_contract"],"type":"string"},{"type":"null"}],"default":null,"description":"Typed reason qualifying a non-clean terminal; null on a clean success."},"review":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"},"review_requested":{"description":"Frozen model-review intent. False permits an honestly unreviewed result; absent historical records retain the review requirement.","type":"boolean"},"work_state":{"additionalProperties":false,"description":"D-16 model-attested work outcome, orthogonal to lifecycle; a needs_input/incomplete state vetoes applyability and exit 0. Absent on runs with no work_report transport.","properties":{"required_inputs":{"description":"Carried through from a needs_input/incomplete WorkReport for honest disclosure.","items":{"additionalProperties":false,"description":"One blocking input a needs_input/incomplete WorkReport lists.","properties":{"description":{"description":"Human-readable description of what is needed and why.","maxLength":1024,"type":"string"},"kind":{"description":"Category of a missing input a needs_input/incomplete report lists: a file, additional context, a credential, a permission, a human decision, or an external dependency.","enum":["file","context","credential","permission","decision","external_dependency"],"type":"string"},"locator":{"anyOf":[{"maxLength":512,"type":"string"},{"type":"null"}],"default":null,"description":"Concrete pointer to the missing thing (path/url/name); null when unnameable."}},"required":["kind","description"],"type":"object"},"maxItems":16,"type":"array"},"source":{"description":"Provenance of a WorkReport: constrained (native schema transport), validated (instructed terminal metadata), or absent (no transport could carry one — a disclosed absence, not a failure).","enum":["constrained","validated","absent"],"type":"string"},"state":{"description":"Folded work state: the WorkReport state, or unverified when no valid report was obtained (transport unsupported / lane gated, or an instructed footer missing or broken).","enum":["completed","needs_input","incomplete","unverified"],"type":"string"},"unverified_reason":{"description":"Present only with state unverified on a validated (instructed footer) source: the disclosed cause of the missing report.","enum":["footer_missing","footer_not_json","footer_not_object","report_missing","report_malformed","report_contradictory","legacy_output_invalid"],"type":"string"}},"required":["state","source"],"type":"object"}},"required":["lifecycle"],"type":"object"},"participants":{"additionalProperties":false,"description":"Terminal participant graph plus its planner-lane count.","properties":{"attempts":{"default":[],"description":"Role-labelled participant roster.","items":{"additionalProperties":false,"description":"One role-labelled participant in the terminal run graph.","properties":{"attempt_id":{"anyOf":[{"description":"Non-empty identifier string.","minLength":1,"type":"string"},{"type":"null"}],"description":"Attempt id when the participant owns an orchestrator attempt; null for reviewer-panel members."},"deliverable_present":{"default":false,"description":"Whether this participant produced the deliverable its role requested.","type":"boolean"},"harness_id":{"description":"Harness that served this participant role.","minLength":1,"type":"string"},"role":{"description":"Canonical role of one participant in the terminal run graph.","enum":["planner","merge","candidate","scout","reducer","reviewer"],"type":"string"},"status":{"anyOf":[{"description":"Terminal outcome recorded for one run participant.","enum":["success","success_with_warnings","blocked","failed"],"type":"string"},{"type":"null"}],"default":null,"description":"Participant outcome when recorded; null for artifact-only reviewer membership."}},"required":["attempt_id","harness_id","role"],"type":"object"},"type":"array"},"planners":{"description":"Number of participants whose canonical role is planner.","minimum":0,"type":"integer"}},"required":["planners"],"type":"object"},"presentation":{"additionalProperties":false,"description":"Immutable terminal output state and primary artifact. Absent only on legacy RunFacts receipts.","properties":{"primary":{"anyOf":[{"additionalProperties":false,"description":"Primary user-facing artifact selected once during terminal preparation.","properties":{"kind":{"description":"Presentation kind of the terminal primary artifact.","enum":["answer","report","plan","patch","files","structured_output","diagnostic"],"type":"string"},"path":{"description":"Normalized run-relative path of the terminal primary artifact.","minLength":1,"type":"string"}},"required":["kind","path"],"type":"object"},{"type":"null"}],"description":"Selected terminal primary artifact, or null when the receipt announces readiness without a primary deliverable."},"state":{"description":"Terminal output readiness decided by the last valid output.ready receipt.","enum":["ready","diagnostic"],"type":"string"}},"required":["state","primary"],"type":"object"},"required_actions":{"default":[],"description":"Typed actions required to unblock this terminal outcome.","items":{"additionalProperties":false,"description":"One typed required operator action derived from a run's terminal outcome facts.","properties":{"detail":{"description":"Human-readable guidance for this action (English-only, INV-141).","type":"string"},"id":{"description":"Stable machine id for a required operator action on a blocked terminal run.","enum":["provide_required_input","complete_incomplete_work","resolve_review_block","fix_failed_checks","record_operator_decision"],"type":"string"}},"required":["id","detail"],"type":"object"},"type":"array"},"review":{"additionalProperties":false,"description":"Canonical terminal review verdict and blocking-finding identity.","properties":{"blocker_ids":{"default":[],"description":"Stable ids of accepted evidence-backed blocking findings.","items":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"type":"array"},"blockers":{"description":"Number of blocking findings.","minimum":0,"type":"integer"},"state":{"default":"not_run","description":"Review axis: approved (clean cross-family verified review), blocked (open accepted findings), or not_run.","enum":["approved","blocked","not_run"],"type":"string"}},"required":["state","blockers"],"type":"object"},"run_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"},"schema_version":{"const":2,"description":"Schema version of the artifact; bumped on breaking ABI changes.","type":"number"},"task_id":{"description":"Non-empty identifier string.","minLength":1,"type":"string"}},"required":["schema_version","run_id","task_id","mode","outcome","deliverable","participants","gates","review","apply","generated_at"],"type":"object"},{"type":"null"}],"default":null,"description":"Validated canonical terminal RunFacts receipt; null while active, unavailable, or for legacy runs."},"runId":{"default":null,"description":"The daemon run id, when known.","type":["string","null"]},"secretLike":{"anyOf":[{"additionalProperties":false,"description":"What a run's saved copies hide: secret-like strings kept in the work, hidden on disk.","properties":{"answerMatches":{"description":"Strings hidden in the answer.","minimum":0,"type":"integer"},"binaryPaths":{"description":"Binary files whose payload the saved patch omits.","items":{"type":"string"},"type":"array"},"exactPatchRecorded":{"description":"For a redacted copy: whether the private exact patch object was recorded (false = deferred Apply answers patch_exact_bytes_unavailable); null for an exact copy.","type":["boolean","null"]},"files":{"description":"Changed files with hidden strings in the saved patch copy.","items":{"additionalProperties":false,"properties":{"kinds":{"description":"Content-rule ids that matched.","items":{"type":"string"},"type":"array"},"matches":{"description":"Strings hidden in that file's diff.","minimum":0,"type":"integer"},"path":{"description":"Changed file whose saved diff hides strings.","type":"string"}},"required":["path","matches","kinds"],"type":"object"},"type":"array"},"mediaWithheld":{"description":"Images that were not saved as produced outputs.","items":{"type":"string"},"type":"array"},"persistedPatch":{"description":"Whether the saved final/patch.diff is byte-exact or a display-only redacted copy.","enum":["exact","redacted"],"type":"string"},"totalMatches":{"description":"Strings hidden across patch and answer.","minimum":0,"type":"integer"}},"required":["totalMatches","answerMatches","files","binaryPaths","mediaWithheld","persistedPatch","exactPatchRecorded"],"type":"object"},{"type":"null"}],"default":null,"description":"INV-062 disclosure: secret-like strings kept in the work but hidden in saved copies (paths and counts only); null when nothing was hidden."},"status":{"default":null,"description":"The run's terminal or in-flight lifecycle state, when known.","type":["string","null"]},"summary":{"description":"Human-readable outcome/status text (same as the tool's text content).","type":"string"}},"required":["summary"],"type":"object"}},{"annotations":{"destructiveHint":true,"idempotentHint":true,"readOnlyHint":false},"description":"Request cancellation of a daemon-owned run; success is returned only after the control API acknowledges the durable command. The same call holds the run's next message (claudexor_next_message) that is not accepted yet, also after the run ended; an already accepted successor fails next_message_dispatched with its job handle and keeps running. If that hold cannot be saved, the call fails next_message_hold_failed (retryable) after any cancel was applied; the next message is still not sent, and a retried cancel records the hold.","inputSchema":{"additionalProperties":false,"properties":{"runId":{"description":"Daemon run id (from a run tool's runId trailer or claudexor_runs).","minLength":1,"type":"string"}},"required":["runId"],"type":"object"},"name":"claudexor_run_cancel"},{"annotations":{"readOnlyHint":true},"description":"List the complete daemon-persisted questions still awaiting answers for a run, including bodies claudexor_run_wait omitted; the text content carries the same JSON.","inputSchema":{"additionalProperties":false,"properties":{"runId":{"description":"Daemon run id (from a run tool's runId trailer or claudexor_runs).","minLength":1,"type":"string"}},"required":["runId"],"type":"object"},"name":"claudexor_run_interactions"},{"annotations":{"destructiveHint":false,"readOnlyHint":false},"description":"Answer a daemon-persisted run interaction; success (status delivered) is reported only after the control API acknowledges the journal mutation. Refusals keep their typed status as the failure code: not_found, already_resolved (never proof that this answer landed) or rejected. Answers have no replay key and are not retried.","inputSchema":{"additionalProperties":false,"properties":{"answers":{"items":{"additionalProperties":false,"properties":{"freeText":{"type":"string"},"questionId":{"minLength":1,"type":"string"},"selectedLabels":{"items":{"type":"string"},"type":"array"}},"required":["questionId","selectedLabels"],"type":"object"},"minItems":1,"type":"array"},"interactionId":{"minLength":1,"type":"string"},"runId":{"minLength":1,"type":"string"}},"required":["runId","interactionId","answers"],"type":"object"},"name":"claudexor_answer_interaction"},{"annotations":{"idempotentHint":true,"readOnlyHint":true},"description":"Dry-check whether a run's patch would apply cleanly to its original project (no mutation).","inputSchema":{"additionalProperties":false,"properties":{"runId":{"description":"Daemon run id (from a run tool's runId trailer or claudexor_runs).","minLength":1,"type":"string"}},"required":["runId"],"type":"object"},"name":"claudexor_apply_check"},{"annotations":{"idempotentHint":true,"readOnlyHint":true},"description":"Inspect, validate, or export one durable journal partition through v2.","inputSchema":{"additionalProperties":false,"properties":{"action":{"enum":["inspect","validate","export"],"type":"string"},"partition":{"minLength":1,"type":"string"}},"required":["action","partition"],"type":"object"},"name":"claudexor_journal_recovery"},{"annotations":{"destructiveHint":true,"idempotentHint":true,"readOnlyHint":false},"description":"Quarantine a corrupt partition and start a fresh epoch after exact confirmation.","inputSchema":{"additionalProperties":false,"properties":{"confirmation":{"enum":["quarantine_and_start_fresh"],"type":"string"},"expectedFingerprint":{"pattern":"^[a-f0-9]{64}$","type":"string"},"partition":{"minLength":1,"type":"string"}},"required":["partition","expectedFingerprint","confirmation"],"type":"object"},"name":"claudexor_quarantine_journal"}]}}}
