Get approval status
get_plan_statusRead the current outcome of a gated write tool call that came back pending_approval (plan mode: promote_commit, demote_commit, delete_commit, stop_commit, set_env_vars, update_settings, execute_sql, redeploy, deploy_project, deploy_files, or expose_commit parked instead of running because the project requires a human to approve it first). Pass the plan_id the original call returned. Reports pending (still waiting in the dashboard), approved (decided, about to run), rejected, expired (nobody decided within the TTL), applied (approved and executed — the action already happened), or failed (approved but could not run — see error, e.g. the project's state moved since the plan was created). There is no apply call: a human approving in the dashboard is what executes the action, so the original call is not repeated. await_plan is the blocking variant of this read; this one returns a single status at once. retry_after_s, when present, is the polling interval; its absence means the status is terminal.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| plan_id | Yes | the plan id a gated tool returned when it parked pending approval |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tool | Yes | ||
| error | No | set when status is failed | |
| status | Yes | pending (awaiting a human in the dashboard — including after a drift refresh, see refresh_count), approved (decided, not yet run), rejected, expired (TTL lapsed before anyone decided), applied (approved and executed), or failed (approved but the fingerprint check or the executor itself failed — see error) | |
| plan_id | Yes | ||
| applied_at | No | ||
| created_at | Yes | ||
| decided_at | No | ||
| decided_by | No | ||
| expires_at | Yes | ||
| last_drift | No | what changed under the previously-approved card, prompting the latest refresh | |
| project_id | Yes | ||
| refresh_count | No | how many times an approve hit state drift and sent this plan back to pending with a rebuilt evidence card and a fresh TTL — status stays pending and still needs a human, keep polling; absent when it never happened | |
| retry_after_s | No | wait at least this many seconds before calling get_plan_status again; absent means the status is terminal and further calls are pointless. Prefer await_plan, which blocks server-side and needs no loop at all | |
| last_refreshed_at | No |