Skip to content

'!' command hangs when running interactive TUI programs (vim, yazi, htop) #29972

Closed as duplicate

Description

@Tofu-Xx

Problem

When using the ! command to run interactive TUI programs (e.g., vim, yazi, htop, nano), the session hangs indefinitely without any output or error message. The user must manually terminate the process.

This happens because ! executes commands in a non-interactive bash subprocess without a TTY, which TUI programs require to render their interface.

Steps to Reproduce

  1. Type !vim or !yazi in opencode
  2. The session freezes with no output
  3. User must manually abort (Ctrl+C / close terminal)

Expected Behavior

opencode should detect TUI/interactive programs and either:

  1. Show a warning message (e.g., "Interactive programs are not supported in ! mode. Please run this directly in your terminal.")
  2. Or forward the TTY to the subprocess so interactive programs can work.

Suggestion

Maintain a list of known TUI programs (vim, nvim, yazi, nano, htop, less, more, top, btop, etc.) and show a helpful message instead of silently hanging.

Activity

  1. github-actions commented on May 30, 2026

    @github-actions
    Contributor

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

  2. Tofu-Xx commented on May 30, 2026

    @Tofu-Xx
    Author

    Closing as duplicate of #23449. The root cause is that the agent spawns new shell processes without PTY support, preventing interactive TUI programs from working. Please follow #23449 for updates.

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