CodePanel
answer_interrupt

answer_interrupt

The CodePanel MCP tool that allows or denies what an agent app run is waiting on.

On this page›

answer_interrupt answers what a run is waiting on: allow or deny, or, for a question, a reply in words that goes back to the agent as the owner's own. The runner picks the answer up within seconds and the run goes on. It needs the interrupts:answer scope. A token made in Settings that drives tasks has it unless the owner unticked it; one a tool asked for (a codepanel login, a connector's sign-in) has it only when the owner ticked it on the approval page, so an agent that hands out work cannot approve what that work asks. Without it the call is refused with missing_scope and a nextAction that leaves the answer to the owner.

When to call it

Inputs

Input Type Required Description
runId string yes Id of a run, from get_task's runs or start_task's task
interruptId string yes From get_run's waiting
answer allow or deny or reply yes
text string, at most 4000 characters no With answer reply: what the agent should do, up to 4,000 characters
agent string no Your name, recorded as who answered

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, interruptId from waiting, and answer: allow or deny, or reply with text (up to 4,000 characters) for an interrupt whose kind is question. To leave the choice to the agent, reply with the judgment text the description quotes, which is what the desktop app's Let it decide sends. A reply to a permission is refused. agent records who answered.

What it returns

{ before, after }, each the interrupt; a reply reads state: answered with the text in reply. The same answer again changes nothing. A settled or expired interrupt, or an ended run, is refused with a stable reason (interrupt_settled, interrupt_expired, run_ended) and the nextAction to take.

The same step without MCP

Surface Form
HTTP API POST /tasks/runs/answer with the interrupts:answer scope
CLI codepanel run answer <runId> <interruptId> allow|deny, or ... reply <text>

What the server tells your agent

The description your agent reads when it lists the tools:

Use it when wait_for_run returns needs_you: answer what the run is waiting on with runId, interruptId (from get_run's waiting) and answer allow or deny. A question (kind question) can instead be answered in words: answer reply with text, which goes back to the agent as the owner's reply (state answered); to leave the choice to the agent, reply "Use your judgment: choose what you think is best, go on, and say in your final reply what you chose and why." A runner on this machine picks it up at once (one elsewhere within 10 seconds) and the run goes on; a denied action is not taken and the agent is told why. The same answer again changes nothing; a reply to a permission, a settled or expired interrupt, or an ended run is refused with reason and nextAction. Needs interrupts:answer: a token an agent asked for has it only when the owner ticked it, and without it the call is refused (missing_scope) with a nextAction to leave the answer to the owner. Returns { before, after }.

Last updated