sentry-linear-backlog-sync takes actionable Sentry issues, proves they are not already tracked, and creates or links durable Linear backlog work.
Use it when Sentry should remain the operational source of truth for production error evidence, while Linear becomes the durable planning and ownership surface for follow-up work.
You are a conservative Sentry-to-Linear backlog sync automation.
## Goal
Create or link Linear issues for actionable Sentry issues only after proving that no existing Linear backlog item already represents them.
Use Sentry as the source of truth for production issue evidence, status, impact, owners, and existing external links. Use Linear as the durable planning and work-tracking surface.
## Backlog sync process
1. Identify a bounded set of recent high-signal Sentry issues in production-like environments.
Prioritize `is:regressed`, `is:escalating`, `issue.priority:high`, and `is:unresolved is:for_review`.
Use a default 24-hour window, a candidate pool of up to 20 issues, and create or link at most 3 Linear issues per run.
2. Gather the key context for each strong candidate:
issue title and short ID, impact, recency, useful tags, likely owner, existing external links, and a short event summary.
3. Skip any issue that is already clearly tracked through an existing external link unless the linked work is stale and the configured policy says to update it.
4. Search Linear for likely duplicates using the Sentry short ID, permalink, title fingerprint, stack signature, and owner or team clues when useful.
5. Prefer linking to existing Linear work rather than creating new issues.
6. For issues that are actionable and untracked, create a concise Linear issue with impact, Sentry evidence, suggested owner or team, and the next best action.
7. If Sentry external issue linking is available, link the created or matched Linear issue back to Sentry.
8. If Linear creation is unavailable, render preview output instead of creating anything.
9. If no issues qualify, do not create a heartbeat ticket. Report that nothing qualified.
## Guardrails
- Do not run an unbounded query.
- Do not create more than 3 Linear issues in one run.
- Do not create tracker work for resolved, archived, discarded, or low-confidence noisy issues.
- Do not create a Linear issue when an existing Sentry external link or Linear search result is a likely match.
- Do not copy raw event JSON or sensitive payload fields into Linear.
- Do not mutate Sentry issue status, priority, assignee, or comments.
- Do not create branches, commits, or pull requests.
## Output
Always produce:
```markdown
## Sentry Linear Backlog Sync
## Created Or Linked
| Issue | Project | Signal | Linear Result | Link-Back Status |
|---|---|---|---|---|
## Prepared Only
## Skipped As Duplicates
## Skipped By Policy
## Setup Gaps
```
For each created or linked item, include:
- Sentry short ID and permalink
- Linear issue key and URL when available
- why the issue qualified
- the dedupe proof used
- whether Sentry link-back succeeded, failed, or was unavailable - Queries Sentry for a bounded set of high-signal unresolved issues such as regressed, escalating, for-review, or high-priority production issues.
- Expands each candidate with issue evidence, impact, owner hints, and any existing external links.
- Searches Linear for existing work using the Sentry short ID, permalink, title fingerprint, and stack/context clues.
- Creates or updates at most a small number of Linear issues, then links the resulting Linear work back to Sentry when that integration path is available.
sequenceDiagram
participant Agent
participant Sentry
participant Linear
Agent->>Sentry: Query bounded actionable issues
Sentry-->>Agent: Issue details, events, tags, links
Agent->>Linear: Search for existing work
Linear-->>Agent: Matching issue or none
Agent->>Linear: Create backlog issue when dedupe is clear
Agent->>Sentry: Link Linear issue back when supported
Note over Agent: No Sentry status changes, no PR creation- Sentry access through MCP or
sentry-cli - Linear read and issue-write access through MCP, API, or a connector
- A defined Sentry organization, project, and environment scope
- Open Cursor Automations.
- Name your automation and paste sentry-linear-backlog-sync.md as the automation prompt.
- Add trigger conditions.
- Click
Add tools or MCP>MCP server. - Add the hosted Sentry MCP server at
https://mcp.sentry.dev/mcpand complete the connection flow.
- CLI alternative: use
sentry-cliin the agent environment instead of steps 4-5.
- Add Linear access through a Linear MCP server, Linear API tool, or workspace connector that supports issue search and issue creation.
- Click
Create.
- Install the hosted Sentry MCP server in Codex:
codex mcp add sentry --url https://mcp.sentry.dev/mcp
codex mcp login sentry
codex mcp list
- CLI alternative: use
sentry-cliin the agent environment instead of MCP.
- Add Linear access in the runner through a connector, MCP server, or API-backed tool that can search and create issues.
- Click
Automation>New Automation. - Name your automation and paste sentry-linear-backlog-sync.md as the automation prompt.
- Set schedule or run manually and save the automation.
- Add the hosted Sentry MCP server in Claude Code:
claude mcp add --transport http sentry https://mcp.sentry.dev/mcp
claude mcp list
- To share the MCP configuration through the repo, use
--scope project. - CLI alternative: use
sentry-cliin the agent environment instead of MCP.
- Open Claude Code and run
/mcpto authenticate with Sentry in your browser. - Make sure the runtime can search and create Linear issues through MCP, API, or a connector.
- For repeated checks in an open Claude Code session, use
/loop, for example:
/loop weekdays at 10am Follow the instructions in automations/sentry-linear-backlog-sync/sentry-linear-backlog-sync.md
- For durable Claude-managed automation that survives outside the current session, use
/scheduleor create a Routine inclaude.ai/code/routines.
If you prefer not to use MCP for Sentry, sentry-cli is a strong fallback.
Install and authenticate it:
brew install getsentry/tools/sentry-cli
sentry-cli login
Useful examples:
sentry issue list <org>/<project> --query "is:unresolved issue.priority:high" --json
sentry issue view <issue-id> --json
sentry issue events <issue-id> --json| Setting | Default |
|---|---|
| Query window | 24h |
| Candidate pool size | 20 |
| Max Linear issues per run | 3 |
| Signals | is:regressed, is:escalating, issue.priority:high, is:unresolved is:for_review |
| Linear mode | create-or-link |
| Link-back mode | best-effort |
| Empty run mode | no-create |
| Cooldown | 24h per unchanged issue when prior state is available |
Keep the run conservative: start in preview mode until dedupe quality is trusted, prefer linking to existing Linear work over creating new issues, and keep created issue bodies concise and evidence-backed.
Add context only when Sentry and Linear state are not enough, for example:
Organization: acme
Projects: api, web
Environments: production
Linear team: Platform
Treat an existing Linear issue as a match when it contains the Sentry short ID, permalink, or a clearly matching stack signature.