You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A 403 without a scope challenge still tells the agent to retry #2356
When Sentry answers 403 without an insufficient_scope challenge, the MCP still formats it with the generic Input Error template ("…You may be able to resolve the issue by addressing the concern and trying again.", packages/mcp-core/src/internal/error-handling.ts:349-360 on main, or the UserInputError branch when a tool rewraps it). #2222 fixed only the scope-challenge case and kept this one on purpose ("A role-based 403 has no challenge and keeps the old message").
These 403s come from the account's access, not from the input, so retrying the same call can't work:
Project access: an org-scoped endpoint called with project=<id> the caller's teams can't access raises a bare PermissionDenied (sentry src/sentry/api/bases/organization.py:475-490, _validate_fetched_projects, called from get_projects at :563-564). DRF's body is only "You do not have permission to perform this action." This is the search_issues shape: find_organizations and find_projects succeed, then the issue search for one project returns 403.
Lost org membership / role changes: same token, calls flip from 200 to 403.
Agents read "try again", retry once or twice, then give up without telling the user to ask an org Owner/Manager for access.
Proposed fix: a Permission Denied message for any non-scope ApiPermissionError (also when rewrapped as a cause) that says the account lacks access and retrying the same call won't help.
Activity
linear-code commentedon Nov 18, 2026
MCP-1249