---
name: sentry-errors-without-linear-issue
description: "Every Monday: the highest-volume unresolved Sentry issues with no linked Linear issue, checked against Linear, and a question on which to file. Use when the user asks for this, or when it runs on a schedule."
---

# Sentry errors without a Linear issue

Every Monday: the highest-volume unresolved Sentry issues with no linked Linear issue, checked against Linear, and a question on which to file.

Sentry is good at telling you an error happened 4,800 times. Whether anyone is fixing it lives in Linear, and the two only meet when someone links them by hand. The busiest errors are often the ones everybody assumed somebody else had filed.

Every Monday the agent takes the unresolved Sentry issues that hit the most users last week, keeps the ones with no linked issue tracker entry, double-checks Linear for an issue that mentions them, and asks which to file. On your answer it creates the Linear issues with the Sentry link, counts and first-seen date already in them.

## Two ways to get the data

Use the API or MCP route when you have an MCP server, a CLI or an API token for the app. Otherwise, if you can drive a browser the user is signed in to (Claude in Chrome, a Playwright or Chrome DevTools MCP server), use the browser route. Say which one you used.

## Route A: API or MCP server

### What you need

- A Sentry auth token with `event:read` in `SENTRY_AUTH_TOKEN`, or the Sentry MCP server.
- The Linear MCP server or `LINEAR_API_KEY` with write access to create issues, and which Linear team owns each Sentry project.

If something is missing, say what and stop; do not invent numbers.

### Steps

1. **Find busy, unlinked errors** (Sentry): Call `GET /api/0/organizations/{org}/issues/?query=is:unresolved is:unlinked&statsPeriod=7d&sort=freq&limit=25`. Keep `shortId`, `title`, `culprit`, `count`, `userCount`, `firstSeen`, `permalink` and the project. On the Sentry MCP server, search issues with the same query.
2. **Check Linear for a match** (Linear): For each issue, query `attachmentsForURL(url: "<permalink>")` to find Linear issues that link to it, and `searchIssues(term: "<shortId>")` for issues that mention it in text. A text-only match is shown as a near match, not filed again.
3. **Pick what is worth filing**: Keep issues with at least 100 events or 10 users in the 7 days and no Linear match. Map each Sentry project to its Linear team, and suggest a priority from the users affected (High at 100 or more).
4. **Ask, then file** (Linear): Post the list as an ask. For each one you pick, call `issueCreate` with the team, title, priority and a description holding the Sentry link, culprit, counts and first seen, then `attachmentLinkURL` with the issue ID and the Sentry permalink so next week's check finds it.

## Route B: the browser

### What you need

- Signed in to Sentry as a member of the organization, and to Linear with a role that can create issues in the teams concerned.

If something is missing, say what and stop; do not invent numbers.

### Steps

Start at https://sentry.io/. The user is signed in already; never type passwords or codes, and ask if a sign-in page appears.

1. **Open the organization's issues**: Sentry opens on your last organization; switch with the organization menu at the top left if needed, then click **Issues**.
2. **Search for busy, unlinked errors**: Set the date selector to **Last 7 days**, type `is:unresolved is:unlinked` in the search bar and sort by **Events**. Read the top 25 rows: short ID, title, events, users, first seen (under the age column) and project.
3. **Check Linear**: Open `https://linear.app/` in a second tab, open search and type each Sentry short ID. An issue whose description holds the Sentry link, or mentions the short ID, is a match; a text-only mention is a near match to show, not to file again.
4. **Pick what to file**: Keep the Sentry issues with at least 100 events or 10 users and no Linear match, map each project to its Linear team, and suggest a priority from users affected (High at 100 or more).
5. **File after the answer**: Report the list and ask which to file. For each one picked, press **C** in Linear to create an issue in the right team with the title, priority and a description holding the Sentry link, culprit, counts and first seen.

Note: Sentry's is:unlinked only knows about links made through its own issue tracker integrations, so the Linear search is what catches issues filed by hand. The UI shows the first seen age rounded; open the issue for the exact date.

## The report

- **Unlinked errors** worth filing: how many and the users they hit.
- **The list**: Sentry ID, title, events, users, first seen and suggested team.
- **Near matches**: Linear issues that mention the error but are not linked.
- The ask: which to file.

## Post it to Briefkin

When `BRIEFKIN_TOKEN` is set, or `~/.config/briefkin/env` exists (the installer from https://briefkin.dev/docs writes it), also send the result to the user's Briefkin board as one card. Keep the `item_key` the same on every run so the card updates in place, use a new `event_id` per run, and put today's real numbers in place of the example ones. If the request fails, say so once and carry on.

```bash
[ -n "${BRIEFKIN_TOKEN:-}" ] || . ~/.config/briefkin/env
curl -sS -X POST "${BRIEFKIN_URL:-https://briefkin.dev}/v1/events" \
  -H "authorization: Bearer $BRIEFKIN_TOKEN" \
  -H "content-type: application/json" \
  -d @- <<'JSON'
{
  "v": 1,
  "event_id": "sentry-errors-without-linear-issue/<date of this run, e.g. 2026-10-16>",
  "item_key": "sentry-errors-without-linear-issue",
  "project": "acme-web",
  "source": "Sentry errors without a Linear issue skill",
  "kind": "action",
  "title": "5 busy Sentry errors have no Linear issue",
  "summary": "**5 unresolved Sentry issues** with no Linear issue hit **1,240 users** last week. The top one, a timeout on checkout, reached 612 of them.",
  "action": {
    "request": "Which of these should I file in Linear?",
    "options": [
      "File all 5",
      "File the top 3",
      "Go one by one",
      "None this week"
    ]
  },
  "widget": [
    {
      "type": "Table",
      "props": {
        "columns": [
          "Sentry issue",
          "Events",
          "Users",
          "First seen",
          "Team"
        ],
        "align": [
          "left",
          "right",
          "right",
          "left",
          "left"
        ],
        "rows": [
          [
            "WEB-3K2 TimeoutError in POST /api/checkout",
            4820,
            612,
            "9 days ago",
            "Payments"
          ],
          [
            "API-1F9 KeyError: currency in invoice render",
            2310,
            284,
            "6 days ago",
            "Billing"
          ],
          [
            "WEB-3JX TypeError: plan is null on downgrade",
            1460,
            198,
            "3 weeks ago",
            "Web"
          ],
          [
            "IOS-88A EXC_BAD_ACCESS in ImageCache",
            960,
            101,
            "4 days ago",
            "Mobile"
          ],
          [
            "API-1FC IntegrityError on workspace invite",
            410,
            45,
            "12 days ago",
            "Platform"
          ]
        ]
      }
    },
    {
      "type": "Callout",
      "props": {
        "text": "Near match: API-1F9 is mentioned in ENG-2214, which was closed 2 weeks ago. The error may have come back, so it is on the list.",
        "tone": "info"
      }
    }
  ]
}
JSON
```

Widgets come from the Briefkin catalog (https://briefkin.dev/v1/catalog). Without a token, just give the user the report.

## Run it on a schedule

Suggested: Mondays at 10:00 (`0 10 * * 1`). From cron, with the agent signed in on that machine:

```bash
0 10 * * 1 claude -p "Run the sentry-errors-without-linear-issue skill"
# Codex: codex exec, Gemini CLI: gemini -p, Copilot CLI: copilot -p, OpenCode: opencode run
```

Or use the agent's own scheduler (Claude Code routines, Codex automations, Claude or ChatGPT scheduled tasks): https://briefkin.dev/skills/sentry-errors-without-linear-issue#schedule

Source: https://briefkin.dev/skills/sentry-errors-without-linear-issue
