Data loss due to session closure without confirmation (OpenCode Desktop for macOS) #7723

Open
opened 2026-02-16 18:08:03 -05:00 by yindo · 3 comments
Owner

Originally created by @DancecardJK on GitHub (Jan 27, 2026).

Originally assigned to: @adamdotdevin on GitHub.

Description

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:

  1. Avoid overloading system-wide key combinations
  2. Avoid any key combinations that can cause irreversible data loss (of a session, or of anything else)
  3. Ensure that if there is a function that has the potential to cause loss, that it must have a confirmation step
  4. 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

  1. Open a session (in OpenCode Desktop on macOS)
  2. Type command-shift-delete while you're editing your prompt

Screenshot and/or share link

No response

Operating System

macOS 26

Terminal

Terminal

Originally created by @DancecardJK on GitHub (Jan 27, 2026). Originally assigned to: @adamdotdevin on GitHub. ### Description 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: 1. Avoid overloading system-wide key combinations 2. Avoid any key combinations that can cause irreversible data loss (of a session, or of anything else) 3. Ensure that if there is a function that has the potential to cause loss, that it must have a confirmation step 4. 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 1. Open a session (in OpenCode Desktop on macOS) 2. Type command-shift-delete while you're editing your prompt ### Screenshot and/or share link _No response_ ### Operating System macOS 26 ### Terminal Terminal
yindo added the bugweb labels 2026-02-16 18:08:03 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 27, 2026):

This issue mentions keybind-related functionality and accidental session closure. Please also check our pinned keybinds documentation: #4997

@github-actions[bot] commented on GitHub (Jan 27, 2026): This issue mentions keybind-related functionality and accidental session closure. Please also check our pinned keybinds documentation: #4997
Author
Owner

@github-actions[bot] commented on GitHub (Jan 27, 2026):

This issue might be related to existing feature requests. Please check:

  • #7886: Request to add two-step confirmation for archive session (similar concern about accidental data loss)

Feel free to ignore if this doesn't address your specific case.

@github-actions[bot] commented on GitHub (Jan 27, 2026): This issue might be related to existing feature requests. Please check: - #7886: Request to add two-step confirmation for archive session (similar concern about accidental data loss) Feel free to ignore if this doesn't address your specific case.
Author
Owner

@starlord20 commented on GitHub (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.

@starlord20 commented on GitHub (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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7723