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
{{ message }}
Repository navigation
Data loss due to session closure without confirmation (OpenCode Desktop for macOS) #10815
On macOS, there is a very common system-wide key combination (Command-shift-delete) that is used for text editing. Its purpose is to delete a highlighted sentence or paragraph.
In OpenCode this key combination has been overridden and doesn't delete highlighted text, it force-closes your current session, without warning or confirmation.
The session is irrecoverable. You may have lost potentially hours of work in that interactive session.
Suggestions for fixing this:
Avoid overloading system-wide key combinations
Avoid any key combinations that can cause irreversible data loss (of a session, or of anything else)
Ensure that if there is a function that has the potential to cause loss, that it must have a confirmation step
Make closing a session a reversible/recoverable operation. (Archive or soft delete which is easily recoverable).
Plugins
None required to replicate this bug
OpenCode version
Version 1.1.36
Steps to reproduce
Open a session (in OpenCode Desktop on macOS)
Type command-shift-delete while you're editing your prompt
Would like upvote this as I too lost my session history completely during the recent storm related power outage. Luckily I did ask opencode to export my last chat conv couple of days prior into a md file and atleast I am able to put the pieces back together now. However, this session management feature is very crucial or something should be made default to store session history in async mode atleast to avoid hours worth of work disappearing causing havoc.
For other context, I am using similar system as the user reported this issue.
Reacted by MagneticLine, Microck, Ryan Beall, PVL and John Einselen
Activity
github-actions commentedon Jan 27, 2026
This issue mentions keybind-related functionality and accidental session closure. Please also check our pinned keybinds documentation: #4997
github-actions commentedon Jan 27, 2026
This issue might be related to existing feature requests. Please check:
Feel free to ignore if this doesn't address your specific case.
starlord20 commentedon Jan 27, 2026
Would like upvote this as I too lost my session history completely during the recent storm related power outage. Luckily I did ask opencode to export my last chat conv couple of days prior into a md file and atleast I am able to put the pieces back together now. However, this session management feature is very crucial or something should be made default to store session history in async mode atleast to avoid hours worth of work disappearing causing havoc.
For other context, I am using similar system as the user reported this issue.
github-actions commentedon Mar 30, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.
PVLPM commentedon Apr 18, 2026
Still not fixed.
jeinselen commentedon Jul 10, 2026
I just ran into this same issue. Typed out a lengthy response, and as I went to delete a word, the ENTIRE session just disappeared without warning. 😭