GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [BUG]: Error: no such column: name · Issue #31119 · anomalyco/opencode

[BUG]: Error: no such column: name #31119

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
[BUG]: Error: no such column: name#31119
Copy link
Assignees
StarpTech

Description

@AndrewShear
AndrewShear
opened on Jun 6, 2026
Issue body actions

Description

Background

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

  1. open opencode running version 1.16.2

Screenshot and/or share link

Image

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

Activity

  1. github-actions
    assigned
    StarpTech
    on Jun 6, 2026
  2. github-actions commented on Jun 6, 2026

    @github-actions
    github-actionsBot
    on Jun 6, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of existing issues. Please check:

    • account_state table schema mismatch after upgrade — missing active_account_id column causes startup crash #30953: Same root cause — schema mismatch after upgrading OpenCode causes startup crash with "no such column" errors due to stale database schema from an older install.
  3. hguilla commented on Jun 7, 2026

    @hguilla
    hguilla
    on Jun 7, 2026
    More actions

    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
  4. rekram1-node
    marked Opencode Tools Error #31379 as a duplicate of this issue on Jun 8, 2026
  5. baoanhng commented on Jun 11, 2026

    @baoanhng
    baoanhng
    on Jun 11, 2026
    More actions

    If on Windows, access %USERPROFILE%\.local\share\ and delete the opencode folder.

    Reacted by Marek Brož, YuuAnnooo, Xiao-Yamin, Miguel Ángel YAPIAS VELI, conetyon, Branimir Rijavec, JustChenk, KN94, MoshiLL, Andrei Ilievici and 9 more
  6. ZiFy commented on Jun 18, 2026

    @ZiFy
    ZiFy
    on Jun 18, 2026
    More actions

    same problem on macOS

    Reacted by Dirty Mike And The Boys
  7. conetyon commented on Jun 19, 2026

    @conetyon
    conetyon
    on Jun 19, 2026
    More actions

    如果是Windows,访问并删除opencode文件夹。%USERPROFILE%\.local\share\

    这个好使

  8. optimasupport commented on Jun 20, 2026

    @optimasupport
    optimasupport
    on Jun 20, 2026
    More actions

    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.

    Image
    Reacted by Shahid Nalwar
  9. sapwavino commented on Jun 20, 2026

    @sapwavino
    sapwavino
    on Jun 20, 2026
    More actions

    same problem on macOS

    Any solutions yet?

  10. a-n-d-a-i commented on Jun 24, 2026

    @a-n-d-a-i
    a-n-d-a-i
    on Jun 24, 2026
    More actions

    Same issue when running as my agent user with sudo su (or via machinectl), or via SSH.

    Could not run opencode (the cli) nor opencode web.

    opencode caused 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.

  11. ssg135 commented on Jul 3, 2026

    @ssg135
    ssg135
    on Jul 3, 2026
    More actions

    Same issue when running as my agent user with sudo su (or via machinectl), or via SSH.

    Could not run opencode (the cli) nor opencode web.

    opencode caused 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.

    Thank you, your method works on Ubuntu 20.04.

  12. jerome-benoit
    added a commit that references this issue on Jul 5, 2026

    docs(sandbox): document opencode.db image-upgrade remediation

    f52a3e3
  13. Seluj78
    added a commit that references this issue on Jul 6, 2026

    docs(sandbox): document opencode.db image-upgrade remediation (#2663)

    1f496dd
  14. kde2podfreebsd commented on Jul 6, 2026

    @kde2podfreebsd
    kde2podfreebsd
    on Jul 6, 2026
    More actions

    If u have mac, try this, thats helped for me.

    1. Close opencode
    2. Find database file: for example
    ~/.local/share/opencode/opencode.db
    
    mv ~/.local/share/opencode/opencode.db ~/.local/share/opencode/opencode.db.bak
    
    1. Reopen OpenCode - on open opencode create database with right struct and all will work fine
    Reacted by Andrea Raccagni and Barış Gökmen
  15. MoshiLL commented on Jul 17, 2026

    @MoshiLL
    MoshiLL
    on Jul 17, 2026
    More actions

    If on Windows, access %USERPROFILE%\.local\sha

    it's useful, thanks

  16. shawnboutilier-tech commented on Jul 17, 2026

    @shawnboutilier-tech
    shawnboutilier-tech
    on Jul 17, 2026
    More actions

    Any solutions that do not nuke the session DB? I want to continue my sessions. Any SQLite queries I could run?

    Reacted by Simon Liska
  17. tianhuil commented on Jul 17, 2026

    @tianhuil
    tianhuil
    on Jul 17, 2026
    More actions

    I'm getting this on OSX?

  18. simonliska commented on Jul 21, 2026

    @simonliska
    simonliska
    on Jul 21, 2026
    More actions

    Any solutions that do not nuke the session DB? I want to continue my sessions. Any SQLite queries I could run?

    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:

    • Move DB
    mv ~/.local/share/opencode/opencode.db ~/.local/share/opencode/opencode.db.bak
    
    • Open/close Opencode to create new DB.
    • Connect to DB:
      sqlite3 ~/.local/share/opencode/opencode.db
    • Check the ID for the project in the old and the new DB (for me it changed):
      SELECT id, worktree, name FROM project;
    • Attach old DB:
      ATTACH DATABASE '.local/share/opencode/opencode.db.bak' AS old;
    • Import the sessions (replace project IDs):
    INSERT INTO session (
      id, project_id, workspace_id, parent_id, slug, directory, path, title, version, share_url,
      summary_additions, summary_deletions, summary_files, summary_diffs, metadata,
      cost, tokens_input, tokens_output, tokens_reasoning, tokens_cache_read, tokens_cache_write,
      revert, permission, agent, model, time_created, time_updated, time_compacting, time_archived
    )
    SELECT
      s.id,
      '<NEW_PROJECT_ID>',
      NULL, s.parent_id, s.slug, s.directory, NULL, s.title, s.version, s.share_url,
      s.summary_additions, s.summary_deletions, s.summary_files, s.summary_diffs, NULL,
      0, 0, 0, 0, 0, 0,
      s.revert, s.permission, NULL, NULL, s.time_created, s.time_updated, s.time_compacting, s.time_archived
    FROM old.session s
    WHERE s.project_id = '<OLD_PROJECT_ID>';
    
    • Import messages (replace project ID):
    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>'
    );
    
    • You should see sessions and messages restored
    • If you need other tables you need to migrate them
    Reacted by Emily McRae
  19. builderjackm commented on Aug 6, 2026

    @builderjackm
    builderjackm
    on Aug 6, 2026
    More actions

    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.

    Happy to provide the full debug zip if useful.

  20. alexnotes commented on Aug 6, 2026

    @alexnotes
    alexnotes
    on Aug 6, 2026
    More actions

    for Mac:

    1. mv ~/.local/share/opencode ~/.local/share/opencode_bak
    2. rm -rf ~/.local/share/opencode
    3. restart opencode
    Reacted by Mohammad R. Rashid
  21. Mohammad-R-Rashid commented on Aug 17, 2026

    @Mohammad-R-Rashid
    Mohammad-R-Rashid
    on Aug 17, 2026
    More actions

    @alexnotes solution worked on my mac. Issue still exists in the latest update of open code as of Aug 16, 2026.

  22. bgzo commented on Aug 22, 2026

    @bgzo
    bgzo
    on Aug 22, 2026
    More actions

    Run this DDL:

    DROP TABLE IF EXISTS workspace;
    
    CREATE TABLE `workspace` (
              `id` text PRIMARY KEY,
              `type` text NOT NULL,
              `name` text DEFAULT '' NOT NULL,
              `branch` text,
              `directory` text,
              `extra` text,
              `project_id` text NOT NULL,
              `time_used` integer NOT NULL,
              CONSTRAINT `fk_workspace_project_id_project_id_fk` FOREIGN KEY (`project_id`) REFERENCES `project`(`id`) ON
    DELETE
        CASCADE
            );
  23. thdxr commented on Oct 11, 2026

    @thdxr
    thdxr
    on Oct 11, 2026
    Member
    More actions

    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 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

    Reacted by Simon Liska
  24. thdxr
    closed this as not plannedon Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @StarpTech
    StarpTech

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.