Can't run OpenCode under WSL2 Ubuntu, returns empty screen #7159

Open
opened 2026-02-16 18:06:20 -05:00 by yindo · 15 comments
Owner

Originally created by @it-sha on GitHub (Jan 22, 2026).

Originally assigned to: @kommander on GitHub.

Description

After installing opencode under WSL, command opencode returns empty screen
Image

Expected Behavior

The OpenCode UI starts and renders normally.

Actual Behavior

Blank screen when launching.

Environment

OS: Ubuntu 20.04.6 LTS (Focal Fossa)
Kernel: Linux 6.6.87.2-microsoft-standard-WSL2
Arch: x86_64
Shell: bash (/bin/bash)
Locale: C.UTF-8
Node: v22.19.0
pnpm: 10.24.0
npm: 10.9.3
git: 2.25.1
WSL: WSL_DISTRO_NAME=Ubuntu

Plugins

No plugings

OpenCode version

1.1.31

Steps to reproduce

  1. Run WSL shell
  2. Install open code (via npm or curl)
  3. Open WSL2 Ubuntu terminal.
  4. Run opencode.

Screenshot and/or share link

Image

Operating System

OS: Ubuntu 20.04.6 LTS (Focal Fossa)

Terminal

Shell: bash (/bin/bash)

Originally created by @it-sha on GitHub (Jan 22, 2026). Originally assigned to: @kommander on GitHub. ### Description After installing opencode under WSL, command `opencode` returns empty screen <img width="1312" height="660" alt="Image" src="https://github.com/user-attachments/assets/8e71bf9f-a5d8-4e8b-9717-16fc0c13f7ab" /> ### Expected Behavior The OpenCode UI starts and renders normally. ### Actual Behavior Blank screen when launching. ### Environment OS: Ubuntu 20.04.6 LTS (Focal Fossa) Kernel: Linux 6.6.87.2-microsoft-standard-WSL2 Arch: x86_64 Shell: bash (/bin/bash) Locale: C.UTF-8 Node: v22.19.0 pnpm: 10.24.0 npm: 10.9.3 git: 2.25.1 WSL: WSL_DISTRO_NAME=Ubuntu ### Plugins No plugings ### OpenCode version 1.1.31 ### Steps to reproduce 1. Run WSL shell 2. Install open code (via npm or curl) 3. Open WSL2 Ubuntu terminal. 4. Run opencode. ### Screenshot and/or share link <img width="1312" height="660" alt="Image" src="https://github.com/user-attachments/assets/8e71bf9f-a5d8-4e8b-9717-16fc0c13f7ab" /> ### Operating System OS: Ubuntu 20.04.6 LTS (Focal Fossa) ### Terminal Shell: bash (/bin/bash)
yindo added the windowsopentuibug labels 2026-02-16 18:06:20 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 22, 2026):

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

  • #7200: Blank in WSL2 Ubuntu Terminal/Desktop - Similar WSL2 Ubuntu blank screen issue
  • #5613: Empty screen on launch - General empty screen on launch issue
  • #4755: opencode Terminal UI shows empty screen - Ubuntu terminal empty screen issue
  • #5413: Opencode open and just empty screen - General empty screen issue on various terminals

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 22, 2026): This issue might be a duplicate of existing issues. Please check: - #7200: Blank in WSL2 Ubuntu Terminal/Desktop - Similar WSL2 Ubuntu blank screen issue - #5613: Empty screen on launch - General empty screen on launch issue - #4755: opencode Terminal UI shows empty screen - Ubuntu terminal empty screen issue - #5413: Opencode open and just empty screen - General empty screen issue on various terminals Feel free to ignore if none of these address your specific case.
Author
Owner

@it-sha commented on GitHub (Jan 22, 2026):

Most recommended solution is to change DNS settings

sudo rm /etc/resolv.conf
sudo bash -c 'echo "nameserver 8.8.8.8" > /etc/resolv.conf'

Checked. Problem still remains

@it-sha commented on GitHub (Jan 22, 2026): Most recommended solution is to change DNS settings ``` sudo rm /etc/resolv.conf sudo bash -c 'echo "nameserver 8.8.8.8" > /etc/resolv.conf' ``` Checked. Problem still remains
Author
Owner

@it-sha commented on GitHub (Jan 22, 2026):

Logs

opencode run hello --print-logs

Details

$ opencode run hello --print-logs
INFO 2026-01-22T14:20:48 +263ms service=default version=1.1.31 args=["run","hello","--print-logs"] opencode
INFO 2026-01-22T14:20:48 +1ms service=default directory=/home/max creating instance
INFO 2026-01-22T14:20:48 +0ms service=project directory=/home/max fromDirectory
INFO 2026-01-22T14:20:48 +6ms service=default directory=/home/max bootstrapping
INFO 2026-01-22T14:20:48 +4ms service=config path=/home/max/.config/opencode/config.json loading
INFO 2026-01-22T14:20:48 +1ms service=config path=/home/max/.config/opencode/opencode.json loading
INFO 2026-01-22T14:20:48 +0ms service=config path=/home/max/.config/opencode/opencode.jsonc loading
INFO 2026-01-22T14:20:48 +6ms service=bun cmd=["/home/max/.opencode/bin/opencode","add","@opencode-ai/plugin@1.1.31","--exact"] cwd=/home/max/.config/opencode running
INFO 2026-01-22T14:20:48 +11ms service=config path=/home/max/.opencode/opencode.jsonc loading
INFO 2026-01-22T14:20:48 +0ms service=config path=/home/max/.opencode/opencode.json loading
INFO 2026-01-22T14:20:48 +1ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd)

installed @opencode-ai/plugin@1.1.31

[2.00ms] done
stderr=Saved lockfile
done
INFO 2026-01-22T14:20:48 +0ms service=bun cmd=["/home/max/.opencode/bin/opencode","install"] cwd=/home/max/.config/opencode running
INFO 2026-01-22T14:20:48 +0ms service=bun cmd=["/home/max/.opencode/bin/opencode","add","@opencode-ai/plugin@1.1.31","--exact"] cwd=/home/max/.opencode running
INFO 2026-01-22T14:20:48 +6ms service=plugin name=CodexAuthPlugin loading internal plugin
INFO 2026-01-22T14:20:48 +0ms service=plugin name=CopilotAuthPlugin loading internal plugin
INFO 2026-01-22T14:20:48 +0ms service=plugin path=opencode-anthropic-auth@0.0.9 loading plugin
INFO 2026-01-22T14:20:48 +2ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd)

Checked 3 installs across 4 packages (no changes) [1.00ms]
stderr= done
INFO 2026-01-22T14:20:48 +1ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd)

installed @opencode-ai/plugin@1.1.31

[1.00ms] done
stderr=Saved lockfile
done
INFO 2026-01-22T14:20:48 +0ms service=bun cmd=["/home/max/.opencode/bin/opencode","install"] cwd=/home/max/.opencode running
INFO 2026-01-22T14:20:48 +15ms service=plugin path=@gitlab/opencode-gitlab-auth@1.3.2 loading plugin
INFO 2026-01-22T14:20:48 +0ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd)

Checked 3 installs across 4 packages (no changes) [1.00ms]
stderr= done
INFO 2026-01-22T14:20:48 +5ms service=bun pkg=@gitlab/opencode-gitlab-auth version=1.3.2 installing package using Bun's default registry resolution
INFO 2026-01-22T14:20:48 +0ms service=bun cmd=["/home/max/.opencode/bin/opencode","add","--force","--exact","--cwd","/home/max/.cache/opencode","@gitlab/opencode-gitlab-auth@1.3.2"] cwd=/home/max/.cache/opencode running

@it-sha commented on GitHub (Jan 22, 2026): Logs opencode run hello --print-logs <details><summary>Details</summary> <p> $ opencode run hello --print-logs INFO 2026-01-22T14:20:48 +263ms service=default version=1.1.31 args=["run","hello","--print-logs"] opencode INFO 2026-01-22T14:20:48 +1ms service=default directory=/home/max creating instance INFO 2026-01-22T14:20:48 +0ms service=project directory=/home/max fromDirectory INFO 2026-01-22T14:20:48 +6ms service=default directory=/home/max bootstrapping INFO 2026-01-22T14:20:48 +4ms service=config path=/home/max/.config/opencode/config.json loading INFO 2026-01-22T14:20:48 +1ms service=config path=/home/max/.config/opencode/opencode.json loading INFO 2026-01-22T14:20:48 +0ms service=config path=/home/max/.config/opencode/opencode.jsonc loading INFO 2026-01-22T14:20:48 +6ms service=bun cmd=["/home/max/.opencode/bin/opencode","add","@opencode-ai/plugin@1.1.31","--exact"] cwd=/home/max/.config/opencode running INFO 2026-01-22T14:20:48 +11ms service=config path=/home/max/.opencode/opencode.jsonc loading INFO 2026-01-22T14:20:48 +0ms service=config path=/home/max/.opencode/opencode.json loading INFO 2026-01-22T14:20:48 +1ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd) installed @opencode-ai/plugin@1.1.31 [2.00ms] done stderr=Saved lockfile done INFO 2026-01-22T14:20:48 +0ms service=bun cmd=["/home/max/.opencode/bin/opencode","install"] cwd=/home/max/.config/opencode running INFO 2026-01-22T14:20:48 +0ms service=bun cmd=["/home/max/.opencode/bin/opencode","add","@opencode-ai/plugin@1.1.31","--exact"] cwd=/home/max/.opencode running INFO 2026-01-22T14:20:48 +6ms service=plugin name=CodexAuthPlugin loading internal plugin INFO 2026-01-22T14:20:48 +0ms service=plugin name=CopilotAuthPlugin loading internal plugin INFO 2026-01-22T14:20:48 +0ms service=plugin path=opencode-anthropic-auth@0.0.9 loading plugin INFO 2026-01-22T14:20:48 +2ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd) Checked 3 installs across 4 packages (no changes) [1.00ms] stderr= done INFO 2026-01-22T14:20:48 +1ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd) installed @opencode-ai/plugin@1.1.31 [1.00ms] done stderr=Saved lockfile done INFO 2026-01-22T14:20:48 +0ms service=bun cmd=["/home/max/.opencode/bin/opencode","install"] cwd=/home/max/.opencode running INFO 2026-01-22T14:20:48 +15ms service=plugin path=@gitlab/opencode-gitlab-auth@1.3.2 loading plugin INFO 2026-01-22T14:20:48 +0ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd) Checked 3 installs across 4 packages (no changes) [1.00ms] stderr= done INFO 2026-01-22T14:20:48 +5ms service=bun pkg=@gitlab/opencode-gitlab-auth version=1.3.2 installing package using Bun's default registry resolution INFO 2026-01-22T14:20:48 +0ms service=bun cmd=["/home/max/.opencode/bin/opencode","add","--force","--exact","--cwd","/home/max/.cache/opencode","@gitlab/opencode-gitlab-auth@1.3.2"] cwd=/home/max/.cache/opencode running </p> </details>
Author
Owner

@it-sha commented on GitHub (Jan 23, 2026):

opencode web --hostname 127.0.0.1 --port 4096

also returns empty screen

Image
@it-sha commented on GitHub (Jan 23, 2026): opencode web --hostname 127.0.0.1 --port 4096 also returns empty screen <img width="1684" height="712" alt="Image" src="https://github.com/user-attachments/assets/4e0a273a-8ee6-4a63-a27e-9d9d1b065567" />
Author
Owner

@it-sha commented on GitHub (Jan 23, 2026):

@kommander Could you take a look when you have time?
Maybe we have some FAQ for such cases?

@it-sha commented on GitHub (Jan 23, 2026): @kommander Could you take a look when you have time? Maybe we have some FAQ for such cases?
Author
Owner

@kommander commented on GitHub (Jan 24, 2026):

Seems like the agent server is not coming up properly. Do you have a proxy running?

@kommander commented on GitHub (Jan 24, 2026): Seems like the agent server is not coming up properly. Do you have a proxy running?
Author
Owner

@it-sha commented on GitHub (Jan 25, 2026):

@kommander

Seems like the agent server is not coming up properly. Do you have a proxy running?

Just WSL on Ubuntu with out-of-the-box config, proxy is not set by intention

OpenCode starts working in 15-20 min with empty screen
It seems like something should be uploaded in the background without any indication to the user

The problem is getting back if I install the Zed plugin for OpenCode
Image

To fix that I have to:

  1. uninstall zed plugin
  2. uninstall OpenCode and all app data
  3. install OpenCode again
  4. open it in terminal, wait 20 min
  5. restart opencode in terminal

If you need any additional info please let me know
a lot of developers have to use Windows, so WSL in only option for us for AI development.

@it-sha commented on GitHub (Jan 25, 2026): @kommander > Seems like the agent server is not coming up properly. Do you have a proxy running? Just WSL on Ubuntu with out-of-the-box config, proxy is not set by intention OpenCode starts working in 15-20 min with empty screen It seems like something should be uploaded in the background without any indication to the user The problem is getting back if I install the Zed plugin for OpenCode <img width="1879" height="556" alt="Image" src="https://github.com/user-attachments/assets/3bb0517f-c0a7-4eb4-8335-70e4871c1407" /> To fix that I have to: 1. uninstall zed plugin 2. uninstall OpenCode and all app data 3. install OpenCode again 4. open it in terminal, wait 20 min 5. restart opencode in terminal If you need any additional info please let me know a lot of developers have to use Windows, so WSL in only option for us for AI development.
Author
Owner

@kommander commented on GitHub (Jan 26, 2026):

I don't think it is WSL specific. We've heard about that at rare occasions, but cannot properly reproduce it. cc @rekram1-node what would help to debug this?

@kommander commented on GitHub (Jan 26, 2026): I don't think it is WSL specific. We've heard about that at rare occasions, but cannot properly reproduce it. cc @rekram1-node what would help to debug this?
Author
Owner

@li-yifei commented on GitHub (Jan 27, 2026):

Hello there, I found that ipv6 stack in wsl2 may cause such blank screen problem.
For my case, I disabled ipv6 once but dns returns AAAA records rather than A.
Then I re-enabled ipv6 in 'network=Mirrored' mode and it got fixed.
Try disabling ipv6 dns records in your env may helps.

@li-yifei commented on GitHub (Jan 27, 2026): Hello there, I found that ipv6 stack in wsl2 may cause such blank screen problem. For my case, I disabled ipv6 once but dns returns AAAA records rather than A. Then I re-enabled ipv6 in 'network=Mirrored' mode and it got fixed. Try disabling ipv6 dns records in your env may helps.
Author
Owner

@bbcwqx commented on GitHub (Jan 28, 2026):

I found this as well, disabling ipv6 has it working again

@bbcwqx commented on GitHub (Jan 28, 2026): I found this as well, disabling ipv6 has it working again
Author
Owner

@GollyJer commented on GitHub (Feb 3, 2026):

uhg... frustrating road to a fix for this one. Should have come here to search first. 🙃

For those interested.

[wsl2]
networkingMode=mirrored
dnsTunneling=true
firewall=true
autoProxy=true
kernelCommandLine=ipv6.disable=1  # <-- this fixes it.
@GollyJer commented on GitHub (Feb 3, 2026): uhg... frustrating road to a fix for this one. Should have come here to search first. 🙃 For those interested. ```bash [wsl2] networkingMode=mirrored dnsTunneling=true firewall=true autoProxy=true kernelCommandLine=ipv6.disable=1 # <-- this fixes it. ```
Author
Owner

@kommander commented on GitHub (Feb 3, 2026):

Interesting. We should probably take that into the documentation for windows. wdyt @rekram1-node

@kommander commented on GitHub (Feb 3, 2026): Interesting. We should probably take that into the documentation for windows. wdyt @rekram1-node
Author
Owner

@tontide1 commented on GitHub (Feb 5, 2026):

hi ! you can try this

[boot]
systemd=false

https://github.com/anomalyco/opencode/issues/5361

i got this problem and i fixed it as above

@tontide1 commented on GitHub (Feb 5, 2026): hi ! you can try this ``` [boot] systemd=false ``` https://github.com/anomalyco/opencode/issues/5361 i got this problem and i fixed it as above
Author
Owner

@fancydirty commented on GitHub (Feb 7, 2026):

comment

@fancydirty commented on GitHub (Feb 7, 2026): comment
Author
Owner

@csullivannet commented on GitHub (Feb 16, 2026):

I had a poorly configured opencode.json in my project that was causing this. I had removed a project local plugin, but not the opencode.json file at the root of the project that still referenced the plugin.

@csullivannet commented on GitHub (Feb 16, 2026): I had a poorly configured `opencode.json` in my project that was causing this. I had removed a project local plugin, but not the `opencode.json` file at the root of the project that still referenced the plugin.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7159