GitHub App webhook URL does not match API Gateway URL
The webhook URL configured on your GitHub App must exactly match the API Gateway endpoint printed during npx mergewatch@latest init.Fix: Go to GitHub Settings > Developer settings > GitHub Apps > your app > Webhook URL and verify it matches your API Gateway URL (e.g. https://abc123.execute-api.us-east-1.amazonaws.com/prod).
Webhook secret mismatch
The HMAC secret stored in SSM must match the secret configured on the GitHub App. A mismatch causes every delivery to fail signature validation.Fix: Verify the SSM parameter value matches your GitHub App’s webhook secret:
The GitHub App needs write access to pull requests to post review comments.Fix: Go to GitHub App settings > Permissions & events > Repository permissions and confirm Pull requests is set to Read & write.
Bedrock model access not enabled
Amazon Bedrock requires you to explicitly enable model access before invoking a model.Fix: Open the AWS Console > Amazon Bedrock > Model access and enable the Claude model your deployment uses. This must be done in the same region as your deployment.
IAM role missing bedrock:InvokeModel
The ReviewAgent Lambda’s execution role must include the bedrock:InvokeModel permission.Fix: Check the Lambda’s execution role in the AWS Console and verify it has a policy allowing bedrock:InvokeModel on the model ARN. If you deployed with SAM, redeploy — the template includes this permission by default.
ReviewAgent Lambda errors
Fix: Check the ReviewAgent Lambda logs directly:
Copy
Ask AI
npm run logs:agent
Look for Bedrock API errors, permission denied responses, or timeout exceptions.
The ignore_patterns configuration may be matching all files in the diff.Fix: Review your .mergewatch.yml file:
Copy
Ask AI
# Example — this skips everything under docs/ and all lock filesrules: ignore_patterns: - "docs/**" - "*.lock"
Narrow the patterns or remove entries that are too aggressive.
PR is a draft
Draft pull requests are skipped by default.Fix: Either mark the PR as Ready for review or set skip_drafts: false in your .mergewatch.yml:
Copy
Ask AI
rules: skip_drafts: false
All changed files match excluded paths
MergeWatch auto-skips a PR when every changed file matches an excluded pattern (lock files, generated code, documentation, etc.).Fix: Confirm the PR includes at least one source file that is not in an excluded path. Check the skip reason in the review record or Lambda logs.
The health endpoint tells you which secret is missing. A missing SSM parameter typically means the install wizard was interrupted.Fix: Run the health check and read the output:
Copy
Ask AI
npx mergewatch@latest health
Re-run npx mergewatch@latest init to recreate missing parameters, or manually add them:
All SSM parameters must follow the naming convention /mergewatch/{stage}/*. A different prefix causes lookups to fail.Fix: List your SSM parameters and verify the path:
The dashboard uses NextAuth for session management. A missing NEXTAUTH_SECRET causes all authentication to fail with a 401.Fix: Set the environment variable on your dashboard deployment:
Copy
Ask AI
# Generate a random secretopenssl rand -base64 32
Add the output as NEXTAUTH_SECRET in your environment configuration.
GitHub OAuth callback URL mismatch
The callback URL configured on the GitHub OAuth App must match the dashboard’s URL exactly.Fix: Go to GitHub Settings > Developer settings > OAuth Apps > your app and set the Authorization callback URL to:
NextAuth needs the NEXTAUTH_URL variable to construct callback URLs. If it is missing or wrong, redirects break.Fix: Set NEXTAUTH_URL to the canonical URL of your dashboard (e.g. https://dashboard.mergewatch.dev). Do not include a trailing slash.
Bedrock applies per-model, per-region request quotas. High review volume can hit these limits.Fix: Request a quota increase in the AWS Console > Service Quotas > Amazon Bedrock.
Enable cross-region inference for higher throughput
Cross-region inference profiles distribute requests across multiple regions, increasing effective throughput.Fix: Set the model to a cross-region inference profile in your configuration:
PRs with more than 50 changed files take significantly longer to review.Fix: Set a file limit in your .mergewatch.yml:
Copy
Ask AI
rules: max_files: 50
Files beyond the limit are summarized rather than reviewed line-by-line.
Lambda cold start
The first invocation after a period of inactivity incurs a cold start (5-10 seconds extra).Fix: This is expected behavior. Subsequent invocations within the same warm period are faster. For consistently low latency, enable Lambda provisioned concurrency on the ReviewAgent function.
Bedrock region latency
Some Bedrock regions experience higher latency during peak hours.Fix: Check the Bedrock region’s CloudWatch metrics for InvocationLatency. Consider switching to a region with lower latency or enabling cross-region inference.