recover_budget_stop
The CodePanel MCP tool that raises the cap a run stopped at, or moves its task to a cheaper model, and queues it again.
On this page›
recover_budget_stop gets a run that stopped at its budget going again. It either raises the cap that stopped it or moves the task to a cheaper model, then queues the task again. It needs the tasks:write scope, and agents:write as well to raise a cap.
When to call it
- On a
budget_stopitem fromget_inbox.
Inputs
| Input | Type | Required | Description |
|---|---|---|---|
runId |
string | yes | Id of a run, from get_task's runs or start_task's task |
action |
raise or cheaper |
yes | |
usd |
number | no | With raise: dollars to add |
It writes: the server marks it readOnlyHint: false and destructiveHint: true (it can change what is already there), so a client that asks before writes asks here.
runId and action:
raisewithusdadds that much to the run's agent's budget, or to its team's cap per run. It uses the same settings path asupdate_coding_agentorupdate_team, and a rule's cap on the task moves with it.cheapermoves the task to your agent one step cheaper for the same work. It does not apply to a team's task.
A run that did not stop at its budget is refused.
What it returns
{ taskId, action, capUsd, modelId }. The stopped run has ended, so the work runs again as the task's next attempt.
The same step without MCP
| Surface | Form |
|---|---|
| HTTP API | POST /tasks/runs/recover with the tasks:write scope, and agents:write for raise |
| CLI | codepanel run recover <runId> raise <usd> or ... cheaper |
| Desktop app | Inbox, +$5 or Cheaper on a budget stop |
What the server tells your agent
The description your agent reads when it lists the tools:
Use it on a get_inbox budget_stop item to get the work going again. action raise with usd adds that much to the cap that stopped it (the run's agent's budget, or its team's cap per run, as update_coding_agent or update_team would; it needs agents:write too), then queues the task again; action cheaper moves the task to your agent one step cheaper for the same work and queues it again (not for a team's task). The stopped run has ended, so the task runs again as its next attempt. A run that did not stop at its budget is refused. Needs tasks:write. Returns { taskId, action, capUsd, modelId }.
Related
switch_model: change a running run's model.- MCP server: install, sign-in and every other tool.