Daily Sentry Error Fixes
Schedule a daily Advanced Devin session that pulls new Sentry errors overnight, spawns a fix session for each, and has PRs ready by morning.Connect the Sentry MCP
Before creating your schedule, Devin needs access to your Sentry data.
- Go to Settings > MCP Marketplace and search for Sentry
- Click Enable and authenticate via OAuth — this grants Devin read access to your Sentry issues, events, and stack traces
- Click Test listing tools to verify the connection is working
Create the schedule
Go to Settings > Schedules and click Create schedule.
- Name:
Daily Sentry remediation — payments-api - Frequency: Daily at 6:00 AM (so fix PRs are ready before standup)
- Agent: Advanced Devin — this lets Devin spawn a separate session for each error, so fixes run in parallel
- Slack channel: Select a channel (e.g.,
#sentry-fixes) so your team gets notified when the run completes and PRs are ready for review - Prompt:
Seed Knowledge from your codebase and past fixes
Devin writes better fixes when it understands your app’s error patterns. Instead of writing Knowledge entries yourself, run an Advanced Devin session to investigate your codebase and past fixes, then let it create the Knowledge:These entries are automatically recalled when Devin encounters matching errors during scheduled runs — and the scheduled prompt above tells Devin to update Knowledge based on your PR feedback, so it improves over time.
What a typical run produces
Each morning, Devin processes the overnight error queue and opens targeted PRs. Here’s what a real session output looks like:Each PR includes the Sentry issue link, a description of the root cause, the fix, and a test that would have caught the original error.
Tune and iterate
After a week of runs, review what’s working and adjust:Scope the error count. Start with
top 5 errors per run. If Devin consistently produces mergeable PRs, increase to 8-10. If fixes need heavy revision, reduce to 3.Filter by project or tag. Narrow the prompt to specific Sentry projects (payments-api, web-frontend) or exclude noisy tags. You can create separate schedules per project if error volumes differ.Learn from results. After a couple of weeks, run an Advanced Devin session to analyze which fixes actually shipped and turn that into Knowledge: