# Sentry

Connect [Sentry](https://sentry.io) to create workspaces from unresolved errors. Link your repository to one or more Sentry projects, pick an event, and Polyscope hands the agent the stack trace, tags, and breadcrumbs it needs to start debugging.

## Connecting Sentry

1. Open **Settings** and select **Integrations**.
2. Find **Sentry** and click **Connect**.
3. Authorize Polyscope in your browser, then return to the app.

![Sentry in Polyscope integration settings](/images/docs/sentry-connect.png)

Polyscope requests read-only access to your projects, organizations, and events. You only need to connect your account once.

## Linking a Repository to a Project

1. Open the repository's **more actions** menu (three dots) in the sidebar and select **Settings**.
2. Select **Integrations** and find **Sentry Project**.
3. Choose a project from the dropdown. The link is saved immediately.

![Sentry project linked in repository settings](/images/docs/sentry-project.png)

The dropdown lists projects from every Sentry organization you have access to, each shown with its organization name.

You can link more than one project to a repository — useful when your frontend and backend report into separate Sentry projects. The event picker then includes issues from all linked projects. Remove a project with its unlink button, or use **Unlink all** to remove every Sentry project from that repository.

The **Sentry Project** section appears automatically for repositories that already use Sentry — Polyscope looks for the `sentry/sentry-laravel` Composer package, any `@sentry/*` npm dependency, or a `.sentryclirc` file. If your repository uses Sentry in a way Polyscope can't detect, the section still appears once your Sentry account is connected.

## Creating a Workspace from an Event

### From the Sidebar

Open the repository's **more actions** menu and select **From Sentry event**.

![From Sentry event in the polyscope-website repository menu](/images/docs/sentry-sidebar.png)

### From the New Workspace Screen

Click **New workspace**, choose the linked repository, and click **Sentry** under **Work on**.

![Sentry on the new workspace screen](/images/docs/sentry-workspace-start.png)

### From the Command Palette

With a repository selected in the command palette, choose **From Sentry event**.

### Choosing an Event

The picker lists unresolved issues from the last 24 hours, newest first. Search by short ID, title, or culprit. Each result shows the short ID, the error title, its level, the event count, how many users were affected, and when it was last seen.

![Unresolved Sentry events in the event picker](/images/docs/sentry-issues.png)

Select an event to create its workspace. Polyscope links the workspace back to the Sentry issue and prepares a prompt from the latest event:

- The stack trace, including surrounding source lines where Sentry has them
- Tags, minus the noisy ones (`level`, `handled`, `mechanism`)
- Request, runtime, and other context blocks
- The last ten breadcrumbs
- A link back to the issue in Sentry

In Claude terminal mode, that prompt is submitted automatically.

## Tips

- **Only unresolved issues** — The picker deliberately hides resolved and ignored issues, so the list stays short and actionable.
- **Works with Autopilot** — Combine Sentry events with [Autopilot](/docs/digging-deeper/autopilot) to work through incoming errors without babysitting each one.
