# answer_batch

URL: https://codepanel.ai/docs/mcp-server/answer_batch

The CodePanel MCP tool that allows or denies many agent app interrupts in one call, each answered on its own.

`answer_batch` answers many interrupts at once: every run a [`get_inbox`](/docs/mcp-server/get_inbox) permission item blocks, allowed or denied in one call. Each target is answered as [`answer_interrupt`](/docs/mcp-server/answer_interrupt) would answer it. It needs the `interrupts:answer` scope, as [`answer_interrupt`](/docs/mcp-server/answer_interrupt) does.

## When to call it

- **When an inbox item blocks several runs:** pass the item's `targets` and one answer.

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `targets` | array of objects, at most 100 | yes | From a get_inbox item's targets |
| `targets[].runId` | string | yes |  |
| `targets[].interruptId` | string | yes |  |
| `answer` | `allow` or `deny` | yes |  |
| `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.

`targets`: 1 to 100 `{ runId, interruptId }`, from the item's `targets`. `answer`: `allow` or `deny`. `agent` records who answered.

## What it returns

`{ answered, failed, results }`. Each result has `runId`, `interruptId`, `ok`, and `after`, the interrupt once answered. A target that was refused (its run ended, the interrupt was settled or expired, or it was not found) leaves the others answered, with its `reason` and `error`. The same answer again changes nothing.

## The same step without MCP

| Surface | Form |
| --- | --- |
| HTTP API | `POST /inbox/answer` with the `interrupts:answer` scope |
| CLI | `codepanel inbox answer allow\|deny <runId:interruptId...>` |

## What the server tells your agent

The description your agent reads when it lists the tools:

> Use it to answer a get_inbox permission item across every run it blocks in one call: targets is the item's targets as { runId, interruptId } (1 to 100), answer allow or deny. Each target is answered on its own, as answer_interrupt would: one refused (run ended, interrupt settled or expired, not found) leaves the others answered and says why in its result's reason and error. A runner on this machine picks the answers up at once. The same answer again changes nothing. 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 { answered, failed, results }, each result with runId, interruptId, ok and the interrupt after (after).

## Related

- [`get_inbox`](/docs/mcp-server/get_inbox): what waits, and each item's targets.
- [MCP server](/docs/mcp-server): install, sign-in and every other tool.
