Repository navigation
feat(agent-handoff): Structure claim errors - #131464
Merged
evanpurkhiser merged 1 commit intoNov 17, 2026
Merged
Conversation
evanpurkhiser
commented
Nov 17, 2026
evanpurkhiser
force-pushed
the
git/feat-agent-handoff-identify-ip-mismatch-errors
branch
from
November 17, 2026 16:28
7a0b29f to
b3966f5
Compare
evanpurkhiser
force-pushed
the
git/feat-agent-handoff-identify-ip-mismatch-errors
branch
from
November 17, 2026 16:29
b3966f5 to
bfe1a53
Compare
Abdkhan14
approved these changes
Nov 17, 2026
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-unavailablebecause both require a new handoff; IP mismatches useagent-handoff-ip-mismatchso the CLI can explain how to disable IP pinning. Cross-origin and rate-limit failures are structured as well, and rate limits preserveRetry-After.