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
OpenCode harness reports Signed out while OpenCode is signed in: the isolated database never receives the user's credentials #781
The OpenCode harness reports Signed out and its catalog collapses to the anonymous free models, even though opencode itself is signed in to several providers. Running the suggested repair does not help.
9 models, every one of them opencode/*-free. The Settings page shows the amber Signed out badge, and the model picker has no paid model from any connected provider.
Cause
orx runs OpenCode against an isolated database (OPENCODE_DB=…/agents/opencode/opencode.db) so sessions never touch the user's own history. But OpenCode does not follow OPENCODE_DB for credentials — they live in the credential table of the user's own database:
$ opencode auth list # 13 entries
$ OPENCODE_DB=…/agents/opencode/opencode.db opencode auth list # the same 13 entries
$ sqlite3 ~/.local/share/opencode/opencode.db "select count(*) from credential;"
13
$ sqlite3 ~/.local/share/openresearch/agents/opencode/opencode.db "select count(*) from credential;"
0
So the server orx spawns has no credential to report: /api/integration has no connections, authenticated is false, and only the free models are selectable.
The remedy the app suggests — OPENCODE_DB=… opencode auth login, which is also what the Sign in button runs — writes back to the user's own database, so the isolated one stays empty. That is why running it appears to do nothing.
Proposed fix
Copy the credential tables (credential, account, account_state, control_account) from the user's database into the isolated one before OpenCode is started, one-way and additively. Opening PR with tests and a measurement against a real installation.
Activity