Skip to content

Desktop: cannot open Sublime Text on Windows #41694

Closed as not planned
Closed as not planned

Description

@TylunasLi

Description

Problem

On Windows Desktop, the "Open With" menu shows "Sublime Text", but selecting it does not open the directory in Sublime Text.

Sublime Text CLI is available in PATH:

where.exe subl

returns the executable path successfully.

However, OpenCode resolves the application using:

resolveWindowsAppPath("Sublime Text")

which runs:

where.exe "Sublime Text"

This fails because the Windows CLI command is sublime_text.exe / subl.exe, not Sublime Text.

Plugins

Unknown / not relevant

OpenCode version

1.17.20

Steps to reproduce

  1. Install Sublime Text on Windows.
  2. Add Sublime Text CLI (subl.exe) to PATH.
  3. Open OpenCode desktop
  4. Open any session/workspace
  5. Use the session header and choose "Open With" -> "Sublime Text".

Screenshot and/or share link

Operating System

Windows 10

Terminal

Powershell

Activity

  1. TylunasLi commented on Aug 11, 2026

    @TylunasLi
    Author

    similar issue as #20195 and #36980

  2. github-actions commented on Aug 11, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  3. TylunasLi commented on Aug 11, 2026

    @TylunasLi
    Author

    A minimum workaround would look like this:

    diff --git a/packages/app/src/components/session/open-in-app.tsx b/packages/app/src/components/session/open-in-app.tsx
    index xxxxxxx..xxxxxxx 100644
    --- a/packages/app/src/components/session/open-in-app.tsx
    +++ b/packages/app/src/components/session/open-in-app.tsx
    @@ -75,7 +75,7 @@ export const WINDOWS_OPEN_APPS = [
         id: "sublime-text",
         label: "session.header.open.app.sublimeText",
         icon: "sublime-text",
    -    openWith: "Sublime Text",
    +    openWith: "subl",
      },
    ] as const
    
    @@ -87,7 +87,7 @@ export const LINUX_OPEN_APPS = [
         id: "sublime-text",
         label: "session.header.open.app.sublimeText",
         icon: "sublime-text",
    -    openWith: "Sublime Text",
    +    openWith: "subl",
       },
     ] as const
    
  4. thdxr commented on Oct 11, 2026

    @thdxr
    Member

    Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.

    — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions