[Agent Wallet] Browser sign-in loops after Google auth: /end?code=... bounces back to /agentic/login, Authorize / CLI token never shown

Open
#66 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
javascript, node.js

Research direction

Start by tracing the browser login callback from /end?code=... through the dashboard session handling and the mm login browser flow in @metamask/agent-wallet 7.3.0. Check how the authorization code and session are carried into /agentic/login, then reproduce the loop with a fresh session. Done means Google sign-in reaches the Authorize prompt and displays the CLI token.

Written by the indexing model from the issue text.

Description

Summary

mm login browser sign-in cannot be completed. After successful Google authentication, the dashboard redirects to https://developer.metamask.io/end?code=... and within a few seconds automatically returns to https://developer.metamask.io/agentic/login (no query parameters). The Authorize screen and the CLI token are never displayed, and no error message is shown. The loop repeats indefinitely.

Environment

  • Date/time: 2026-11-08, approx. 16:15–16:24 JST (UTC+9), Japan
  • OS: macOS 27.2, Apple Silicon
  • CLI: @metamask/agent-wallet 7.3.0 (mm), Node.js v26.12.0
  • mm doctor: cli 7.3.0, env prod, authenticated: false, initialized: false
  • Browsers reproduced in (all with cookies enabled):
    • Safari
    • Google Chrome
    • Comet
    • An automated Chromium browser (separate machine profile)

Steps to reproduce

  1. Run mm login browser --no-wait and open the printed URL
    (https://developer.metamask.io/agentic/login?anonymous_id=...&session_id=...).
    (Also reproduced with the interactive mm login browser flow.)
  2. Click Continue with Google and complete Google sign-in, including
    authenticator-app 2-step verification when prompted.
  3. Select the Google account.
  4. Observe the redirect to https://developer.metamask.io/end?code=....
  5. Within a few seconds the page automatically returns to
    https://developer.metamask.io/agentic/login with no query parameters.
  6. Repeat from step 2 — the same loop occurs.

Expected behavior

After Google authentication, the dashboard shows the Authorize prompt and then displays a CLI token (cliToken:cliRefreshToken) to paste into the terminal, as documented in the CLI setup guide.

Actual behavior

  • Redirect loop between the Google account selection, /end?code=..., and /agentic/login.
  • Authorize is never presented; no CLI token is issued.
  • No error message, region/availability notice, or console-visible explanation in the UI.
  • Google authentication itself succeeds (including 2FA); the failure appears to be in the dashboard's post-auth callback/session handling.

Reproduction details

  • Reproduced with 3 fresh login sessions (new session_id each time) and in 4 different browsers, including browsers with no extensions and no prior MetaMask state.
  • Because it reproduces across browsers and fresh sessions on the same account, it does not appear to be a local cookie/extension issue.
  • Session IDs and the account email can be provided privately on request (withheld here).

Impact

New users cannot complete Agent Wallet CLI onboarding via Google sign-in at all; mm init and all wallet operations are unreachable.

Dominant language
Python
Stars
30
Forks
16
Avg merge
11h 59m
Merged PRs (30d)
5

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MetaMask/agent-skills

All issues in MetaMask/agent-skills

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.