Troubleshooting
Action issues
Section titled “Action issues””No novel issues found” every run
Section titled “”No novel issues found” every run”SWEny’s duplicate detection checks your issue tracker for matching issues before acting. If it always skips:
- Check
time-range— the default is24h. If your errors are older, try7d - Check
severity-focus— default iserrors. Set towarningsif your logs use different severity levels - Check
service-filter— a filter likepayment-*only matches services with that prefix - Try
dry-run: truewithinvestigation-depth: thoroughto see what SWEny finds without any skip logic
Agent runs out of turns
Section titled “Agent runs out of turns”If you see “max turns reached” in the output, the agent hit the iteration limit before finishing:
- Increase
max-turns(default: 50) - Use
additional-instructionsto focus the agent on a specific area - Check that your repo isn’t too large — the agent has to read files to understand the codebase
Datadog returns no logs
Section titled “Datadog returns no logs”- Verify your API key has
logs_readpermission - Check that
dd-sitematches your Datadog region (e.g.,datadoghq.eufor EU) - Check that your services emit logs at the severity level you’re filtering for
- Try a broader
service-filter(*) and widertime-range(7d) to verify connectivity
Linear ticket not created
Section titled “Linear ticket not created”- Verify
linear-api-keyhas write access to the team specified bylinear-team-id - Check that
linear-bug-label-idandlinear-triage-label-idare valid UUIDs for labels in that team - Check the Actions run log for error messages from the Linear API
PR not opened
Section titled “PR not opened”- Your workflow needs
permissions: { contents: write, pull-requests: write } - If using a fine-grained personal access token, it needs repository write access
- Check if a branch with the same name already exists (SWEny won’t force-push)
Agent issues
Section titled “Agent issues””Either ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN must be set”
Section titled “”Either ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN must be set””The agent validates environment variables on startup. Set at least one:
# Option 1: API key (pay per token)ANTHROPIC_API_KEY=sk-ant-...
# Option 2: OAuth token (included with Claude Max/Pro)CLAUDE_CODE_OAUTH_TOKEN=...Slack bot doesn’t respond
Section titled “Slack bot doesn’t respond”- Verify
SLACK_APP_TOKENstarts withxapp-andSLACK_BOT_TOKENstarts withxoxb- - Check that Socket Mode is enabled in your Slack app settings
- Verify bot token scopes include
chat:write,app_mentions:read,im:history - Check the agent logs for connection errors
”Cannot find module ‘@swenyai/providers/…’”
Section titled “”Cannot find module ‘@swenyai/providers/…’””If you see this when building:
- Make sure
@swenyai/providersis installed - Run
npm run buildin the providers package first (it needs to generatedist/) - Check that your
tsconfig.jsonusesmoduleResolution: "NodeNext"
Cost questions
Section titled “Cost questions”How much does a triage run cost?
Section titled “How much does a triage run cost?”With an API key, a typical run uses 10k–50k tokens depending on error complexity and investigation-depth. At current Claude Sonnet pricing, that’s roughly $0.10–$0.50 per run.
With a Claude Max/Pro OAuth token, triage runs are included in your subscription.
How do I limit costs?
Section titled “How do I limit costs?”- Set
max-turnsto a lower value (e.g.,20instead of50) - Use
service-filterto focus on specific services - Use
investigation-depth: quickfor faster, cheaper runs - Run less frequently (weekly instead of twice-weekly)
Agent runs out of context
Section titled “Agent runs out of context”If you see “context window exceeded” in the output, the codebase or error logs are too large:
- Use
service-filterto narrow the scope - Use
severity-focus: errorsto exclude warnings - Set
investigation-depth: quickfor a lighter analysis