You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OpenCode does not show UI in terminal or web #11092
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 opencode and opencode 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=1
OPENCODE_DISABLE_DEFAULT_PLUGINS=true
Clearing configuration and cache (~/.config/opencode, ~/.cache/opencode)
Running opencode uninstall and 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/plugin@1.1.41","--exact"] cwd=/home/prueba/.config/opencode running
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=true
Full 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
OpenCode version: 1.1.41
OS: Ubuntu 24.04.3 LTS (Noble Numbat)
Kernel: 6.14.0-1019-oem
Architecture: x86_64
Shell: zsh (with bash as system default)
libgit2: 1.7.2
Terminal: Tested in both Terminator and Konsole - same behavior
Steps to Reproduce
Install OpenCode 1.1.41 on Ubuntu 24.04 with kernel 6.14
Navigate to any git repository, or create a fresh one:
cd /tmp
mkdir test-repo
cd test-repo
git init
3. Run opencode
Observe: Terminal goes completely black, no UI renders, process consumes CPU
Expected Behavior
OpenCode should start and display the TUI interface.
Actual Behavior
Terminal goes completely black (no UI frame, no content)
Process enters a busy-wait loop (strace shows constant futex wake/wait + sched_yield)
opencode web also hangs
opencode run "message" also hangs
opencode debug config and opencode debug paths work correctly in git directories
Workaround
Setting the experimental flag resolves the issue:
export OPENCODE_EXPERIMENTAL_DISABLE_FILEWATCHER=true
opencode
Diagnostic Details
What works:
OpenCode in non-git directories (~/.config, /tmp)
opencode debug config in git directories
opencode debug paths in git directories
Git operations themselves (git status, git fetch, etc.)
What fails:
opencode (TUI) in any git directory
opencode web in any git directory
opencode run in any git directory
Even a fresh git init repo with no remote triggers the issue
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:
Git configuration (tested with empty ~/.gitconfig)
SSH configuration (git operations work fine)
Remote repositories (fresh git init with no remote fails)
OpenCode cache (cleared ~/.cache/opencode)
OpenCode config (tested with no opencode.jsonc)
inotify limits (65536 max_user_watches, only ~6000 in use)
Terminal emulator (same behavior in Terminator and Konsole)
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:
Initializes a Parcel watcher (@parcel/watcher) for the project directory
Additionally subscribes to watch the .git directory to detect branch changes
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
Other team members on the same OpenCode version do not experience this issue (different kernel versions suspected)
The OEM kernel 6.14.0-1019-oem may have different inotify behavior than standard kernels
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.
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.