Skip to content

Every hour I get Authorization error. Your credentials may be expired or invalid #4971

Description

@zachbryant

Describe the bug

Every hour or so I'm getting Authorization error. Your credentials may be expired or invalid. (Request ID: <AN ID>) Run /login to sign in again.

Running /login does finish successfully but does not remedy the issue. Nor does mcp reload.

Affected version

GitHub Copilot CLI 1.0.88

Steps to reproduce the behavior

Just use the CLI for long enough. One of the messages will randomly trigger this.

Expected behavior

Should not have to reauth + restart the CLI so frequently (or at all, really)

Additional context

Ubuntu 24.04 WSL2

Activity

  1. added theissue type on Sep 26, 2026
  2. dev-dedev commented on Sep 28, 2026

    @dev-dedev

    I've been having the same thing happen every ~30 minutes or so...

  3. darkoa-msft commented on Sep 28, 2026

    @darkoa-msft

    Same here. I wanted to post the below in another open issue, but that is almost 6 months old. So here it goes:

    I suspect the issue in my case is that I have 2 GitHub accounts associated with my work email.
    One is Enterprise that has Copilot subscription, but it has no access to anything in GitHub that I need.
    I forced login into my "normal" work account and learned that it would not let me use Copilot features (e.g. write to memory).
    So, I stopped doing that.
    Since then, I keep getting Authorization Errors. They may be related to that single-time sign in with a different account, or it may not. I removed all credentials from my machine that I could find. Still happening.

    For example, just now, I was auto-signed into GitHub when clicking on a search link to Copilot CLI issues and this was where 'Add a comment' was:

    You cannot contribute to repositories outside of your enterprise.

    I switched to my "normal" GitHub work account and now I can post this.

    I imagine no one that works on GitHub Copilot has a second account that does not have Copilot subscription, so they never experience this issue. CLI is using some global credential but keeps picking up wrong one now and then getting new token for the wrong account and I get into this auth error death loop.

    I can repro this reliably by just opening another session in a different tab.

    But the failure is present even in a single session. Logout followed by login temporarily fixes it, but if I have more than one session open, it kills the other ones.

    Btw, does anyone know what /feedback is good for? It just collects some files into a tarball and it appears that nothing else happens.

  4. darkoa-msft commented on Sep 28, 2026

    @darkoa-msft

    I'm on 1.0.89, if that makes any difference.

  5. added
    area:authenticationLogin, OAuth, device auth, token management, and keychain integration
    and removed on Oct 4, 2026
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

    area:authenticationLogin, OAuth, device auth, token management, and keychain integration

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions