Skip to content

/exit or /quit command kills the terminal on Windows PowerShell #27749

Closed as not planned

Description

@OwenClaw

Description

When exiting the TUI (via /quit, /exit, or tab-completed /quit), the entire terminal window/tab closes instead of returning to the shell prompt. This happens both with bun run dev and the bundled opencode command on Windows 11.

Plugins

No response

OpenCode version

1.15.0

Steps to reproduce

  1. Start opencode TUI (bun run dev or opencode)
  2. Type /qui then press Tab to autocomplete to /quit or type /quit and press enter or Ctrl + C to quit
  3. Expected behavior: TUI exits, shell prompt is restored, terminal window stays open.
  4. Actual behavior: TUI exits and the entire terminal window/tab closes. The shell prompt never gets a chance to render.

Screenshot and/or share link

Image

Operating System

Windows 11

Terminal

PowerShell 7.6.1

Activity

  1. github-actions commented on May 15, 2026

    @github-actions
    Contributor

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

    Please review these issues and consider closing this one if it covers the same problem.

  2. hongenge commented on May 20, 2026

    @hongenge

    This problem does exist

  3. AK47are commented on May 20, 2026

    @AK47are

    The same issue,and it seems to have existed for a long time and no one solve it?

  4. Audrique commented on May 28, 2026

    @Audrique

    I use opencode 1.15.4 and alacritty 0.17.0 and have the same issue.

  5. hongenge commented on Jun 5, 2026

    @hongenge

    Using /exit or /q closes the terminal window, while using exit does not.

  6. hongenge commented on Jun 5, 2026

    @hongenge

    The same issue,and it seems to have existed for a long time and no one solve it?

    Using /exit or /q closes the terminal window, while using exit does not.

  7. github-actions commented on Aug 6, 2026

    @github-actions
    Contributor

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

  8. Elvin-zhujunde commented on Sep 14, 2026

    @Elvin-zhujunde

    If you are PowerShell, before starting, try setting $env:OTUI_USE_ALTERNATE_SCREEN=0 and then restart. The same applies to other terminals.

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