Skip to content

[Windows Desktop] New Terminal always fails with PTY spawn failed (across multiple versions) #24463

Description

@liu5269

Description

Summary

On Windows, OpenCode Desktop can launch normally, but creating a new terminal always fails.
Logs repeatedly show: service=server error=PTY spawn failed.

Environment

  • OS: Windows 11 (10.0.26200)
  • Desktop app channel: winget package SST.OpenCodeDesktop
  • Versions tested:
    • 1.14.25
    • 1.14.20
    • 1.14.19
  • Project paths tested:
    • E:\opencode
    • H:\opencode

Expected behavior

Clicking New Terminal should open a functional terminal tab.

Actual behavior

No terminal opens. Desktop log repeatedly outputs:
service=server error=PTY spawn failed

Reproduction steps

  1. Start OpenCode Desktop on Windows.
  2. Open a workspace/project.
  3. Click New Terminal.
  4. Observe failure (no terminal tab created).
  5. Check logs under:
    C:\Users\Administrator\AppData\Local\ai.opencode.desktop\logs\

Log evidence

Latest reproduced log:

  • C:\Users\Administrator\AppData\Local\ai.opencode.desktop\logs\opencode-desktop_2026-04-26_17-56-11.log
    Key lines (example):
  • Spawning sidecar on http://127.0.0.1:64872
  • No CLI installation found, skipping sync
  • ERROR ... service=server error=PTY spawn failed failed (repeated many times)
    Issue reproduces similarly in:
  • ..._17-19-14.log
  • ..._17-16-36.log
  • ..._17-14-42.log
  • ..._17-12-58.log
  • ..._17-09-24.log

Troubleshooting already performed

I have already done all of the following, with no effect:

  1. Config cleanup
    • Removed unsupported/invalid config keys and bad plugin entries.
  2. Desktop state reset
    • Reset opencode.workspace*.dat
    • Reset opencode.settings.dat and opencode.global.dat (with backup)
  3. Environment variable cleanup
    • Removed custom SHELL/terminal overrides.
  4. Version rollback tests
    • 1.14.25 -> 1.14.20 -> 1.14.19
    • Same PTY spawn failed behavior in all versions.
  5. System integrity repair
    • sfc /scannow (found and repaired corrupted files)
    • DISM /Online /Cleanup-Image /RestoreHealth (successful)
    • Full reboot afterwards.
  6. Re-test after reboot
    • Still fails identically.

Why this seems like a product bug

  • Reproducible across multiple versions.
  • Not tied to a single project config.
  • Persists after desktop state reset and OS integrity repair.
  • Failure happens specifically in Desktop terminal PTY creation path.

Related issues possibly relevant

Plugins

oh my opencode

OpenCode version

1.14.25

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

windows11

Terminal

Windows Terminal

Activity

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 / desktopwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions