[FEATURE] Interactive TTY mode for bash commands — enable real-time stdin/keyboard input
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] This is a single feature request (not multiple features)
Problem Statement
Currently, when Claude Code executes bash commands (either via the tool or the ! escape), there is no interactive TTY or stdin access. The process runs non-interactively: it executes, returns the output, and that's it. The user cannot send keystrokes to the running process.
This means any interactive terminal application is impossible to run inside Claude Code:
vim,htop,nano— none of them work- Games or TUI apps built with
blessed,curses,ink— can't receive keyboard input - Any Node.js script using
process.stdin.setRawMode(true)— fails because there's no TTY
Claude Code itself confirms this when you try: "the Bash tool doesn't have a TTY or interactive input"
Proposed Solution
Add an interactive mode for bash execution in Claude Code where:
- The running process gets a real PTY (pseudo-terminal) with stdin connected to the user's keyboard
- The user can send keystrokes in real-time to the process
- The process output is rendered live in the terminal
- The user can exit back to Claude Code (e.g., with a hotkey like Ctrl+C or when the process ends)
This could be:
- A flag on the bash tool:
interactive: true - A dedicated slash command:
/shellor/interactive - An enhancement to the
!escape to actually pass through to the real terminal - A new plugin capability that allows plugins to register custom Ink components with keyboard access
Use Cases
- Running TUI tools while Claude works (
htop,lazygit,tig) - Quick edits with
vim/nanowithout leaving Claude Code - Terminal games/entertainment while waiting for long Claude tasks (the original motivation — a dino runner game!)
- Interactive scripts that require user input (installers, setup wizards, CLI tools with prompts)
- REPL sessions (
node,python,irb) for quick testing
Current Workaround
The only workaround is opening a separate terminal tab, which breaks the workflow of staying in a single window.
Additional Context
The plugin system currently supports slash commands, agents, hooks, MCP servers, and LSP servers — but no custom UI components. Adding either interactive TTY support OR the ability for plugins to inject custom Ink components into the Claude Code UI would solve this.
Related: this would complement the existing ! escape feature and make it actually useful for interactive commands.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗