You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bash tool hangs when a command asks for input (npm/npx "Ok to proceed") on Windows #42773
Whenever the agent runs a command that waits for stdin (e.g. npm exec prints "Ok to proceed? (y)" and asks for confirmation), the prompt shows up in the session but typing does nothing, and the command hangs until the timeout.
The tool spawns children with stdin ignored or as a pipe that's never fed or closed (tool/shell.ts, bash.ts, and the default in cross-spawn-spawner.ts:118-120). Some callers (e.g. git.ts) even omit stdin entirely, leaving an open pipe, so a child that reads stdin blocks forever.
On Windows the TUI takes the console input exclusively (tui/terminal-win32.ts), so keystrokes can never reach a tool child.
npm's confirm prompt (read package) prints the question and then only ever finishes on a newline; with NUL/EOF or a dangling pipe it never gets one, so it sits forever.
Suggestion: default child stdin to closed instead of an open pipe, and inject non-interactive env vars (CI=1, npm_config_yes=true, GIT_TERMINAL_PROMPT=0) into tool commands so they don't prompt.
Plugins
No response
OpenCode version
1.18.18
Steps to reproduce
spawn npm exec [email protected] hello with stdin as an open pipe -> hangs. Same with CI=1, npm_config_yes=true, or closed stdin -> finishes.
Screenshot and/or share link
Operating System
Windows 10
Terminal
Windows Terminal, Windows Powershell, VS Code Terminal
Activity
utk-code commentedon Aug 15, 2026
well, my suggestion isn't working for me rn
thdxr commentedon Oct 11, 2026
Thanks for the report! OpenCode 2.0 is now out and development is focused on V2, so we're closing issues filed against OpenCode 1. Please upgrade (
opencode upgrade --major, details: https://anoma.ly/notes/opencode-2-0), and if this is still relevant on 2.0, reopen this issue or open a new one with your 2.0 version.— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊