Skip to content

Terminal starts typing random characters automatically during opencode OAuth setup #8883

Closed

Description

@isurudinusha

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

Image

Operating System

Windows 11

Terminal

Git

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Jan 16, 2026
  2. github-actions commented on Jan 16, 2026

    @github-actions
    Contributor

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

    All these issues appear to be related to improper terminal mode reset or stdin handling across different platforms (Windows, Linux) and terminal emulators (wezterm, Git Bash). Your issue specifically mentions the problem occurs during OAuth setup before exit, while the other issues occur after exit, but they may share a common root cause in terminal state management.

    Feel free to ignore if your case involves specific OAuth-related behavior not covered by these issues.

  3. github-actions commented on Mar 26, 2026

    @github-actions
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentuiwindows

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions