# get_session

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

The CodePanel MCP tool that returns one review session with each panel reviewer's status and error, to see which reviewer is slow or failing.

`get_session` returns one review session with the status and error of each panel reviewer in it, so you can see which reviewer is still working or failed. It needs the session `id` from [`list_sessions`](/docs/mcp-server/list_sessions) and only the `read` scope.

## When to call it

- **A round is slow or failed.** The `agents` list says which reviewer is `thinking`, `typing` or in `error`.
- **After `list_sessions`.** Take the `id` of the round you care about.
- **Not for the findings.** A session has no findings. Read them with [`get_review`](/docs/mcp-server/get_review).

## Inputs

| Input | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes | Session id, from list_sessions |

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

You can read a session you created or took part in. An id that doesn't exist, or isn't yours, reads as not found.

## What it returns

The same fields as one item of `list_sessions` (`id`, `status`, `repo`, `prNumber`, `prTitle`, `activity`, `error`, `errorCode`, `nextAction`, `publishError`, `createdAt`, `completedAt`), plus `agents`: one entry per panel member with `name`, `status` and `error`. An agent's `status` is `pending`, `thinking`, `typing`, `complete`, `error` or `skipped`. `skipped` is, for example, a Design & UX reviewer on a round that changed no UI.

## Examples

These responses come from a test account on a local backend.

```json title="Call"
{
  "id": "w979xqfpxr8fkr2pgwy3p8kq098j7psq"
}
```

```json title="Result"
{
  "activity": "Three reviewers are still reading the change.",
  "agents": [
    {
      "error": null,
      "name": "Bugs & Security",
      "status": "complete"
    },
    {
      "error": null,
      "name": "Tests & Maintainability",
      "status": "typing"
    },
    {
      "error": null,
      "name": "Docs & Best Practices",
      "status": "thinking"
    },
    {
      "error": null,
      "name": "Design & UX",
      "status": "pending"
    }
  ],
  "completedAt": null,
  "createdAt": 1794614217488,
  "error": null,
  "errorCode": null,
  "id": "w979xqfpxr8fkr2pgwy3p8kq098j7psq",
  "nextAction": null,
  "prNumber": 145,
  "prTitle": "Migrate the checkout form to React Hook Form",
  "publishError": null,
  "repo": "codepanel-dev/web-app",
  "status": "reviewing"
}
```

The session is `reviewing`: one reviewer is `complete`, one is `typing`, one is `thinking` and the fourth is still `pending`. A reviewer that failed would show `status: "error"` with its `error` filled in.

## The same step without MCP

| Surface | Form |
| --- | --- |
| CLI | `codepanel session <id>` ([CLI](/docs/cli)) |
| HTTP API | [`GET /sessions/get`](/docs/api#get-sessionsget) |

## What the server tells your agent

The description your agent reads when it lists the tools:

> One review session, with each reviewer's status and error.

## Related

- [`list_sessions`](/docs/mcp-server/list_sessions): find the session id.
- [`get_review`](/docs/mcp-server/get_review): the findings and `nextAction` of the finished round.
- [`wait_for_review`](/docs/mcp-server/wait_for_review): wait for the round to end.
- [MCP server](/docs/mcp-server): install, sign-in and every other tool.
