Skip to content

Auth keeps resetting #4013

Closed
Closed

Description

@frap129

Description

Every few hours, I have to reauth all of my providers. Mid session, the model response will hang. I interrupt, and then all messages after that have an error about the API key being missing, forcing me to close an reauth.

OpenCode version

1.0.37. Has been happening since 1.x upgrade

Steps to reproduce

Unsure of the conditions that cause it. I have tried removing all plugins in case one was causing it, but issue persists.

Screenshot and/or share link

Image

Operating System

Arch Linux, but installed with bun -g

Terminal

Alacritty

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 7, 2025
  2. github-actions commented on Nov 7, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  3. rekram1-node commented on Nov 7, 2025

    @rekram1-node
    Contributor

    @frap129 are these oauth flows specifically?

  4. removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 7, 2025
  5. self-assigned this
    on Nov 7, 2025
  6. frap129 commented on Nov 7, 2025

    @frap129
    Author

    No, the three providers I use are Anthropic (OAUTH), Google, and OpenRouter. All get reset at the same time

  7. rekram1-node commented on Nov 7, 2025

    @rekram1-node
    Contributor

    Okay now that's odd I haven't heard of this...

    if u run opencode auth list are they showing up properly?

    Are they authed using opencode auth login or are they api keys you have exported as env vars?

  8. frap129 commented on Nov 7, 2025

    @frap129
    Author

    They return properly with opencode auth list. They were all done with opencode auth login. Edited the OP to mention that even though I'm on Arch, opencode is installed with bun -g, not the AUR package in case that matters. Not sure how to best help debug this, next time it happens I'll pop open the console and try to get a log.

  9. rekram1-node commented on Nov 7, 2025

    @rekram1-node
    Contributor

    If it happens, you should try to do opencode run hello --print-logs and dump that output if u can

  10. rekram1-node commented on Nov 7, 2025

    @rekram1-node
    Contributor

    and prolly do opencode auth list again before u try authing again

  11. frap129 commented on Nov 7, 2025

    @frap129
    Author

    Caught it! Grabbed the log from ~/.local/share/opencode/log. Note that here I was using an opencode-gemini-auth plugin. After the issue occurred, opencode auth list reports 0 credentials.

    2025-11-07T021324.log

  12. rekram1-node commented on Nov 7, 2025

    @rekram1-node
    Contributor

    id imagine the plugin is wiping your config then maybe?

  13. frap129 commented on Nov 7, 2025

    @frap129
    Author

    Yep, after some testing would appear so. Apologies for the confusion.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions