Guest Machines
API referenceRuns

Retrieve a run plan

GET/api/v1/runs/{run_id}/plan

Retrieve the active governance plan, its current enforcement position, and the optimistic-concurrency fence needed to replace it.

When replan_fence is present, copy both of its fields unchanged into a replan request. A 409 means the control state advanced after the read; retrieve the plan again before deciding what to do.

replan_fence is null when no operational checkpoint is available, including after terminal cleanup. Such a plan cannot be safely replaced from that response.

Required access

Credentials: service principal, delegated token, user session

Scope: runs:read

Uses the same organization-isolated visibility rule as retrieving the run itself; an identifier from another organization answers 404.

Authorization

AuthorizationBearer <token>

An organization-owned automation key, prefixed gsmc_sk_. Already bound to one organization, so it needs no X-Org-Id header. It carries no user identity: it never reaches a private resource however it is scoped, and a run it starts has no user for an interactive tool to reach.

In: header

Path Parameters

run_id*Run Id

Header Parameters

X-Org-Id?|

Selects the active organization for a credential that belongs to more than one. Service-principal keys are bound to a single organization and ignore it.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v1/runs/0/plan" \  -H "Authorization: Bearer $GUEST_MACHINES_API_KEY"
{  "enforcement_state": {    "source": "string",    "strict_action_index": 0,    "current_strict_action": {      "index": 0,      "kind": "string",      "action": {        "kind": "domain_tool",        "domain_tool": {          "origin": "builtin",          "source_id": "string",          "canonical_name": "string",          "display_name": "string",          "enabled": true,          "owned_by_caller": true        },        "title": "string",        "summary": "string"      },      "allowed_inputs": [        "string"      ],      "success_signal": "string"    },    "remaining_strict_actions": [      {        "index": 0,        "kind": "string",        "action": {          "kind": "domain_tool",          "domain_tool": {            "origin": "builtin",            "source_id": "string",            "canonical_name": "string",            "display_name": "string",            "enabled": true,            "owned_by_caller": true          },          "title": "string",          "summary": "string"        },        "allowed_inputs": [          "string"        ],        "success_signal": "string"      }    ],    "completed_strict_actions": 0,    "adaptive_step_index": 0,    "active_adaptive_step": {      "index": 0,      "title": "string",      "intent": "string",      "expected_activities": [        {          "kind": "domain_tool",          "domain_tool": {            "origin": "builtin",            "source_id": "string",            "canonical_name": "string",            "display_name": "string",            "enabled": true,            "owned_by_caller": true          },          "title": "string",          "summary": "string"        }      ],      "success_signal": "string"    },    "remaining_adaptive_steps": [      {        "index": 0,        "title": "string",        "intent": "string",        "expected_activities": [          {            "kind": "domain_tool",            "domain_tool": {              "origin": "builtin",              "source_id": "string",              "canonical_name": "string",              "display_name": "string",              "enabled": true,              "owned_by_caller": true            },            "title": "string",            "summary": "string"          }        ],        "success_signal": "string"      }    ],    "completed_adaptive_steps": 0,    "last_progress_at": "string",    "is_stalled": false,    "latest_warning_type": "string"  },  "plan": {    "id": 0,    "run_id": 1,    "version": 1,    "planning_mode": "adaptive",    "status": "active",    "goal": "string",    "done_checks": [      "string"    ],    "risk_summary": {      "risk_mode": "high",      "allowed_capabilities": [        "artifact_write"      ],      "execution_environment": "guest_vm",      "privileged_capabilities": [        "artifact_write"      ],      "requires_approval": true    },    "expected_activities": [      {        "kind": "domain_tool",        "domain_tool": {          "origin": "builtin",          "source_id": "string",          "canonical_name": "string",          "display_name": "string",          "enabled": true,          "owned_by_caller": true        },        "title": "string",        "summary": "string"      }    ],    "actions": [      {        "index": 0,        "kind": "string",        "action": {          "kind": "domain_tool",          "domain_tool": {            "origin": "builtin",            "source_id": "string",            "canonical_name": "string",            "display_name": "string",            "enabled": true,            "owned_by_caller": true          },          "title": "string",          "summary": "string"        },        "allowed_inputs": [          "string"        ],        "success_signal": "string"      }    ],    "steps": [      {        "index": 0,        "title": "string",        "intent": "string",        "expected_activities": [          {            "kind": "domain_tool",            "domain_tool": {              "origin": "builtin",              "source_id": "string",              "canonical_name": "string",              "display_name": "string",              "enabled": true,              "owned_by_caller": true            },            "title": "string",            "summary": "string"          }        ],        "success_signal": "string"      }    ],    "approved_at": "2019-08-24T14:15:22Z",    "created_at": "2019-08-24T14:15:22Z"  },  "replan_fence": {    "expected_policy_version": 1,    "expected_replay_generation": 1  }}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}
{  "detail": "string",  "error_code": "string",  "request_id": "string"}