Sentry → Auto-Debug → Open PR
Automatically analyze Sentry errors, generate fixes, and create pull requests
Prerequisites
- OpenClaw installed and running
- Sentry account with a project configured
- GitHub repository with write access
- Slack workspace with a #bugs channel
Required Skills
openclaw install sentry-debuggeropenclaw install github-auto-propenclaw install slack-digestInstallation Steps
Install required skills
Install all three skills needed for this recipe.
openclaw install sentry-debugger github-auto-pr slack-digestConfigure Sentry webhook
In your Sentry project settings, add a webhook pointing to your OpenClaw instance. Set the trigger to fire on new issues and issue state changes.
Set up GitHub integration
Connect your GitHub repo by providing the owner/repo and configuring auto-PR creation with reviewer assignment.
Add the config snippet
Copy the openclaw.json configuration below into your project root and customize the project IDs and repo paths.
Add the SOUL.md snippet
Add the SOUL.md snippet to define the agent's error-handling behavior and decision-making process.
Configuration
{
"webhooks": {
"sentry": {
"url": "/webhooks/sentry",
"actions": [
"analyze-error",
"generate-fix",
"create-pr",
"notify-slack"
]
}
},
"integrations": {
"sentry": {
"projectId": "your-project-id",
"autoFix": true,
"minOccurrences": 5
},
"github": {
"repo": "owner/repo",
"autoCreatePR": true,
"assignReviewers": ["tech-lead"]
}
}
}Add this to your openclaw.json and customize the values for your setup.
SOUL.md
## On Sentry Error
- Only attempt a fix if the root cause is clear from the stack trace. If ambiguous, post a diagnostic summary to Slack instead of guessing.
- Never fix errors in hot paths (auth, payments, data writes) without flagging for human review — add a "needs-human-review" label to the PR.
- If the same error keeps recurring after a fix was deployed, escalate in Slack rather than opening another PR. Something deeper is wrong.
- PR descriptions should include: the Sentry issue link, a plain-English root cause explanation, and what you changed and why.
- Write regression tests that reproduce the exact error, not just generic happy-path tests.
- Ignore errors that are clearly client-side noise (e.g., browser extension interference, network timeouts from mobile).Add this to your SOUL.md to define the agent's behavior for this workflow.
Expected Behavior
When Sentry reports an error that occurs 5+ times, OpenClaw automatically analyzes it, generates a fix, creates a PR, and notifies the team in Slack. The PR includes the error context, root cause analysis, and tests.
Usage Guide
Once configured, the workflow is fully automatic. Sentry fires a webhook when errors reach the threshold, OpenClaw analyzes the stack trace, generates a fix with tests, opens a PR on GitHub, and posts a summary to your #bugs Slack channel. You can adjust the minOccurrences threshold and reviewer list in the config.
Community Use Cases
All Use Cases →More DevOps Recipes
All Recipes →PR Review Automation
Automatically review pull requests with security scanning and style checks
Daily Standup Summarizer
Collect GitHub activity and generate standup summaries for the team
Incident Response Automation
Detect production issues and coordinate incident response