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
{{ message }}
Repository navigation
The API keys disappear from the account, and the agent stops working, reporting: "This API key has expired..." #56556
I had been regularly using an API key with no expiration date, but a few minutes ago, the agent informed me that the API key has expired. I checked my account and, to my surprise, found that the API keys have disappeared. I tried creating a new one and re-authenticated in the terminal; I then reopened the desktop interface, but the agent keeps telling me that "This API key has expired..."
Thanks for reporting this, and sorry your API keys disappeared and the agent stopped working.
We don't handle account and billing support in GitHub issues. Please email help@anoma.ly with the details: when you noticed the keys were gone, roughly when you created the new key, and the exact error. If you've already emailed, the team will get to it, especially now that we've seen it here. Please keep your email address, account details and API keys out of this public issue and put them only in the email.
In the meantime, the desktop app may still be using the old stored key. Running opencode auth logout and then logging in again with the new key may help (see #56500).
Fixed here by deleting a stale legacy entry in ~/.local/share/opencode/auth.json — v2 auth login/logout never touches that file, but the service gave its old expired opencode key precedence over the new credential in the v2 store. jq 'del(.["opencode"])' + service restart (pkill -f "opencode-cli serve --service") fixed the desktop instantly. Same shadowing class as #56500.
Same here — a Go subscriber whose key had no expiry date set, revoked on Oct 18 with no notice. It vanished from my account, so I could not renew or rotate it; I had to build a new one from scratch.
I opened #56833 with the full details. One point worth adding to this thread: I had no third-party provider linked at all — the only credential in my workspace was my own Go key. So the impact is not limited to workspaces with external providers connected, even though the disclosure is worded that way.
Hi @nzcorp, I'm closing this issue because account and billing support is handled by email, not here on GitHub. If your missing API keys or the "This API key has expired" error still aren't sorted out, please email help@anoma.ly with the details. Please keep your account information and keys in that email and out of this public issue. Thanks for your patience, and sorry for the trouble.
Hey everyone! I managed to solve it.
Go to https://opencode.ai/console/account
Under "PERSONAL API KEY," click on "+ add api key."
A new window will open; the only mandatory field is "KEY NAME."
Enter a name of your choice, then click "CREATE."
A new API key will be generated—copy it, go to your OpenCode instance, run the /connect command, and press Enter.
When prompted, paste the new API key, hit Enter, and you're all set!
Brazilian greetings to you all!
ver. em português:
ola! caras, consegui resolver.
acessem https://opencode.ai/console/account
em PERSONAL API KEY cliquem em : + add api key
vai abrir uma nova janela e o unico campo obrigatorio é : KEY NAME
coloquem o nome que acharem adequado e depois apertei em CREATE
Vai ser gerado uma nova api key copiem e vai no seu opencode e execute o comando /connect apertem enter
e quando solicitado colem a nova api key gerada. teclem Enter e sejam felizes.
Activity
opencode-agent commentedon Oct 17, 2026
Thanks for reporting this, and sorry your API keys disappeared and the agent stopped working.
We don't handle account and billing support in GitHub issues. Please email help@anoma.ly with the details: when you noticed the keys were gone, roughly when you created the new key, and the exact error. If you've already emailed, the team will get to it, especially now that we've seen it here. Please keep your email address, account details and API keys out of this public issue and put them only in the email.
In the meantime, the desktop app may still be using the old stored key. Running
opencode auth logoutand then logging in again with the new key may help (see #56500).Related issues, in case they help:
auth logoutThe bot will close this issue in 1 day.
omani commentedon Oct 17, 2026
opencode was hacked. they probably revoked all API keys just for safe measure. and @opencode-agent does not know anything about it. they even made it to the HN frontpage, congrats: https://news.ycombinator.com/item?id=50133401
yoodoohai commentedon Oct 18, 2026
Fixed here by deleting a stale legacy entry in
~/.local/share/opencode/auth.json— v2auth login/logoutnever touches that file, but the service gave its old expiredopencodekey precedence over the new credential in the v2 store.jq 'del(.["opencode"])'+ service restart (pkill -f "opencode-cli serve --service") fixed the desktop instantly. Same shadowing class as #56500.duruonanni commentedon Oct 18, 2026
Same here — a Go subscriber whose key had no expiry date set, revoked on Oct 18 with no notice. It vanished from my account, so I could not renew or rotate it; I had to build a new one from scratch.
I opened #56833 with the full details. One point worth adding to this thread: I had no third-party provider linked at all — the only credential in my workspace was my own Go key. So the impact is not limited to workspaces with external providers connected, even though the disclosure is worded that way.
opencode-agent commentedon Oct 18, 2026
Hi @nzcorp, I'm closing this issue because account and billing support is handled by email, not here on GitHub. If your missing API keys or the "This API key has expired" error still aren't sorted out, please email help@anoma.ly with the details. Please keep your account information and keys in that email and out of this public issue. Thanks for your patience, and sorry for the trouble.
sousarobinho-art commentedon Oct 20, 2026
Hey everyone! I managed to solve it.
Go to https://opencode.ai/console/account
Under "PERSONAL API KEY," click on "+ add api key."
A new window will open; the only mandatory field is "KEY NAME."
Enter a name of your choice, then click "CREATE."
A new API key will be generated—copy it, go to your OpenCode instance, run the /connect command, and press Enter.
When prompted, paste the new API key, hit Enter, and you're all set!
Brazilian greetings to you all!
ver. em português:
ola! caras, consegui resolver.
acessem https://opencode.ai/console/account
em PERSONAL API KEY cliquem em : + add api key
vai abrir uma nova janela e o unico campo obrigatorio é : KEY NAME
coloquem o nome que acharem adequado e depois apertei em CREATE
Vai ser gerado uma nova api key copiem e vai no seu opencode e execute o comando /connect apertem enter
e quando solicitado colem a nova api key gerada. teclem Enter e sejam felizes.