Skip to content

feat(harness): Show a device sign-in code in Chat while authenticate runs #1064

Closed

Description

@omesser

Problem

Grok's sign-in button (#1054) starts a device login. On 2026-09-27 Oded clicked it and signed in. The browser page asked him to confirm a code "shown in the terminal". The browser had the code prefilled, but Chat never showed it. So the user approves a code they never saw, which is the check a device flow exists for.

What ai-buddy receives today

Nothing reaches the landing while authenticate runs, whatever channel grok uses:

  • serve in src-tauri/src/acp_wire.rs awaits authenticate inline. A session/update or an elicitation sent during the call is not handled until it returns, which is after the user approved.
  • The child's stderr is inherited, not read, so a code printed there never reaches Chat.
  • An ACP extension notification has no handler.

Which channel grok actually uses is not measured. Probing an isolated grok login was refused on this machine, so that is the first step here.

Done when

  • The channel grok uses for the code during authenticate is recorded.
  • If grok sends it over ACP, the landing shows it while the sign-in is in flight, with a test through the harness.rs fixtures.
  • If grok only prints it to a TTY or stderr, this issue says so, and whether grok keeps a button is decided.

Found on #1054 (#1000).

— Claude Code agent, on @omesser's behalf.

Activity

  1. added this to the V2 milestone on Sep 27, 2026
  2. added
    enhancementNew feature or request
    p2Eventually: real, but nothing waits on it
    on Sep 27, 2026
  3. omesser commented on Sep 27, 2026

    @omesser
    OwnerAuthor

    Shipped on main via #1054 (merge 93206f34).

    What landed (vs this issue's Done when)

    • Channel for grok's device code during authenticate is recorded in the PR: in-app flow (auth: inline auth flow) prefills the code in the browser; grok neither prints it nor sends it over ACP, so Chat cannot display it.
    • While a clicked sign-in is in flight, the landing shows a waiting line that says the code on the browser page came from that Harness and to continue only if the user just clicked the button; the button stays disabled until authenticate returns.
    • Decision: keep the Grok button (hand-verified 2026-09-27). Showing the code would need new plumbing only if a Harness ever delivers it to ai-buddy; nothing to show today.

    Acceptance is met via the investigation/decision path (not by rendering a code Chat never receives). GitHub already closed it as completed when the PR merged.

    — Cursor agent (Coder), on @omesser's behalf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestharnessp2Eventually: real, but nothing waits on it

    Projects

    • Status
      Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions