Skip to content

feat(agent-handoff): Structure claim errors - #131464

Merged
evanpurkhiser merged 1 commit into
masterfrom
git/feat-agent-handoff-identify-ip-mismatch-errors
Nov 17, 2026
Merged

evanpurkhiser merged 1 commit into
masterfrom
git/feat-agent-handoff-identify-ip-mismatch-errors

Conversation

@evanpurkhiser

@evanpurkhiser evanpurkhiser commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Agent handoff claim failures are consumed by the CLI, where plain detail strings force string matching and make recovery ambiguous.

Return intentional failures through SentryAPIException with stable codes. Invalid and unavailable claims share agent-handoff-unavailable because both require a new handoff; IP mismatches use agent-handoff-ip-mismatch so the CLI can explain how to disable IP pinning. Cross-origin and rate-limit failures are structured as well, and rate limits preserve Retry-After.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 17, 2026
@evanpurkhiser
evanpurkhiser force-pushed the git/feat-agent-handoff-identify-ip-mismatch-errors branch from 7a0b29f to b3966f5 Compare November 17, 2026 16:28
@evanpurkhiser evanpurkhiser changed the title feat(agent-handoff): Identify IP mismatch errors feat(agent-handoff): Structure claim errors Nov 17, 2026
@evanpurkhiser
evanpurkhiser force-pushed the git/feat-agent-handoff-identify-ip-mismatch-errors branch from b3966f5 to bfe1a53 Compare November 17, 2026 16:29
@evanpurkhiser
evanpurkhiser merged commit ecbafc2 into master Nov 17, 2026
83 checks passed
@evanpurkhiser
evanpurkhiser deleted the git/feat-agent-handoff-identify-ip-mismatch-errors branch November 17, 2026 16:47
evanpurkhiser added a commit to getsentry/toolkit that referenced this pull request Nov 18, 2026
The public handoff page launches the installer with `SENTRY_HANDOFF`.
Setup must claim the intended account even when the CLI is already
installed or authenticated to another account or Sentry host, and
failures need to remain actionable without exposing either short-lived
code.

Integrate handoff claiming into the existing `sentry cli setup
--install` path used by the shell and PowerShell installers. The CLI
uses the generated `claimAgentHandoff` operation from `@sentry/api`
2.8.0, authenticates with the returned setup code, client ID, and Sentry
URL while superseding unrelated credentials, and prints
`flowInstructions` only after authentication succeeds.

Structured API errors preserve useful server detail. An IP-pinning
mismatch provides explicit recovery guidance using the stable code from
getsentry/sentry#131464, while handoff and setup codes remain out of
logs, telemetry, persisted configuration, and user-facing errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants