anomalyco / anomalyco/opencode
Windows TUI and agent-loop transitions are noticeably slower than WSL2/Linux
@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
OpenCode feels consistently less responsive on native Windows 11 than under WSL2/Ubuntu on the same machine.
This is noticeable not only during LLM inference, but in OpenCode itself:
- keyboard input and shortcuts feel less immediate
- copy/paste and general TUI interaction feel less responsive
- transitions between agent/tool steps have higher latency
- after a tool finishes, OpenCode takes longer to transition through the next loop/process/stream cycle
There are no freezes or crashes. The Windows version works, but the difference in responsiveness compared to WSL2 is clearly noticeable during normal use.
I enabled logging on both environments and found that the difference is also visible in timestamps.
Environment
Same physical machine for both tests.
Windows
- Windows 11
- PowerShell
- Native Windows OpenCode CLI
Linux
- WSL2
- Ubuntu
- Project stored inside the Linux filesystem (
~/projects/...)
Common
- Same OpenCode version
- Same machine/hardware
- Same LLM provider
- Same LLM model
- OpenCode started with logging enabled
Example: agent-loop transition
One thing I noticed in the logs is that the internal transition from loop to the next process / stream is consistently faster under WSL2/Linux.
Example from native Windows:
19:17:49.479 loop
19:17:50.535 process
19:17:50.664 stream
Approximately:
loop -> stream: ~1.19 s
Example from WSL2/Ubuntu:
19:03:20.556 loop
19:03:21.070 process
19:03:21.076 stream
Approximately:
loop -> stream: ~0.52 s
Other Ubuntu transitions are even shorter.
Across the samples I inspected, the Windows transitions appeared to be consistently slower than the WSL2/Linux transitions.
This is individually a small delay, but agentic coding sessions can execute many dozens or hundreds of loop/tool transitions, so the overhead accumulates.
Tool completion behavior
Under WSL2, transitions after tool completion can be very fast.
Example:
19:22:22.572 tracking after pytest/tool execution
19:22:22.658 loop
19:22:22.808 process
19:22:22.811 stream
So OpenCode proceeds from the completed tool result to the next LLM stream in only a few hundred milliseconds.
Native Windows generally feels slower around these transitions.
TUI responsiveness
The difference is also noticeable independently of agent execution.
Under WSL2/Ubuntu, interactions such as:
- keyboard shortcuts
- navigating the TUI
- copy/paste
- general keyboard interaction
feel more immediate than native Windows.
Native Windows does not hang, but there appears to be additional latency.
Important: this is not an LLM latency report
The model/provider itself sometimes has very long inference delays.
I observed those delays under both Windows and Ubuntu, so I do not believe those long inference pauses are caused by OpenCode's Windows implementation.
This issue is specifically about the additional OpenCode/TUI/agent-loop overhead visible on native Windows compared with WSL2/Linux.
In other words:
Tool/LLM latency:
Can occur on both platforms.
OpenCode interaction / orchestration latency:
Appears noticeably higher on native Windows.
Expected behavior
Native Windows will naturally have different process, terminal and filesystem characteristics than Linux, so identical performance may not be possible.
However, it would be useful to investigate whether some of the additional latency comes from OpenCode's Windows-specific:
- process handling
- TUI/event handling
- filesystem operations
- snapshot/tracking operations
- tool-result handling
- agent-loop orchestration
and whether this overhead can be reduced.
Additional notes
I initially suspected that long pauses after commands were caused by Windows process handling.
The logs do not support that conclusion: in several cases OpenCode correctly detected tool completion and initiated the next model request quickly.
The narrower issue I am reporting here is the smaller but consistent responsiveness/orchestration difference between native Windows and WSL2/Linux.
Plugins
No response
OpenCode version
1.18.21
Steps to reproduce
- Run OpenCode natively on Windows 11.
- Start with logging enabled.
- Run an agentic coding task involving multiple file reads/edits and shell commands.
- Observe timestamps around:
- tool completion
trackingloopprocessstream
- Run OpenCode on WSL2/Ubuntu on the same machine.
- Compare the transitions.
Screenshot and/or share link
No response
Operating System
Windows 11 and Linux Ubuntu
Terminal
Windows PowerShell
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.