Skip to content

ref(agent-handoff): Move handoff claims to the CLI - #131499

Merged
evanpurkhiser merged 3 commits into
masterfrom
git/ref-agent-handoff-move-handoff-claims-to-the-cli
Nov 18, 2026
Merged

evanpurkhiser merged 3 commits into
masterfrom
git/ref-agent-handoff-move-handoff-claims-to-the-cli

Conversation

@evanpurkhiser

Copy link
Copy Markdown
Member

Agent handoffs now claim and authenticate through Sentry CLI, so the public Markdown page should hand the one-time code to the installer instead of exchanging it itself.

This updates agent-handoff.md with SENTRY_HANDOFF install commands for Unix and PowerShell, removes the legacy Markdown POST, slash alias, and private credential runbook, and moves the remaining claim tests to the public JSON API. Claim and setup-code analytics remain on the shared API path.

Draft until getsentry/toolkit#2320 lands and its CLI release is available from the stable installer.

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 17, 2026
Comment on lines +25 to +29
try {
irm https://cli.sentry.dev/install.ps1 | iex
} finally {
Remove-Item Env:SENTRY_HANDOFF
}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's drop the remove item, we don't even really need that, just the irm ... | iex and the env set before it

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done — PowerShell now only sets SENTRY_HANDOFF and runs the installer.

@evanpurkhiser
evanpurkhiser force-pushed the git/ref-agent-handoff-move-handoff-claims-to-the-cli branch 2 times, most recently from 4b2c7f5 to dc20c7c Compare November 17, 2026 20:14
@evanpurkhiser
evanpurkhiser marked this pull request as ready for review November 17, 2026 20:17
@evanpurkhiser
evanpurkhiser requested a review from a team as a code owner November 17, 2026 20:17
The public handoff page now passes the one-time code to Sentry CLI, which owns claim exchange and authentication. Remove the legacy Markdown POST and private credential runbook so claims have one API path.
@evanpurkhiser
evanpurkhiser force-pushed the git/ref-agent-handoff-move-handoff-claims-to-the-cli branch from dc20c7c to a0c1d2a Compare November 17, 2026 20:18

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a0c1d2a. Configure here.

@evanpurkhiser
evanpurkhiser enabled auto-merge (squash) November 18, 2026 19:14
The CLI claims handoffs against sentry.io by default, so the public guide
now sets SENTRY_HOST when the page is served by another instance.

Co-Authored-By: Evan Purkhiser <1421724+evanpurkhiser@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

No findings on the latest commit.

@Abdkhan14 Abdkhan14 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@evanpurkhiser worth looking into:

src/sentry/agent_handoff/views.py:24 — Preview links are broken. The frontend still links to ?preview=1&flow=..., but the view now ignores both parameters and returns generic installer instructions instead of flow-specific previews.

src/sentry/agent_handoff/claims.py:127 — Organization context is lost. The CLI dependency prints only flowInstructions, while onboarding/create-project instructions reference “the organization slug above.” Agents therefore lack the slug required to report progress.

src/sentry/templates/sentry/agent_handoff/claim.md:15 — Custom/self-hosted instance URL is not passed to the CLI, so claims default to Sentry SaaS or another configured host. This is already raised in the existing Bugbot comment.

Reuse the existing code block and PowerShell helpers so the whole install
command lives in one place instead of being split across the template.

Co-Authored-By: Evan Purkhiser <1421724+evanpurkhiser@users.noreply.github.com>
@evanpurkhiser
evanpurkhiser enabled auto-merge (squash) November 18, 2026 19:24
@evanpurkhiser
evanpurkhiser merged commit 5139a39 into master Nov 18, 2026
103 checks passed
@evanpurkhiser
evanpurkhiser deleted the git/ref-agent-handoff-move-handoff-claims-to-the-cli branch November 18, 2026 19:31
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