Repository navigation
Description
Description
Summary
I encountered two related issues on macOS using OpenCode Desktop 1.17.11.
- Desktop started returning "Interrupted" for every prompt.
- After fixing that issue by resetting the Desktop profile, all previous chat history disappeared from both Desktop and Web, even though the conversations still exist in
opencode.db.
Environment
-
OpenCode Desktop: 1.17.11
-
Operating System: macOS
-
Provider: OpenCode
-
Models tested:
- Big Pickle
- DeepSeek V4 Flash Free
- GLM Free
The problem occurs with all models.
Problem 1 – PTY failure
Every prompt immediately returned:
Interrupted
Developer Console showed:
PUT http://127.0.0.1/:/pty/... → HTTP 503 (Service Unavailable)
Resetting the Desktop profile by renaming:
~/Library/Application Support/ai.opencode.desktop
resolved the PTY issue.
Problem 2 – Existing sessions disappear
After the profile reset, Desktop started working again, but all previous sessions disappeared.
opencode web also shows no previous sessions.
However, the database is still intact.
Database:
~/.local/share/opencode/opencode.db
Contents:
- session = 5 rows
- message = 176 rows
- part = 455 rows
Example SQL:
SELECT COUNT(*) FROM session;
-- 5
SELECT COUNT(*) FROM message;
-- 176
SELECT COUNT(*) FROM part;
-- 455The message.data column still contains valid JSON for both user and assistant messages.
Example:
SELECT substr(data,1,300)
FROM message
LIMIT 5;returns valid conversation data.
Database observations
The session table contains:
SELECT id,title,workspace_id,project_id,directory
FROM session;Result:
- workspace_id = NULL for every session
- project_id = global
The workspace table contains zero rows:
SELECT * FROM workspace;returns no records.
Expected behavior
Desktop/Web should display the existing sessions already stored in opencode.db.
Actual behavior
The database still contains sessions, messages, and parts, but Desktop and Web display no history.
Additional observations
This is not the first time I have experienced disappearing sessions.
Over multiple versions I have noticed that:
- Desktop often asks me to select/open a project again after restart.
- Existing sessions sometimes disappear.
- Conversations appear to be saved in the database but are not rediscovered by the UI.
This makes long-running conversations unreliable.
Questions
- Should
workspacecontain records for existing sessions? - Is
workspace_id = NULLexpected for migrated sessions? - Is there an official procedure to rebuild the workspace/session index without losing history?
- Is there a migration that can repopulate the
workspacetable from existing sessions?
I would be happy to provide additional logs or test a fix if needed.
Plugins
No Plugins enabled
OpenCode version
Version 1.17.11 (1.17.11)
Steps to reproduce
- Open OpenCode Desktop 1.17.11 on macOS.
- Open an existing project.
- Use OpenCode normally across multiple sessions and restarts.
- After some period of usage, prompts begin immediately returning "Interrupted".
- Developer Console shows HTTP 503 errors for
/pty/.... - Renaming
~/Library/Application Support/ai.opencode.desktoprestores PTY functionality. - After the reset, Desktop no longer shows previous chat history.
opencode webalso shows no previous sessions.- However,
~/.local/share/opencode/opencode.dbstill contains all sessions, messages and parts.
Screenshot and/or share link
No response
Operating System
macOS
Terminal
macOS Terminal and Opencode Desktop Terminal
Activity
github-actions commentedon Jun 29, 2026
This issue might be a duplicate of existing issues. Please check:
opencode web#30054: Historical chat sessions disappear after upgrade when usingopencode web(same disappearing history symptom)workspace_id)Codeagle04 commentedon Jun 29, 2026
Thanks for linking the related issues.
After reviewing the linked issues and performing additional
investigation on my installation, I believe my case belongs to the same
family of issues. However, I was able to gather some additional
diagnostics that may help identify the root cause.
Database state
The session database is intact.
SELECT COUNT() FROM session; -- 5
SELECT COUNT() FROM message; -- 176
SELECT COUNT(*) FROM part; -- 455
The message.data column still contains valid JSON for both user and
assistant messages, confirming that the conversation content itself has
not been lost.
Example:
SELECT substr(data,1,300)
FROM message
LIMIT 5;
returns valid user and assistant message JSON.
Session metadata
All sessions have:
project_id = 'global'
workspace_id = NULL
Example:
SELECT id, title, workspace_id, project_id, directory
FROM session;
returns five valid sessions, all with workspace_id = NULL.
Workspace table
The workspace table is completely empty.
SELECT * FROM workspace;
returns zero rows.
UI behaviour
Neither OpenCode Desktop nor opencode web can see any of these
sessions, even though they are still present in
~/.local/share/opencode/opencode.db.
PTY issue
I also encountered an apparently separate PTY issue where every prompt
immediately returned "Interrupted", and the Developer Console showed
HTTP 503 errors for /pty/....
Resetting the Desktop profile by renaming:
~/Library/Application Support/ai.opencode.desktop
resolved the PTY issue, but it did not restore visibility of the
existing sessions.
Additional observation
This is not the first time I have experienced disappearing sessions.
Over multiple versions I have noticed that:
Desktop frequently asks me to re-open or select a project after
restarting.
Existing sessions sometimes disappear.
The underlying SQLite database continues to contain the
conversations, but neither Desktop nor Web is able to rediscover
them.
Questions
Would it help if I provided any of the following?
Additional SQL query results
SQLite schema
Database (privately, if required)
Application logs
A copy of opencode.db after removing sensitive information
Results from testing a development/nightly build
I'm happy to help test fixes or run additional diagnostics if they would
assist in identifying the root cause.
github-actions commentedon Aug 29, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.