# ask_decision

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

The CodePanel MCP tool that analyzes a technical or design question against a repository and returns a structured decision via a 3-tier cascade.

`ask_decision` asks CodePanel to analyze a technical or design question against a connected repository, using its rules, learnings, prior decisions, and code, and return a structured decision so an agent does not block waiting on a human.

## How the 3-tier cascade works

- **Tier 0 (Memory):** Reuses a recent matching decision in the same repository immediately.
- **Tier 1 (Single cross-family model):** Evaluates the question with a model outside the asking agent's family, with bounded file reads when enabled.
- **Tier 2 (Multi-model panel):** Escalates to 2–3 cross-family panel seats plus orchestrator synthesis when confidence is low, reversibility is `hard`, files sit in high-stakes paths (schema, auth, billing, secrets), or `depth: "panel"` is requested.

Needs the `reviews:write` scope (plus `read` when polling a `decisionId`).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `repo` | string | no | Repository as owner/name. Required unless decisionId is set |
| `question` | string, at most 4000 characters | no | The question to decide. Required unless decisionId is set |
| `decisionId` | string | no | Id of a pending decision to poll instead of creating a new one |
| `options` | array of strings, at most 8 | no | Concrete candidate options you are choosing between |
| `context` | string, at most 8000 characters | no | Additional context, constraints, or tradeoffs |
| `files` | array of strings, at most 10 | no | Repository-relative file paths relevant to the question |
| `gitRef` | string | no | Branch or commit SHA to read files from |
| `depth` | `auto` or `fast` or `panel` | no | auto (default: cascade), fast (single model), or panel (multi-model deliberation) |
| `reversibility` | `easy` or `moderate` or `hard` | no | How easy the decision is to reverse: easy, moderate, or hard |
| `agent` | string | no | Your agent/harness name, used for cross-family model selection |
| `wait` | boolean | no | Wait up to 25s for the decision (default true); false returns immediately |

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.

## What the server tells your agent

> Ask CodePanel to analyze a technical or design question against a connected repository (its rules, learnings, prior decisions, and code) and return a structured decision so you do not have to block on a human. Uses a 3-tier cascade: Tier 0 matches recent repository decisions immediately; Tier 1 runs a cross-family model with repo context and optional file reads; Tier 2 escalates to a multi-model panel on low-confidence, hard-to-reverse, high-stakes paths, or when depth is panel. Returns status (decided|escalated|pending|failed), decision, chosenOption, rationale, citations, alternatives, confidence, reversibility, decidedBy, and nextAction (proceed|wait_for_human|wait|revise_and_reask). Pass decisionId to keep waiting on a pending decision without asking again.
