GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — BUG(tui): Ctrl+Z (terminal_suspend) broken on Windows -- SIGTSTP is not a valid signal · Issue #19349 · anomalyco/opencode

BUG(tui): Ctrl+Z (terminal_suspend) broken on Windows -- SIGTSTP is not a valid signal #19349

New issue
Copy link
New issue
Copy link
Closed
#21138
Closed
BUG(tui): Ctrl+Z (terminal_suspend) broken on Windows -- SIGTSTP is not a valid signal#19349
#21138
Copy link
Assignees
rekram1-node
Labels
windows

Description

@mynameistito
mynameistito
opened on Mar 26, 2026
Issue body actions

Description

Ctrl+Z is mapped to terminal_suspend by default. The handler at app.tsx:647-655 calls process.kill(0, "SIGTSTP"), which is a POSIX-only signal. On Windows this throws or silently fails, and renderer.suspend() runs but the process never actually suspends. The terminal gets left in a broken state with no way back.

There's also a misleading tip at tips.tsx:151 that tells Windows users to "Press Ctrl+Z to suspend the terminal and return to your shell", which doesn't work.

I tested on both the latest Windows Terminal and Windows Terminal Preview on Windows 11, OpenCode v1.3.3.

There's an existing PR (#16120) that adds an early return on win32, making Ctrl+Z a no-op. I think it'd be better to call exit() instead, since that's the closest thing to "get me back to my shell" on a platform without job control. The exit() function is already in scope and handles renderer cleanup, buffer flushing, and the Ctrl+C guard teardown.

Two files, roughly 8-10 lines:

  1. packages/opencode/src/cli/cmd/tui/app.tsx (~line 647): add a process.platform === "win32" check, call exit() on Windows instead of renderer.suspend() + SIGTSTP
  2. packages/opencode/src/cli/cmd/tui/component/tips.tsx (line 151): conditionally hide the Ctrl+Z tip on Windows

Related: #16050, #6517, PR #16120

Plugins

Not relevant

OpenCode version

1.3.3

Steps to reproduce

  1. Launch opencode on Windows 11
  2. Press Ctrl+Z
  3. The terminal breaks or the app throws

Screenshot and/or share link

2026-03-27.13-06-40.mp4

Operating System

Windows 11

Terminal

Windows Terminal, Windows Terminal Preview

Activity

  1. github-actions
    assigned
    rekram1-node
    on Mar 26, 2026
  2. github-actions
    added
    windows
    on Mar 26, 2026
  3. github-actions commented on Mar 26, 2026

    @github-actions
    github-actionsBot
    on Mar 26, 2026 – with GitHub Actions
    Contributor
    More actions

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

    • no way to recover from an accidental ctrl+z in windows #16050: Same issue — Ctrl+Z broken/unrecoverable on Windows
    • Rider TUI - Ctrl+Z uses EOF - unable to return to session #6517: Same issue — Ctrl+Z leaves terminal in broken state on Windows

    For keybind-related issues, please also check our pinned keybinds documentation: #4997

  4. mynameistito
    changed the title [-]Ctrl+Z (terminal_suspend) broken on Windows -- SIGTSTP is not a valid signal[/-] [+][FIX(tui-win)]Ctrl+Z (terminal_suspend) broken on Windows -- SIGTSTP is not a valid signal[/+] on Mar 27, 2026
  5. mynameistito
    changed the title [-][FIX(tui-win)]Ctrl+Z (terminal_suspend) broken on Windows -- SIGTSTP is not a valid signal[/-] [+]BUG(tui-win): Ctrl+Z (terminal_suspend) broken on Windows -- SIGTSTP is not a valid signal[/+] on Mar 27, 2026
  6. mynameistito
    changed the title [-]BUG(tui-win): Ctrl+Z (terminal_suspend) broken on Windows -- SIGTSTP is not a valid signal[/-] [+]BUG(tui): Ctrl+Z (terminal_suspend) broken on Windows -- SIGTSTP is not a valid signal[/+] on Mar 27, 2026
  7. whws007 commented on Mar 28, 2026

    @whws007
    whws007
    on Mar 28, 2026
    More actions

    This bug makes opencode unusable on Windows when accidentally pressing Ctrl+Z. It's been open for weeks. Can we get a fix soon?
    This should be a simple fix - just ignore the EOF character (Ctrl+Z / ASCII 26) in the TUI input layer instead of treating it as end of input.

  8. Hona
    closed this as completedin #21138on Apr 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @rekram1-node
    rekram1-node

Labels

windows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.