Skip to content

[Performance] Significant input lag and UI slowness when running in WSL within a Windows VM #18229

Closed as not planned

Description

@albertoalmario

Description

I am experiencing severe performance issues and input lag when running OpenCode inside WSL (Windows Subsystem for Linux), which is itself running inside a Windows Virtual Machine.

The most noticeable symptom is input lag in the chat box: when I type, words take several seconds to appear on the screen. This behavior occurs even when the agent is idle, but it degrades significantly (becomes almost unusable) while the agent is performing tasks or running processes in the background.

Environment
Virtualization: Windows VM
Subsystem: WSL (running inside the Windows VM)
Application: OpenCode

Expected Behavior
The User Interface, especially the text input field, should remain responsive and provide real-time visual feedback, regardless of the background agent activity.

Actual Behavior
There is a significant delay in text rendering. The UI becomes sluggish, and the lag scales poorly when the system is under load from the agent's background tasks.

Plugins

N/A

OpenCode version

1.2.27

Steps to reproduce

Launch OpenCode within a WSL environment hosted inside a Windows VM.
Start typing in the chat box.
Observe the delay between keystrokes and text appearing.
Trigger any agent task/action and observe the increased latency in the User Interface.

Screenshot and/or share link

No response

Operating System

WSL on a Windows 11 VM

Terminal

Windows Terminal

Activity

  1. 4k1k0 commented on Mar 20, 2026

    @4k1k0

    For me too, but I'm running windows 11 on bare metal. My configuration:

    k v
    plugins n/a
    version 1.2.20
    windows version windows 11 25H2
    ubuntu version 24.04 LTS
    terminal windows terminal 1.23.20211.0
  2. RedHeartSecretMan commented on Mar 23, 2026

    @RedHeartSecretMan

    I am experiencing severe operational latency in the TUI, including significant keyboard input lag and stuttering during mouse scrolling, system info

    • OS: Ubuntu 24.04.4 LTS
    • Kernel: 6.6.87.2-microsoft-standard-WSL2
    • Arch: x86_64
    • Opencode: 1.3.0
    • Plugins: oh-my-openagent (oh-my-opencode)
    Image
  3. RedHeartSecretMan commented on Mar 23, 2026

    @RedHeartSecretMan

    Confirming that the solution provided by @pschiel in this comment successfully resolved my issue.

  4. removed
    bugSomething isn't working
    perfIndicates a performance issue or need for optimization
    on May 3, 2026
  5. dwidge commented on May 29, 2026

    @dwidge

    I see this issue on debian (bare metal, not WSL) when context reaches 30K. CPU spikes when i scroll or type in opencode, and is not snappy like scrolling in vscode repos/source code view.

  6. github-actions commented on Jul 29, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 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

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions