---
number: "012"
slug: "012"
title: "Production error to a reviewed fix PR, with you still in charge"
summary: "Sentry alert rules file new production errors as Linear issues, you hand the real ones to Cursor's cloud agent from Linear's assignee menu, and a fix PR lands on GitHub for review, all without opening your editor."
chain: ["Sentry", "Linear", "Cursor", "GitHub"]
for: "Solo developers, small startup engineering teams and agencies maintaining a handful of client apps"
time_to_set_up: "About 1 hour (estimate)"
cost: "From $30/mo (Cursor Premium for cloud agents) with Sentry, Linear and GitHub on free plans"
last_verified: "Oct 2026 (desk-checked, not run end-to-end)"
date: "2026-10-14"
---

# Production error to a reviewed fix PR, with you still in charge

**Chain:** Sentry → Linear → Cursor → GitHub

## Why now

- **Cursor's cloud agents take work straight from Linear.** Assign an issue to Cursor, or mention `@Cursor` in a comment, and an agent reads the issue, works in the background and opens a PR. ([Cursor docs](https://cursor.com/docs/integrations/linear))
- **Cursor's new plans put cloud agents in Premium** ($30/mo, sold as "The X Subscription" since this month). ([cursor.com/pricing](https://cursor.com/pricing))
- **Sentry's Linear integration** can create Linear issues automatically from an alert rule, so errors arrive in Linear without anyone copying stack traces. ([Sentry docs](https://docs.sentry.io/integrations/issue-tracking/linear/))

The human step in the middle is deliberate. You decide which errors deserve an agent. The agent does the reproduction and the patch.

## Who it's for

Teams small enough that "on-call" means "whoever sees the Slack ping", with a JavaScript, Python or similar app already reporting to Sentry (or ready to).

## What you get

- New, high-impact production errors arrive in a Linear **Triage** queue with the stack trace, release and Sentry link.
- One click (assign to Cursor) starts a **cloud agent** on the right repo and base branch.
- A **GitHub PR** with the fix, an explanation and, where possible, a regression test, linked back to the Linear issue and waiting for human review.

## You'll need

| Tool | Plan you need | Current price (Oct 2026) | Link |
|---|---|---|---|
| Sentry | Developer (free, 1 user, 5k errors/mo). Team for more users | $0; Team $26/mo billed annually ($29 monthly) | [sentry.io/pricing](https://sentry.io/pricing/) |
| Linear | Free works (250 issues). Basic for unlimited | $0; Basic $10/user/mo billed yearly | [linear.app/pricing](https://linear.app/pricing) |
| Cursor | Premium (cloud agents and automations). Third-party models are billed at API list price | $30/mo | [cursor.com/pricing](https://cursor.com/pricing) |
| GitHub | Free | $0 | [github.com/pricing](https://github.com/pricing) |

## Setup

### 1. Connect Sentry to Linear (Sentry, 10 min)

In Sentry: **Settings → Integrations → Linear → Install** (you need owner, manager or admin permissions). Authorize your Linear workspace. Note that the integration doesn't work with self-hosted Sentry.

### 2. Auto-file the errors that matter (Sentry, 10 min)

Create an **issue alert** (**Alerts → Create Alert → Issues**):

- **When:** a new issue is created, *or* an issue's frequency exceeds `50 events in 1 hour`.
- **If:** environment is `production`, and the level is `error` or above.
- **Then:** **Linear → create an issue** in your team (e.g. `ENG`), with the label `sentry` and status Triage.
- **Action interval:** 1 day, so a noisy error doesn't file itself 40 times.

### 3. Connect Cursor to Linear (Cursor, 15 min)

You need to be a Cursor admin. Go to **Cursor dashboard → Integrations → Linear → Connect**, select your Linear team and authorize. Then complete the cloud agent setup the integration asks for:

- connect GitHub as the repository provider;
- set the **default repository** and **base branch** (e.g. `main`);
- enable usage-based pricing (cloud agents need it) and confirm the privacy settings.

If you have several repos, create a Linear label group named exactly `repo` with labels like `yourorg/api` and `yourorg/web`. Cursor reads them to pick the repo.

### 4. Write the agent's standing instructions (repo, 10 min)

Add `AGENTS.md` (or a `.cursor/rules` file) to the repo, so every cloud agent gets the same brief:

```markdown
## When fixing a production error from Sentry
1. Reproduce first: write a failing test that triggers the reported exception.
2. Fix the root cause, not the symptom. No try/except-and-ignore, no swallowing errors.
3. Keep the diff small. No refactors, no dependency upgrades, no formatting churn.
4. In the PR description: root cause in 2 sentences, the fix, the test, and the Sentry link.
5. If you can't reproduce it, open the PR as a draft explaining what you tried. Don't guess.
```

### 5. Triage and delegate (Linear, 1 min per issue)

When a `sentry` issue lands in Triage, read it and decide:

- **Real and well-scoped:** set the assignee to **Cursor**. You can add a note as a comment: `@Cursor the bad value comes from the CSV importer; start there.`
- **Noise:** mark it as a duplicate or cancel it, and fix the alert rule.
- **Needs a human:** assign a person.

The agent posts its status in the Linear issue and links the PR when it's done.

### 6. Review like it's a colleague's PR (GitHub)

Read the diff, run the test and check the root-cause claim against the Sentry event. Merge, or comment `@Cursor` in Linear with what to change. After release, confirm in Sentry that the issue is resolved in the new release.

## Time to set up

About an hour (estimate, not timed), assuming the app already reports to Sentry.

## Cost

- **Minimum:** Cursor Premium **$30/mo**, with Sentry Developer, Linear Free and GitHub Free at $0. Cloud agents using Grok models draw from the plan's weekly usage pool. Claude or GPT models are charged at API list price.
- **Small team:** + Sentry Team $26/mo (annual) for multiple users, + Linear Basic $10/user/mo once you pass 250 issues.
- **Optional:** Sentry's own Seer agent can do root-cause analysis and open PRs too, at $40 per active contributor per month on a paid Sentry plan. This drop uses Cursor instead, so one agent handles all your code work.

Prices are list prices as of Oct 14, 2026.

## Gotchas

- **Triage rules need a human assignee.** Cursor's docs note that Linear's triage rules currently require a human assignee to fire, so fully automatic delegation to Cursor may not work. That's fine; this drop keeps a human there on purpose.
- **Cursor plans changed this month.** Plus ($8/mo) has no cloud agents. Old $20 Pro subscribers keep their plan for now, but new signups can't buy it. Check what your plan includes before you set this up for a team.
- **Cursor filters non-dev work.** If an issue reads like a product question, the agent may decline. Make sure the Sentry-created issue includes the stack trace (the default template does).
- **PII in stack traces.** Sentry events can include user data. Turn on Sentry's data scrubbing before error details flow into Linear and an agent's context.
- **Agents can be confidently wrong.** "Can't reproduce, here's a plausible fix" is the failure mode to watch. The `AGENTS.md` rule to open a draft PR in that case is your guardrail.

## Remix

- **Skip Linear:** Cursor also has a GitHub integration and Slack triggers. Use an alert rule that files GitHub issues and delegate from there.
- **Weekly sweep:** a Cursor automation can review the week's unresolved Sentry issues and propose which to fix.
- **Client apps:** one Linear team per client plus `repo` labels lets a small agency route fixes across many repos.

## Freshness log

- **Oct 14, 2026:** First published. Desk-checked against Cursor's Linear integration docs and pricing page, Sentry's Linear integration docs, pricing page and Seer billing article, Linear's pricing page and GitHub's pricing page.

---

*Last verified: Oct 2026 (desk-checked, not run end-to-end). We checked every step, setting and price against the vendors' current docs. We have not yet run this chain live. If a step doesn't match what you see, reply and tell us. It'll be fixed in the next refresh.*
