Skip to content

feat(agent-handoff): Require device approval across networks - #132266

Merged
evanpurkhiser merged 1 commit into
masterfrom
git/feat-agent-handoff-require-device-approval-across-networks
Nov 24, 2026
Merged

evanpurkhiser merged 1 commit into
masterfrom
git/feat-agent-handoff-require-device-approval-across-networks

Conversation

@evanpurkhiser

Copy link
Copy Markdown
Member

Onboarding handoffs should work when a user and their agent are on different networks, with the user approving sign-in in their browser.

Matching IPs continue to get a one-time CLI setup code. A mismatch or missing IP now consumes the handoff and returns the setup context with the code omitted. Device OAuth owns consent on that path. The prompt endpoint still accepts the legacy setting during the frontend rollout, and the claim never uses it to decide whether to mint credentials.

Merge after the compatible stable CLI is available through the installer linked by the handoff guide.

Toolkit CLI device approval PR

@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Nov 23, 2026
@evanpurkhiser
evanpurkhiser marked this pull request as ready for review November 24, 2026 00:50
@evanpurkhiser
evanpurkhiser requested a review from a team as a code owner November 24, 2026 00:50
_record_claim(ClaimOutcome.INVALID, handoff)
raise
_record_claim(ClaimOutcome.ACCEPTED, handoff)
_record_claim(ClaimOutcome.ACCEPTED if same_ip else ClaimOutcome.DEVICE_AUTH_REQUIRED, handoff)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

device_auth_required is the last event for this path. Nothing links the approval result to handoff_id, so we cannot see how many of these handoffs complete. Is that worth tracking?

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.

the handoff_id and onboarding run are connected so we see once that bit starts.

Can try and probably have the handoff_id get passed through to device auth too to get metrics over there as well

Comment on lines +6 to 10
keep running while the user approves in their browser. Follow the setup instructions the
CLI prints after sign-in succeeds.

Replace HANDOFF_CODE with the handoff code, run the command for your shell once, and then
follow the instructions it prints.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: the first paragraph and the second paragraph both end with "follow the instructions it prints".

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.

will follow up

@evanpurkhiser
evanpurkhiser merged commit d368d2a into master Nov 24, 2026
87 checks passed
@evanpurkhiser
evanpurkhiser deleted the git/feat-agent-handoff-require-device-approval-across-networks branch November 24, 2026 19:18
evanpurkhiser added a commit that referenced this pull request Nov 24, 2026
The handoff guide repeats when to follow the CLI’s output. Keep that
instruction after the approval step, where it tells the agent when to
continue setup.

[Follow-up from
#132266](#132266 (comment))
evanpurkhiser added a commit that referenced this pull request Nov 25, 2026
Handoff sign-in can use device approval when the agent runs on a
different network. Remove the network-only checkbox and warning from
both prompt variants, and stop including the setting in requests.

Deploy after the handoff claim endpoint supports device approval.

[Backend device approval
PR](#132266)
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