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
I haven't used Opencode in some time and coming back to I was asked to update the version. I updated the version and now the app is no longer letting me use it. I receive the image I have provided.
Plugins
No response
OpenCode version
1.16.2
Steps to reproduce
open opencode running version 1.16.2
Screenshot and/or share link
Operating System
Windows 11
Terminal
Windows Terminal
Reacted by xelemorf, Thibaut Rousseau, Rahmat Sunjani, Ali Hatem, zifiii, Tan Zi Yang, Yaroslav Novikov, ard1102, Luo Chen, QuartzOrange and 9 more
Removing ~/.local/share/opencode/opencode.db solved the issue for me, though I don't care for any previous sessions or data that could have been lost by this. Otherwise, it seems to be related to the issue mentioned and there's a PR with a fix
Reacted by Marie Edcel Balite, xelemorf, AndrewShear, 0xKyle, Michel Boucey, Florent Teyssou, Yuqian Zhang, Trevor Allen, ropepop, Ali Hatem and 29 more
You can resolve it by resetting the local OpenCode data folder.
Solution (Windows)
Press Windows + R.
Enter the following path and press Enter:
%USERPROFILE%.local\share
Delete the opencode folder.
Restart OpenCode.
After restarting, OpenCode should recreate the required files and the error should be resolved.
INSERT INTO message
SELECT m.* FROM old.message m
WHERE m.session_id IN (
SELECT id FROM old.session WHERE project_id = '<OLD_PROJECT_ID>'
);
INSERT INTO part
SELECT p.* FROM old.part p
WHERE p.session_id IN (
SELECT id FROM old.session WHERE project_id = '<OLD_PROJECT_ID>'
);
Still reproducible on 1.18.14 (desktop, Electron build) on Windows 11, upgrading from a ~Feb 2026 version.
Diagnostics from the exported debug bundle:
renderer.log: fatal renderer error: Error: no such column: name (at oc://renderer/index.html)
utility.log: sidecar exited { code: 1 } — the server process dies immediately on startup, so the renderer has no backend
main.log: gets as far as spawning sidecar / awaiting server ready, then nothing
State of the old database (~/.local/share/opencode/opencode.db):
__drizzle_migrations contains only 3 rows, latest created_at = 2026-02-13
migration table is empty
So the migration path from that era's schema to current appears to be broken — the server queries a name column that doesn't exist yet and exits
Workaround that worked: delete (or rename) ~/.local/share/opencode/opencode.db and let the app recreate it on next launch. Session history is lost unless manually migrated via the SQL steps above.
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.
Activity
github-actions commentedon Jun 6, 2026
This issue might be a duplicate of existing issues. Please check:
hguilla commentedon Jun 7, 2026
Removing
~/.local/share/opencode/opencode.dbsolved the issue for me, though I don't care for any previous sessions or data that could have been lost by this. Otherwise, it seems to be related to the issue mentioned and there's a PR with a fixbaoanhng commentedon Jun 11, 2026
If on Windows, access
%USERPROFILE%\.local\share\and delete the opencode folder.ZiFy commentedon Jun 18, 2026
same problem on macOS
conetyon commentedon Jun 19, 2026
这个好使
optimasupport commentedon Jun 20, 2026
How to Fix OpenCode Error: no such column: name (#31119) – Windows Solution
If you're encountering the following error in OpenCode:
Error: no such column: name
#31119
You can resolve it by resetting the local OpenCode data folder.
Solution (Windows)
Press Windows + R.
Enter the following path and press Enter:
%USERPROFILE%.local\share
Delete the opencode folder.
Restart OpenCode.
After restarting, OpenCode should recreate the required files and the error should be resolved.
sapwavino commentedon Jun 20, 2026
Any solutions yet?
a-n-d-a-i commentedon Jun 24, 2026
Same issue when running as my
agentuser with sudo su (or via machinectl), or via SSH.Could not run
opencode(the cli) noropencode web.opencodecaused a systemd coredump, while the web command crashed immediately with the error described in the first post of this issue thread.Deleting ~/.local/share/opencode/opencode.db solved it for me.
ssg135 commentedon Jul 3, 2026
Thank you, your method works on Ubuntu 20.04.
docs(sandbox): document opencode.db image-upgrade remediation
docs(sandbox): document opencode.db image-upgrade remediation (#2663)
kde2podfreebsd commentedon Jul 6, 2026
If u have mac, try this, thats helped for me.
MoshiLL commentedon Jul 17, 2026
it's useful, thanks
shawnboutilier-tech commentedon Jul 17, 2026
Any solutions that do not nuke the session DB? I want to continue my sessions. Any SQLite queries I could run?
tianhuil commentedon Jul 17, 2026
I'm getting this on OSX?
simonliska commentedon Jul 21, 2026
There are multiple PRs open to fully fix the issue, #37707 , #34188 and the closed one #31121.
For session and message table you can follow manual migration:
sqlite3 ~/.local/share/opencode/opencode.dbSELECT id, worktree, name FROM project;ATTACH DATABASE '.local/share/opencode/opencode.db.bak' AS old;builderjackm commentedon Aug 6, 2026
Still reproducible on 1.18.14 (desktop, Electron build) on Windows 11, upgrading from a ~Feb 2026 version.
Diagnostics from the exported debug bundle:
renderer.log:fatal renderer error: Error: no such column: name(atoc://renderer/index.html)utility.log:sidecar exited { code: 1 }— the server process dies immediately on startup, so the renderer has no backendmain.log: gets as far asspawning sidecar/awaiting server ready, then nothingState of the old database (
~/.local/share/opencode/opencode.db):__drizzle_migrationscontains only 3 rows, latestcreated_at= 2026-02-13migrationtable is emptynamecolumn that doesn't exist yet and exitsWorkaround that worked: delete (or rename)
~/.local/share/opencode/opencode.dband let the app recreate it on next launch. Session history is lost unless manually migrated via the SQL steps above.Happy to provide the full debug zip if useful.
alexnotes commentedon Aug 6, 2026
for Mac:
Mohammad-R-Rashid commentedon Aug 17, 2026
@alexnotes solution worked on my mac. Issue still exists in the latest update of open code as of Aug 16, 2026.
bgzo commentedon Aug 22, 2026
Run this DDL:
thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊