Overview
The Sentry issue-fix tool lets you point OpenSRE at a Sentry issue and have the Pi coding agent propose a fix. OpenSRE fetches the issue context, runs Pi in your current repository, and returns a summary plus the git diff. By default it only edits the working tree so you can review the diff. When you ask it toopen_pr (and enable the ship switch), it also commits the fix to
a fresh branch, pushes it, and opens a pull request — it never pushes to
your base/main branch.
This is a tool page, not a full integration setup page. It depends on the
Sentry integration plus local Pi and opt-in env gates.
Prerequisites
- Sentry configured (org + auth token) — see Sentry
- Pi coding agent CLI installed and authenticated
PI_ISSUE_FIX_ENABLED=1to allow the fix step- For PRs:
PI_ISSUE_FIX_SHIP_ENABLED=1andGITHUB_TOKEN/GH_TOKENwithrepo/pull_requestwrite access
Setup
- Configure Sentry and install Pi:
- Turn the tool on:
- (Optional) Allow OpenSRE to open a pull request:
Credentials
Your Sentry token is never sent to Pi. OpenSRE builds a short masked task
(title, error, culprit, location) for the coding agent.
Investigation tools
Using it from the interactive shell
Once enabled, ask in plain language inopensre:
Verify
opensre integrations verify sentry— Sentry REST config works- Pi CLI available on
PATH - Env gates set (
PI_ISSUE_FIX_ENABLED=1, and ship env if you need PRs)
Troubleshooting
Security
- Dual opt-in by design: fix and ship are separate switches, both off by default.
- OpenSRE never commits to or force-pushes your base/
mainbranch. - Sentry tokens stay on the OpenSRE side; Pi receives masked issue context only.
- Review the diff before merging any PR.
Extras
How it works
- You paste a Sentry issue URL and ask OpenSRE to fix it.
- OpenSRE resolves the issue and builds a short, masked task for Pi.
- Pi edits the current repository to implement the fix.
- You get
success, asummary,changed_files, and thediff. - If you asked for
open_pr(and shipping is enabled), OpenSRE commits to a freshopensre/sentry-fix-<id>-<sha>branch, pushes it, opens a PR into your base branch, and returnsbranch_name,pr_url, andpr_number.
Opening a pull request
- The fix always lands on a new namespaced branch and is proposed via PR.
- The PR body links the Sentry issue and lists changed files.
- If the fix succeeds but the PR cannot be opened, you still get the diff.
Supported URLs
https://<org>.sentry.io/issues/<id>/https://sentry.io/organizations/<org>/issues/<id>/- Self-hosted
https://sentry.<company>.com/organizations/<org>/issues/<id>/
Notes
- Without
open_pr, nothing is committed or pushed. - Failures return a clear
error_kindinstead of silently doing the wrong thing.