Skip to content

Opencode won't launch and it's saddening #16381

@allisoneer

Description

@allisoneer

Description

I can't launch opencode! SAD! I am on arch linux (whatever latest is)

I installed with bun install -g opencode-ai@dev in december, and have been running that since.

I get this failure when I attempt to launch it as of this morning:

❯ opencode
Error: Unexpected error, check log file at /home/allison/.local/share/opencode/log/2026-03-06T175810.log for more details

Failed to run the query 'INSERT INTO "__drizzle_migrations" ("hash", "created_at", "name", "applied_at") values(?, ?, , ?)'

Here is the contents of the log file:

INFO  2026-03-06T17:58:10 +180ms service=default version=0.0.0-dev-202603061608 args=[] opencode
INFO  2026-03-06T17:58:10 +1ms service=default directory=/home/allison/git/secret_project instance
INFO  2026-03-06T17:58:10 +0ms service=project directory=/home/allison/git/secret_project fromDirectory
INFO  2026-03-06T17:58:10 +51ms service=db path=/home/allison/.local/share/opencode/opencode-dev.db opening database

I tested and get the same error on both repositories that are worktrees and ones that are regular source repositories.

I then set $OPENCODE_DISABLE_CHANNEL_DB to 1, to try that out. In which case my error changes to:

❯ opencode
Error: Unexpected error, check log file at /home/allison/.local/share/opencode/log/2026-03-06T180742.log for more details

Failed to run the query 'CREATE TABLE `project` (
        `id` text PRIMARY KEY,
        `worktree` text NOT NULL,
        `vcs` text,
        `name` text,
        `icon_url` text,
        `icon_color` text,
        `time_created` integer NOT NULL,
        `time_updated` integer NOT NULL,
        `time_initialized` integer,
        `sandboxes` text NOT NULL
);
'

In which case my logs for that look like:

INFO  2026-03-06T18:07:42 +176ms service=default version=0.0.0-dev-202603061608 args=[] opencode
INFO  2026-03-06T18:07:42 +1ms service=default directory=/home/allison/git/secret_project creating instance
INFO  2026-03-06T18:07:42 +0ms service=project directory=/home/allison/git/secret_project fromDirectory
INFO  2026-03-06T18:07:42 +24ms service=db path=/home/allison/.local/share/opencode/opencode.db opening database

I am stuck! I don't know how to use my real brain anymore and I had to type this entire issue with my own two hands! Please help!!

Plugins

None

OpenCode version

0.0.0-dev-202603061608

Steps to reproduce

Type opencode

Screenshot and/or share link

Lots of bash above

Operating System

6.18.13-arch1-1

Terminal

Ghostty

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions