Repository navigation
Closed
Labels
bugSomething isn't workingSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentui
Description
Description
Problem Description
When starting OpenCode on Linux, the interface does not appear in the terminal and in the browser it loads indefinitely. The process never reaches the point of displaying the UI.
What I have tried so far
- Running
opencodeandopencode web - Switching Node versions (20 and 24)
- Installing older versions of OpenCode (including 0.8.x), but none worked
- Using environment variables:
OPENCODE_DISABLE_PLUGINS=1OPENCODE_DISABLE_DEFAULT_PLUGINS=true
- Clearing configuration and cache (
~/.config/opencode,~/.cache/opencode) - Running
opencode uninstalland reinstalling
None of this has solved the issue; even after opencode uninstall, the UI still does not appear.
Relevant logs
INFO 2026-01-29T04:21:32 +694ms service=server method=GET path=/ request
INFO 2026-01-29T04:21:32 +0ms service=server status=started method=GET path=/ request
INFO 2026-01-29T04:21:32 +4ms service=default directory=/home/prueba creating instance
INFO 2026-01-29T04:21:32 +3ms service=project directory=/home/prueba fromDirectory
INFO 2026-01-29T04:21:32 +8ms service=storage index=0 running migration
INFO 2026-01-29T04:21:32 +5ms service=storage index=1 running migration
INFO 2026-01-29T04:21:32 +17ms service=default directory=/home/prueba bootstrapping
INFO 2026-01-29T04:21:32 +21ms service=bun cmd=["/home/prueba/.config/nvm/versions/node/v20.20.0/lib/node_modules/opencode-ai/node_modules/opencode-linux-x64/bin/opencode","add","@opencode-ai/[email protected]","--exact"] cwd=/home/prueba/.config/opencode running
Plugins
No response
OpenCode version
1.1.41
Steps to reproduce
No response
Screenshot and/or share link
Operating System
EndeavourOS (Arch Linux-based)
Terminal
Alacritty
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingopentuiThis relates to changes in v1.0, now that opencode uses opentuiThis relates to changes in v1.0, now that opencode uses opentui
Activity
github-actions commentedon Jan 29, 2026
This issue might be a duplicate of existing issues. Please check:
opencode web#6557: Web UI does not load when runningopencode web- Similar symptom of browser showing black/blank screen indefinitely with module loading errorsFeel free to ignore if none of these address your specific case.
nickwood commentedon Jan 29, 2026
I've also been having a similar issues. I'm unable to spawn opencode in a directory with a .git subdirectory. Workaround was to run with the env_var
OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER=trueFull bug report (written with the help of opencode):
Summary
OpenCode 1.1.41 hangs indefinitely with a black screen when started in any directory containing a .git directory on Ubuntu 24.04 with kernel 6.14. The issue is caused by the Parcel file watcher's inotify subscription. Setting OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER=true resolves the issue.
Environment
Steps to Reproduce
cd /tmp
mkdir test-repo
cd test-repo
git init
3. Run opencode
Expected Behavior
OpenCode should start and display the TUI interface.
Actual Behavior
Workaround
Setting the experimental flag resolves the issue:
export OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER=true
opencode
Diagnostic Details
What works:
What fails:
Log analysis:
When running with --print-logs, output stops early at config loading phase. However, log files written to ~/.local/share/opencode/log/ show the backend initializes successfully up to VCS detection:
INFO service=vcs branch=main initialized
INFO service=file.watcher platform=linux backend=inotify watcher backend
strace analysis:
Running with strace shows the process enters a busy futex loop:
futex(0x7817ab0d0164, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x7817ab098164, FUTEX_WAKE_PRIVATE, 1) = 1
sched_yield() = 0
futex(0x7817ab0e8164, FUTEX_WAKE_PRIVATE, 1) = 1
... (repeats indefinitely)
This pattern indicates a spinlock or livelock condition.
Ruled out:
Suspected Root Cause
Based on code review, the issue appears to be in packages/opencode/src/file/watcher.ts. When OpenCode detects a git repository, it:
The inotify subscription (used on Linux) appears to cause a busy-wait condition on this kernel/system configuration. The watcher initialization only occurs when Instance.project.vcs === "git", which explains why non-git directories work fine.
Additional Context
jara505 commentedon Jan 30, 2026
If you are experiencing a "Black Screen" hang ,the issue is a network deadlock caused by IPv6.
The application (via the Bun/Node engine) gets stuck indefinitely trying to establish a connection over IPv6 that never receives a response. Disabling IPv6 forces the app to use IPv4, which resolves the initialization hang and allows the AI models to respond correctly.