Terminal starts typing random characters automatically during opencode OAuth setup
Description
While setting up opencode and completing the OAuth flow, the terminal begins outputting random characters automatically without any user input. This happens immediately after the OAuth URL is displayed and the process appears to lose control of stdin.
The behavior makes the CLI unusable and forces the user to terminate the process manually.
Expected Behavior The CLI should wait for user input or proceed normally after OAuth without injecting any characters into the terminal.
Actual Behavior The terminal starts typing long sequences of random characters automatically, including numbers, semicolons, and escape-like sequences. No keyboard input is being made by the user.
Environment
OS: Windows 10
Terminal: Git Bash (MINGW64)
Shell: bash
Node.js: v22.18.0
opencode version: latest at time of testing
Additional Notes
The issue looks related to stdin handling after OAuth redirect.
Possibly caused by improper terminal mode reset or accidental stream piping.
Happens consistently after OAuth URL generation.
Screenshot attached showing the random character output.
Impact Blocks initial setup and prevents further use of the CLI.
Plugins
CLI
OpenCode version
1.1.23
Steps to reproduce
Run opencode in a terminal (Git Bash MINGW64 on Windows).
Run opencode auth login.
Proceed with the OAuth setup.
After the OAuth URL is printed, observe the terminal.
Screenshot and/or share link
Operating System
Windows 11
Terminal
Git