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 freezes with black screen in Termux proot-distro Ubuntu, cannot exit with Ctrl+C #8959
When running OpenCode in a Ubuntu environment installed via proot-distro in Termux, the application displays a black screen and completely freezes, unable to exit with Ctrl+C.
Steps to Reproduce:
Install proot-distro in Termux
Install Ubuntu: proot-distro install ubuntu
Enter Ubuntu: proot-distro login ubuntu
Install opencode
Run opencode
The application shows a black screen with no content
Pressing Ctrl+C has no response, must use kill command to force terminate
Expected Behavior:
Should display a normal terminal interface.
No, I'm not using any plugins. This happens with a fresh installation of OpenCode in the proot-distro Ubuntu environment without any additional plugins or configurations.> Are you using any plugins?
The network trace shows that I can't connect to the OP-code servers, even though I'm using a local LLM and the basic internet connection is fine. But the opencode website doesn't open in the browser. How can I run a fully local version?
Reacted by nex0ma, mr-jovani-van-bread, Den le and rsxv
1.1.23, win11. dark screen, reinstall not worked
1,1,23, opensuse, dark screen, only kiil -9, reinstall not worked
1.1.21 worked on opensuse, local model worked, the free models may be banned for russian users
I can confirm this issue and I have identified the root cause.
After analyzing the application's startup behavior (tracing syscalls and network activity), I found that OpenCode attempts to establish a connection to backend servers immediately upon launch. If this connection cannot be established—specifically if the packets are dropped or filtered (common in regions with strict DPI/ISP censorship)—the application hangs indefinitely on the black screen instead of timing out gracefully or falling back to an offline mode.
Verification:
Direct Connection: The application hangs/freezes (Black screen, requires SIGKILL).
Via VPN/DPI Bypass: The application launches instantly and works correctly.
The Problem:
It appears the application enforces a "hard" dependency on reaching the backend servers before initializing the TUI. This renders the "local LLM" capability useless without an active internet connection to your servers.
Suggestion:
Please implement a graceful fallback or a dedicated Offline Mode. If the handshake with the server fails or times out, the application should simply log a warning and proceed to load the UI, allowing users to work with local models or local files. The current behavior treats a network failure as a critical fatal error that blocks the main thread.
Reacted by rzxczxc, rsxv, Celmas, nex0ma, CC, FeCCC and Anders Pitman
I'm also trying to use opencode in a closed environment.
If you look at provider/models.js and provider/models-macro.ts, it looks like we can provide the json and disable periodic fetches there, but for some reason data becomes undefined which results in fetching the endpoint.
You will probably need to also whitelist npmjs or any private npm repository you're using since opencode will try to install builtins.
@rekram1-node how about making https://models.dev/api.json configurable ? (I'm thinking MODELS_DEV_API_JSON will resolve to a file or url, and if undefined use the default)
Back to the original problem (fresh install, launch tui, get a blank screen).
I got the same problem on Ubuntu24.04 and opencode 1.1.27. No network restrictions at all.
It was hanging while it tries installing this oauth plugin.
@gitlab/opencode-gitlab-auth@1.3.0
If I SIGKILLED that subprocess, the tui would finish launching and be fine.
After a few times of doing this, the install must have succeeded b/c I'm not getting it any more and I didn't fix anything. I was trying to get a screenshot of top for you with the offending processes, but it's resolved itself.
Or maybe first startup just takes 10 minutes on a fresh install these days.
My current fix for termux proot now was disabling default opencode plugin by adding this line inside zshrc/bashrc
export OPENCODE_DISABLE_DEFAULT_PLUGINS=true
then delete .cache/opencode folder
And disabling problematic plugins
I assume this issue caused from bun inside proot termux that didnt save the node package to the .cache/opencode folder after first start of opencode. Because every fresh start of opencode(with no .cache folder) it ran normally but when second start ran it got the hang error and i saw the log it was module not found error.
I just hoping opencode have option to use npm as package manager.
Reacted by FeCCC, seydina-dev, Anders Pitman, Peter McHale and Tubagus Rahman
My current fix for termux proot now was disabling default opencode plugin by adding this line inside zshrc/bashrc
export OPENCODE_DISABLE_DEFAULT_PLUGINS=true
then delete .cache/opencode folder
And disabling problematic plugins
I assume this issue caused from bun inside proot termux that didnt save the node package to the .cache/opencode folder after first start of opencode. Because every fresh start of opencode(with no .cache folder) it ran normally but when second start ran it got the hang error and i saw the log it was module not found error.
I just hoping opencode have option to use npm as package manager.
This allowed me to run opencode in our HPC environment. Thanks!
Reacted by Peter McHale, nex0ma and Tubagus Rahman
Activity
github-actions commentedon Jan 16, 2026
This issue might be a duplicate of or related to existing issues. Please check:
Feel free to ignore if this specific case (black screen + Ctrl+C unresponsiveness in proot-distro Ubuntu) is distinctly different from these issues.
rekram1-node commentedon Jan 16, 2026
Are you using any plugins?
jyduyfcjufi commentedon Jan 16, 2026
No, I'm not using any plugins. This happens with a fresh installation of OpenCode in the proot-distro Ubuntu environment without any additional plugins or configurations.> Are you using any plugins?
maxjust commentedon Jan 16, 2026
Same problem, no plugins installed.
Everything was working fine a few days ago.
maxjust commentedon Jan 16, 2026
LOG maybe helpful for diagnostic
rekram1-node commentedon Jan 16, 2026
hmm
rekram1-node commentedon Jan 16, 2026
if u do
BUN_BE_BUN=1 opencode --versionwhat do u see?maxjust commentedon Jan 16, 2026
BUN_BE_BUN=1 opencode --version 2026 M01 17, Sat 00:27:38
1.3.5
maxjust commentedon Jan 16, 2026
Does OpenCode require an internet connection to work properly if local LLM are used?
2 remaining items
maxjust commentedon Jan 16, 2026
1.1.25 din't resolve issue, problem still exist
jyduyfcjufi commentedon Jan 17, 2026
yes
rekram1-node commentedon Jan 17, 2026
can i see full output of
opencode run hello --print-logs?
iceqing commentedon Jan 17, 2026
maxjust commentedon Jan 17, 2026
maxjust commentedon Jan 17, 2026
The network trace shows that I can't connect to the OP-code servers, even though I'm using a local LLM and the basic internet connection is fine. But the opencode website doesn't open in the browser. How can I run a fully local version?
nex0ma commentedon Jan 17, 2026
1.1.23, win11. dark screen, reinstall not worked
1,1,23, opensuse, dark screen, only kiil -9, reinstall not worked
1.1.21 worked on opensuse, local model worked, the free models may be banned for russian users
mr-jovani-van-bread commentedon Jan 17, 2026
I can confirm this issue and I have identified the root cause.
After analyzing the application's startup behavior (tracing syscalls and network activity), I found that OpenCode attempts to establish a connection to backend servers immediately upon launch. If this connection cannot be established—specifically if the packets are dropped or filtered (common in regions with strict DPI/ISP censorship)—the application hangs indefinitely on the black screen instead of timing out gracefully or falling back to an offline mode.
Verification:
The Problem:
It appears the application enforces a "hard" dependency on reaching the backend servers before initializing the TUI. This renders the "local LLM" capability useless without an active internet connection to your servers.
Suggestion:
Please implement a graceful fallback or a dedicated Offline Mode. If the handshake with the server fails or times out, the application should simply log a warning and proceed to load the UI, allowing users to work with local models or local files. The current behavior treats a network failure as a critical fatal error that blocks the main thread.
Hathoute commentedon Jan 18, 2026
I'm also trying to use
opencodein a closed environment.If you look at provider/models.js and provider/models-macro.ts, it looks like we can provide the
jsonand disable periodic fetches there, but for some reasondatabecomesundefinedwhich results in fetching the endpoint.You will probably need to also whitelist
npmjsor any private npm repository you're using since opencode will try to install builtins.@rekram1-node how about making
https://models.dev/api.jsonconfigurable ? (I'm thinkingMODELS_DEV_API_JSONwill resolve to a file or url, and if undefined use the default)pgroves commentedon Jan 20, 2026
Back to the original problem (fresh install, launch tui, get a blank screen).
I got the same problem on Ubuntu24.04 and opencode 1.1.27. No network restrictions at all.
It was hanging while it tries installing this oauth plugin.
@gitlab/opencode-gitlab-auth@1.3.0If I SIGKILLED that subprocess, the tui would finish launching and be fine.
After a few times of doing this, the install must have succeeded b/c I'm not getting it any more and I didn't fix anything. I was trying to get a screenshot of top for you with the offending processes, but it's resolved itself.
Or maybe first startup just takes 10 minutes on a fresh install these days.
Fire- commentedon Feb 1, 2026
This has been an issue for me for a bit now as well, posted as part of a thread of issues on twitter
Screen_Recording_20260122_224959_Termux.mp4
LilYoopug commentedon Feb 1, 2026
My current fix for termux proot now was disabling default opencode plugin by adding this line inside zshrc/bashrc
export OPENCODE_DISABLE_DEFAULT_PLUGINS=true
then delete .cache/opencode folder
And disabling problematic plugins
I assume this issue caused from bun inside proot termux that didnt save the node package to the .cache/opencode folder after first start of opencode. Because every fresh start of opencode(with no .cache folder) it ran normally but when second start ran it got the hang error and i saw the log it was module not found error.
I just hoping opencode have option to use npm as package manager.
anderspitman commentedon Feb 11, 2026
This allowed me to run opencode in our HPC environment. Thanks!
github-actions commentedon Apr 13, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.