anomalyco / anomalyco/opencode
Windows 11 PowerShell loses scrollback after the first prompt when using OpenCode CLI
@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
- Open PowerShell on Windows 11.
- Start OpenCode CLI.
- Send any prompt.
- Wait for the response.
- Try to scroll upward using the mouse wheel or terminal scrollbar.
- The terminal can no longer scroll back normally.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.