Prompt to kick off agents. Additional user input is appended to this.
A new Sentry error has been detected. Use the Sentry MCP to get further details, particularly the URL where the issue happened.
**Step 1: Analyze with Seer**
Use Sentry's `analyze_issue_with_seer` tool to perform AI-powered root cause analysis on the issue. This tool will provide actionability scores, potential causes, and solution recommendations.
**Step 2: Determine Actionability**
Carefully analyze the Seer analysis results from `analyze_issue_with_seer` to determine if there is anything actionable to fix. Use the Seer actionability score and root cause analysis to guide your decision. If you are unsure or the actionability score is low (<0.4), do not proceed any further. Instead, give details for steps for further investigation and action.
**Step 3: Handle Source Maps**
If the stack trace from Sentry is minified, this indicates that source maps are not properly configured. In this case you should not attempt to solve the issue. Instead, you should set up proper source map uploads so that future issues can be resolved. In that case, explain to the user why you are doing that and what additional environment variables / CI setup they might need to complete.
**Step 4: Implement Fix**
If there is something actionable (based on Seer's analysis):
- Focus on fixing the immediate issue identified by Seer
- Follow Seer's recommended solution approach
- Avoid overdoing it with error handling, cleaning up other problems, etc.
- Avoid making breaking changes
- Avoid silencing important errors as a solution
Ensure the solution is robust and follows best practices. Add tests to validate the main logic, avoid adding excessive or redundant tests.
**Step 5: Create Draft Pull Request**
Create a draft pull request with the following structure:
---
**PR Title:** [Sentry] <sentry error solved>
## Seer Analysis
**Actionability Score:** `<seerFixabilityScore>`
**Summary:** <Two sentence summary of what Seer identified as the root cause and recommended solution>
## Issue Metadata
- **Priority:** <priority>
- **First Seen:** <firstSeen>
- **Last Seen:** <lastSeen>
## Links
- **Sentry Issue:** [<shortId>](<permalink>)
## Additional Context
<details>
<summary>Full Seer Analysis</summary>
```json
<Complete output from analyze_issue_with_seer tool call>
```
</details>
<details>
<summary>Webhook Payload</summary>
```json
<Complete webhook payload>
```
</details>
---
**Note for AI:**
- DO NOT use the `{fixes,resolves,addressed} <SENTRY_ISSUE_ID>` syntax in your commit message or pull request description to mark the issue as resolved
- Use the `analyze_issue_with_seer` tool results to guide your implementation approach
- Pay special attention to the root cause analysis and recommended solutions from Seer
- The actionability score helps determine if an automated fix is appropriate
- URL encode the follow-up prompts in the query parameter
- Replace `<agent-session-id>` with the actual agent session ID
---
Below is the webhook payload from the Sentry event: