Bug reportCompleted
Add account → OpenCode stuck on 'Waiting for login…' after CLI says Connected to OpenCode (1.90.0)
Khang NguyenPosted Shipped in 1.91.1
Bug Details
What happens
Accounts & Quota → Add account → OpenCode → Sign in. The login terminal runs opencode auth login; choose OpenCode → API key (service account), paste the key. The CLI prints Connected to OpenCode and Done, then returns to the prompt. The sheet stays on step 2 Waiting for login… indefinitely — the spinner never stops, step 3 (Name) never opens, and only Cancel works.
Expected
The account saves as soon as the CLI reports success, then step 3 (Name) appears.
Root cause (1.90.0 app.asar)
aiAccounts/paths.jsresolves OpenCode auth as~/.local/share/opencode/auth.json.captureLiveAuth('opencode')inaiAccounts/index.jsreads only that file and returns null when it is missing.runtime.jsonly finalizes a non-Claude login whengetLiveAuthDigest()changes from the baseline. With a null digest it never finalizes, so the UI waits until Cancel or the 30-minute cap.- The bundled OpenCode CLI 2.4.2 stores credentials in
~/.local/share/opencode/opencode.db, tablecredential(rows withintegration_id = 'opencode'), and writes noauth.json. On this Macauth.jsonis absent; the activecredentialrow (labelOpenCode 2) was created at the login time. shared/loginTerminalOutput.jsonly treats the literalLogin successfulas success (Claude); OpenCode printsConnected to OpenCode/Done.
Suggested fix
- Read OpenCode credentials from
opencode.db(credentialwhereintegration_id='opencode'andactive=1) or support both stores, chosen by CLI version. - Add OpenCode's success strings to the login-output parser, or finalize on the DB write directly.
- If neither store changes, show a timeout/error instead of an endless spinner.
Environment
1DevTool 1.90.0, macOS 26.5.2, Apple Silicon. OpenCode CLI 2.4.2 (bundled). No secrets included.
Reproducibility: Unknown · Impact: Minor issue
Environment
- VERSION
- unknown
- OS
- —
- ARCH
- —
- CHANNEL
- —
Resolution progress
SHIPPED · 1.91.1PENDING
REVIEWING
—
IN PROGRESS
COMPLETED
- — Khang Nguyen submitted this request
- — Khoa - StoicSoft Team moved it to In progress
- — Khoa - StoicSoft Team moved it to Completed “Fixed in 1DevTool 1.91.1: logins made with OpenCode 2.x are now detected, so Add account moves on to naming the account as soon as the CLI says it is connected. Switching to a saved OpenCode account now also changes the account OpenCode itself uses. Update from the app menu to get it.”
Discussion0
Newest first- No comments yet. Add context or ask a question below.
Sign in to comment, vote and follow this request.
Sign in to reply