anomalyco / anomalyco/opencode

Windows 11 PowerShell loses scrollback after the first prompt when using OpenCode CLI

Open
#44,391 1 comment 0 reactions 1 assignee View on GitHub

@Hona is already working on this.

Since Aug 23, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

Windows 11 PowerShell loses scrollback after the first prompt

Description

OpenCode CLI has a terminal scrollback issue on Windows 11 when running inside PowerShell.

After starting OpenCode and sending the first prompt, the PowerShell terminal loses its normal scrollback behavior.

The scrollbar either disappears or becomes stuck at the bottom, making it impossible to scroll back and review previous OpenCode output.

This happens immediately after the first interaction with OpenCode.

I use several other AI CLI tools in exactly the same Windows/PowerShell environment:

  • OpenAI Codex CLI
  • Claude Code
  • Gemini CLI
  • GitHub Copilot CLI

None of these tools have this problem.

PowerShell scrollback continues working normally with all of them.

OpenCode is the only CLI where the terminal scrollback breaks after the first prompt.

This appears to be related to how OpenCode handles the terminal/TUI on Windows rather than a PowerShell configuration issue.

Plugins

None.

The issue also occurs without plugins.

OpenCode version

Latest version.

Environment

  • OS: Windows 11
  • Shell: PowerShell
  • OpenCode: Latest version

Steps to reproduce

  1. Open PowerShell on Windows 11.
  2. Start OpenCode CLI.
  3. Send any prompt.
  4. Wait for the response.
  5. Try to scroll upward using the mouse wheel or terminal scrollbar.
  6. The terminal can no longer scroll back normally.
  7. The viewport remains stuck at the bottom.

Expected behavior

OpenCode should preserve the normal PowerShell terminal scrollback buffer.

Users should be able to scroll upward and review previous prompts and responses.

This is how Codex CLI, Claude Code, Gemini CLI, and GitHub Copilot CLI behave in the same environment.

Actual behavior

After the first OpenCode prompt, PowerShell loses the ability to scroll through previous terminal output.

The scrollbar disappears or becomes effectively locked at the bottom.

Additional context

The problem is consistently reproducible on Windows 11 using PowerShell.

It does not happen with other major AI CLI tools tested in exactly the same environment.

This may be related to OpenCode's TUI/terminal handling switching the terminal into a mode that replaces or disables the native Windows/PowerShell scrollback buffer.

This significantly impacts the usability of OpenCode on Windows because previous responses become inaccessible during longer sessions.

Plugins

No response

OpenCode version

1.18.21

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.