You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After completing the GitHub Copilot device-code login successfully(the student package), opencode still
prompts to reauthenticate on every new session, even though opencode auth list shows
a credential is stored.
Two things stand out that may or may not be related to the reauth prompts:
expires is 0 right after a successful login
access and refresh have identical values
Not sure if this is expected behavior for how Copilot's device flow issues tokens, or a
storage bug — flagging in case it's useful for reproducing the reauth issue.
If your issue is not resolved by the fix in #35145 or you're experiencing it on a different version, please mention that so maintainers can track it separately.
You're on OpenCode 1.18.11, which is v1. v1 now only gets fixes for critical bugs (data loss, security problems, or breakage with no workaround). Being asked to log in again each session is a real annoyance, but logging in does work, so this is unlikely to be fixed in v1.
On your two observations: for GitHub Copilot, v1 normally stores the GitHub OAuth token (gho_…) as both access and refresh, with expires: 0, because that token has no fixed expiry. So the auth.json contents are probably expected and not the cause of the prompt.
We'd encourage you to try OpenCode v2 (npm package @opencode/cli, command opencode), which is where active development happens. If the re-auth prompt also happens on v2, or you think this is critical, please reply here with your v2 version and the exact prompt or message you see.
Possibly related:
copilot reauthenticate #8708: an earlier v1 report of a Copilot re-authenticate prompt (closed; the cause there looked different)
Closing this as not planned, @BekaAbate. The Copilot re-auth prompt was reported on v1 (1.18.11), and v1 now only gets fixes for critical bugs. Logging in again does work, so this isn't critical. As mentioned above, the auth.json contents (expires: 0, same access and refresh) are probably normal for Copilot in v1.
If you try OpenCode v2 (@opencode/cli) and still get asked to log in every session, please open a new issue with your v2 version and the exact prompt you see, and link back to this one. Thanks for the report!
Activity
github-actions commentedon Aug 2, 2026
This issue might be a duplicate of an existing issue. Please check:
expires: 0— describes the exact same symptoms (identical access/refresh tokens,expires: 0after device code flow)If your issue is not resolved by the fix in #35145 or you're experiencing it on a different version, please mention that so maintainers can track it separately.
BekaAbate commentedon Aug 2, 2026
the issue was not resolved with this: #35145, it was rejected because it doesnt meet the contribution guidlines.
rekram1-node commentedon Aug 7, 2026
i cannot reproduce, plz provide more info? Seems specific to your setup this isnt being widely reported.
opencodejr commentedon Oct 28, 2026
Thanks for the detailed report, @BekaAbate!
You're on OpenCode 1.18.11, which is v1. v1 now only gets fixes for critical bugs (data loss, security problems, or breakage with no workaround). Being asked to log in again each session is a real annoyance, but logging in does work, so this is unlikely to be fixed in v1.
On your two observations: for GitHub Copilot, v1 normally stores the GitHub OAuth token (
gho_…) as bothaccessandrefresh, withexpires: 0, because that token has no fixed expiry. So theauth.jsoncontents are probably expected and not the cause of the prompt.We'd encourage you to try OpenCode v2 (npm package
@opencode/cli, commandopencode), which is where active development happens. If the re-auth prompt also happens on v2, or you think this is critical, please reply here with your v2 version and the exact prompt or message you see.Possibly related:
opencodejr commentedon Oct 29, 2026
Closing this as not planned, @BekaAbate. The Copilot re-auth prompt was reported on v1 (1.18.11), and v1 now only gets fixes for critical bugs. Logging in again does work, so this isn't critical. As mentioned above, the
auth.jsoncontents (expires: 0, sameaccessandrefresh) are probably normal for Copilot in v1.If you try OpenCode v2 (
@opencode/cli) and still get asked to log in every session, please open a new issue with your v2 version and the exact prompt you see, and link back to this one. Thanks for the report!