Skip to content

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

Closed

Description

@DancecardJK

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

Activity

  1. github-actions commented on Jan 27, 2026

    @github-actions
    Contributor

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

  2. github-actions commented on Jan 27, 2026

    @github-actions
    Contributor

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

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

  3. starlord20 commented on Jan 27, 2026

    @starlord20

    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.

  4. github-actions commented on Mar 30, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

  5. PVLPM commented on Apr 18, 2026

    @PVLPM

    Still not fixed.

  6. jeinselen commented on Jul 10, 2026

    @jeinselen

    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. 😭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwebRelates to opencode on web / desktop

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions