CodePanel
get_run

get_run

The CodePanel MCP tool that returns one agent app run with its status, measures, the interrupts waiting on you and its diff summary.

On this page›

get_run returns one agent app run: its status, outcome, model, measures and checks, its task, the interrupts waiting for an answer, and the committed branch's diff summary.

When to call it

  • To see what a run waits on: each entry of waiting has the interruptId answer_interrupt takes and a summary of what it asks.
  • Once it ends, for its pull request: run.prNumber is the pull request the runner opened, updated or pushed onto with your git and gh; read its review with get_review. run.publish says what went up (state opened, updated, pushed_to_pr, pushed or failed, branch, prUrl) and, when it went less far than the checkout's setting asked, the reason and the nextAction.
  • Not in a loop: to wait for a change, call wait_for_run.

Inputs

Input Type Required Description
runId string yes Id of a run, from get_task's runs or start_task's task
detail boolean no Add settled interrupts and the whole task

It only reads: the server marks it readOnlyHint: true, so clients that ask before a write can run it without asking.

runId comes from get_task's runs. detail: true adds every interrupt, settled ones too.

What it returns

{ run, task, waiting, interrupts, diff, costByModel }. costByModel is the run's metered spend per model, its subagents' included, costliest first (provider, modelId, calls, usd, tokensIn, tokensOut, and gatewayCalls and gatewayUsd for the part that went through the AI Gateway); the compact view leaves it out until the run's first model call. interrupts is null unless detail is set; diff is null until the run has committed its branch, and run.publish is null until the runner has published it (or for a checkout set to off). With detail, interrupts also holds the run's notices (state: recorded), which nothing waits on: an MCP tool withheld from the run and why (command_refused, changed, production_write, and so on), or a .mcp.json server that was not started.

The same step without MCP

Surface Form
HTTP API GET /tasks/runs/get with the read scope
CLI codepanel run get <runId> [--detail]

What the server tells your agent

The description your agent reads when it lists the tools:

Use it to read a run once, such as the interruptId to answer; to wait for a change, use wait_for_run instead of calling this in a loop. One agent app run: its status (starting, working, waiting, checking, then succeeded, failed or stopped), outcome, model, measures and checks; its task; the interrupts waiting for an answer (waiting, each with interruptId for answer_interrupt and a summary of what it asks); the committed branch's diff summary; and, once it ends, run.prNumber and run.publish: the pull request the runner opened with the owner's git and gh (read its review with get_review), or why it only pushed or pushed nothing and the nextAction. Compact by default, with its task's id, repo, title and status; detail: true adds every interrupt, settled ones too, and the whole task.

Last updated