desktop: app-version.v1 in drafts.sqlite is never refreshed — reports 1.19.4 while running 2.3.2
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 66/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- sqlite, typescript
- Domain
- backend, desktop-dev
Research direction
Search the desktop workspace for the literal key app-version.v1 (and drafts.sqlite) to find where the state row is written on first run; that write site is the thing to change. Then look at how the packaged build version is read elsewhere — the issue points to resources/opencode-cli.version and the exe ProductVersion — and use that as the source of truth on startup instead of the persisted value. Done means a fresh launch after an upgrade leaves default.dat / app-version.v1 equal to the running version; verify by querying the state table in drafts.sqlite before and after.
Written by the indexing model from the issue text.
Description
Description
Summary
default.dat / app-version.v1 in the desktop state store is written once and never updated on upgrade, so it reports a version far behind the running app. I hit this while filing another issue: I stated "Desktop 1.19.4" while actually running 2.3.2, and triage had to correct me.
Environment
- OpenCode Desktop 2.3.2 (
OpenCode.exe→ ProductVersion 2.3.2, bundledresources/opencode-cli.version= 2.3.2) - Windows 10 Pro
- Store:
%APPDATA%\ai.opencode.desktop\drafts.sqlite, tablestate
Evidence
name = default.dat
key = app-version.v1
value = {"version":"1.19.4"}
updated_at = 1792734461668 (2026-10-23 10:47:41)
Neighbouring rows in the same store are current, so this is not a stale database:
default.dat / settings.v3 updated 2026-11-24 15:56 (today)
opencode.global.dat / server updated 2026-11-24 16:32 (today)
default.dat / app-version.v1 updated 2026-10-23 10:47
Expected
Version metadata should reflect the running build, or not be persisted at all.
Actual
Frozen at 1.19.4 across at least one upgrade to 2.3.2.
Impact
- Bug reports and diagnostics that read this key carry a wrong version, which misroutes triage (mine was initially treated as a V1/V2 mismatch).
- Anything gated on "version changed since last run" (release notes, update prompts, one-time migrations) can behave incorrectly if it reads the same key.
Suggested fix
Read the version from the packaged manifest at startup (or compare it with the key and rewrite it on boot); do not rely on a value written once at first run.
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot
No response
Operating System
No response
Terminal
No response
- Dominant language
- TypeScript
- Stars
- 228k
- Forks
- 31k
- Avg merge
- 3h 22m
- Merged PRs (30d)
- 476
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from anomalyco/opencode
-
area/mcp platform/windows status/repro-simulated type/bug version/v2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anomalyco/opencode#66073 · 1 comment ·
Maintainers usually reply within 1 day
-
claude-agent with a Claude subscription doesn't set cache.ttl, so warming pings every 4 minutesOpenarea/providers platform/windows type/feature version/v2
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
anomalyco/opencode#66001 · 1 comment ·
Maintainers usually reply within 1 day
-
area/mcp platform/windows type/feature version/v2
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
anomalyco/opencode#65997 · 1 comment ·
Maintainers usually reply within 1 day
-
@opencode/ui: v2-text-text-faint and light v2-state-fg-warning fall below WCAG AA 4.5:1 contrastPossibly taken @KhadeerBasha1232 claimed this today. Openstatus/repro-plausible
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
anomalyco/opencode#65923 · 2 comments ·
Maintainers usually reply within 1 day
-
area/core platform/windows type/bug version/v2
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
anomalyco/opencode#65880 · 1 comment ·
Maintainers usually reply within 1 day
All issues in anomalyco/opencode
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
lidofinance/validator-ejector#233 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day
-
ai-driven-qa bug claude Major
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
linagora/twake-mail-admin#742 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OpenSlides/openslides-client#6728 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 66/100