anomalyco / anomalyco/opencode

[bug] Zen login fails: "No authorization code found" / Failed query: update user set account_id

Open
#40,232 2 comments 5 reactions 1 assignee View on GitHub

@MrMushrooooom is already working on this.

Since Aug 3, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

Body:

Description

Signing in to OpenCode Zen fails with both GitHub and Google OAuth. The browser returns:

{"error":"No authorization code found.","cause":{"error":"server_error","error_description":"Failed query: update user set account_id = ?, email = ? where user.email = ?\nparams: acc_01KZ35Q9AR9BDEZX1MFJGQ9NNS,,sanjaykanna75@gmail.com"}}

The OAuth callback returns no code, then the server tries to update the user record with an empty email, which fails. The Zen API key cannot be created, blocking all Zen access.

Repro steps
  1. Go to https://opencode.ai/auth
  2. Click GitHub (or Google)
  3. Authorize
  4. Browser shows the JSON error above

Tried in incognito and after clearing cookies; both providers fail. New-account signup path appears affected too.

Plugins

No response

OpenCode version

OpenCode 1.18.11

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

windows 11

Terminal

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.