Skip to content

dashboard --dev-server signs in on 127.0.0.1 while the dev dashboard calls localhost, so every request is 401 #301

Done

Description

@blitzcrieg1

Steps

  1. Run the Next dev dashboard (npm run dev, port 3000).
  2. agentmetry dashboard --dev-server --no-browser and open the printed link.

What happens

The link is on http://127.0.0.1:8000/..., so the session cookie is set for 127.0.0.1. The redirect lands on http://localhost:3000/, and the dev dashboard calls the API on http://localhost:8000. Browsers treat the two hosts as different sites, the cookie is never sent, and every API call returns 401. The page shows "Checking feed… / Checking sign-in…" with no error.

Opening the same link with localhost in place of 127.0.0.1 works.

Fix options

  • Print and open the link on the same host the dashboard is configured to call (NEXT_PUBLIC_ORCHESTRATOR_URL, default localhost), or
  • redirect through the matching host before setting the cookie, and
  • make the page say "not signed in" on a 401 instead of waiting forever.

Activity

  1. blitzcrieg1 commented on Nov 25, 2026

    @blitzcrieg1
    OwnerAuthor

    Fixed by #469 (from #458): quote-stripped command text is matched against PIPE_TO_SHELL, so c'u'rl ... | sh is caught.

  2. blitzcrieg1 commented on Nov 25, 2026

    @blitzcrieg1
    OwnerAuthor

    Fixed by #474 (from #473): the dev-server sign-in link is now printed on localhost so the cookie matches the host the dev dashboard calls.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions