GeezerVison is showing github.com — OpenCode freezes with black screen in Termux proot-distro Ubuntu, cannot exit with Ctrl+C · Issue #8959 · anomalyco/opencode
OpenCode freezes with black screen in Termux proot-distro Ubuntu, cannot exit with Ctrl+C #8959Labels bugSomething isn't working DescriptionWhen 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.
Actual Behavior:
- Black screen with no display
- Cannot exit with Ctrl+C
- Must force kill the process
Activitygithub-actions commented on 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 commented on Jan 16, 2026 Are you using any plugins? jyduyfcjufi commented on 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 commented on Jan 16, 2026 Same problem, no plugins installed.
Everything was working fine a few days ago. maxjust commented on Jan 16, 2026 LOG maybe helpful for diagnostic
installed @opencode-ai/[email protected]
[16.00ms] done
stderr=Saved lockfile
INFO 2026-01-16T20:55:28 +441ms service=bus type=* subscribing
INFO 2026-01-16T20:55:28 +0ms service=bus type=session.updated subscribing
INFO 2026-01-16T20:55:28 +0ms service=bus type=message.updated subscribing
INFO 2026-01-16T20:55:28 +0ms service=bus type=message.part.updated subscribing
INFO 2026-01-16T20:55:28 +1ms service=bus type=session.updated subscribing
INFO 2026-01-16T20:55:28 +0ms service=bus type=message.updated subscribing
INFO 2026-01-16T20:55:28 +0ms service=bus type=message.part.updated subscribing
INFO 2026-01-16T20:55:28 +0ms service=bus type=session.diff subscribing
INFO 2026-01-16T20:55:28 +0ms service=format init
INFO 2026-01-16T20:55:28 +0ms service=bus type=file.edited subscribing
INFO 2026-01-16T20:55:28 +0ms service=lsp serverIds=deno, typescript, vue, eslint, oxlint, biome, gopls, ruby-lsp, pyright, elixir-ls, zls, csharp, fsharp, sourcekit-lsp, rust, clangd, svelte, astro, jdtls, kotlin-ls, yaml-ls, lua-ls, php intelephense, prisma, dart, ocaml-lsp, bash, terraform, texlab, dockerfile, gleam, clojure-lsp, nixd, tinymist, haskell-language-server enabled LSP servers
INFO 2026-01-16T20:55:28 +0ms service=file.watcher init
INFO 2026-01-16T20:55:28 +2ms service=bus type=command.executed subscribing
INFO 2026-01-16T20:55:28 +0ms service=file.watcher platform=linux backend=inotify watcher backend
INFO 2026-01-16T20:55:28 +2ms service=server event connected
INFO 2026-01-16T20:55:28 +0ms service=bus type=* subscribing
INFO 2026-01-16T20:55:28 +1ms service=server status=started providers
INFO 2026-01-16T20:55:28 +1ms service=provider status=started state
INFO 2026-01-16T20:55:28 +3ms service=models.dev file={} refreshing
INFO 2026-01-16T20:55:28 +0ms service=models.dev file={} refreshing
INFO 2026-01-16T20:55:28 +1ms service=server status=completed duration=679 method=GET path=/event request
INFO 2026-01-16T20:55:28 +0ms service=server status=completed duration=678 method=GET path=/config request
INFO 2026-01-16T20:55:28 +1ms service=server status=completed duration=679 method=GET path=/agent request
INFO 2026-01-16T20:55:28 +2ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd)
Checked 8 installs across 16 packages (no changes) [6.00ms]
stderr= done
INFO 2026-01-16T20:55:28 +0ms service=vcs branch=develop initialized
INFO 2026-01-16T20:55:28 +0ms service=bus type=file.watcher.updated subscribing
INFO 2026-01-16T20:55:28 +24ms service=server status=completed duration=705 method=GET path=/session request
ERROR 2026-01-16T20:55:38 +9975ms service=default e=The operation timed out. rejection
ERROR 2026-01-16T20:55:38 +0ms service=default e=The operation timed out. rejection
rekram1-node commented on Jan 16, 2026 added bugSomething isn't working and removed opentuiThis relates to changes in v1.0, now that opencode uses opentui on Jan 16, 2026rekram1-node commented on Jan 16, 2026 if u do BUN_BE_BUN=1 opencode --version what do u see? maxjust commented on Jan 16, 2026 BUN_BE_BUN=1 opencode --version 2026 M01 17, Sat 00:27:38
1.3.5
if u do BUN_BE_BUN=1 opencode --version what do u see?
maxjust commented on Jan 16, 2026 Does OpenCode require an internet connection to work properly if local LLM are used? maxjust commented on Jan 16, 2026 1.1.25 din't resolve issue, problem still exist jyduyfcjufi commented on Jan 17, 2026 rekram1-node commented on Jan 17, 2026 can i see full output of opencode run hello --print-logs
? iceqing commented on Jan 17, 2026 root@localhost:~# opencode run hello --print-logs
INFO 2026-01-17T04:45:17 +287ms service=default version=1.1.25 args=["run","hello","--print-logs"] opencode INFO 2026-01-17T04:45:17 +0ms service=default directory=/root creating instance
INFO 2026-01-17T04:45:17 +0ms service=project directory=/root fromDirectory
INFO 2026-01-17T04:45:17 +9ms service=default directory=/root bootstrapping
INFO 2026-01-17T04:45:17 +2ms service=config path=/root/.config/opencode/config.json loading
INFO 2026-01-17T04:45:17 +1ms service=config path=/root/.config/opencode/opencode.json loading INFO 2026-01-17T04:45:17 +1ms service=config path=/root/.config/opencode/opencode.jsonc loading INFO 2026-01-17T04:45:17 +46ms service=bun cmd=["/root/.opencode/bin/opencode","add","@opencode-ai/[email protected]","--exact"] cwd=/root/.config/opencode running INFO 2026-01-17T04:45:21 +3504ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd) installed @opencode-ai/[email protected] [7.00ms] done stderr=Saved lockfile done INFO 2026-01-17T04:45:21 +0ms service=bun cmd=["/root/.opencode/bin/opencode","install"] cwd=/root/.config/opencode running
INFO 2026-01-17T04:45:25 +3851ms service=config path=/root/.opencode/opencode.jsonc loading INFO 2026-01-17T04:45:25 +46ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd) Checked 3 installs across 4 packages (no changes) [7.00ms] stderr= done
INFO 2026-01-17T04:45:25 +8ms service=config path=/root/.opencode/opencode.json loading INFO 2026-01-17T04:45:25 +1ms service=bun cmd=["/root/.opencode/bin/opencode","add","@opencode-ai/[email protected]","--exact"] cwd=/root/.opencode running INFO 2026-01-17T04:45:29 +3946ms service=plugin name=CodexAuthPlugin loading internal plugin INFO 2026-01-17T04:45:29 +0ms service=plugin name=CopilotAuthPlugin loading internal plugin INFO 2026-01-17T04:45:29 +0ms service=plugin [email protected] loading plugin INFO 2026-01-17T04:45:29 +1ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd) installed @opencode-ai/[email protected] 3 packages installed [24.00ms] stderr=Saved lockfile done INFO 2026-01-17T04:45:29 +0ms service=bun cmd=["/root/.opencode/bin/opencode","install"] cwd=/root/.opencode running
INFO 2026-01-17T04:45:33 +4069ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd) + @opencode-ai/[email protected] 3 packages installed [29.00ms] stderr= done
ERROR 2026-01-17T04:45:33 +33ms service=default name=ResolveMessage message=Cannot find module '/root/.cache/opencode/node_modules/opencode-anthropic-auth' from '/$bunfs/root/src/index.js' code=ERR_MODULE_NOT_FOUND specifier=/root/.cache/opencode/node_modules/opencode-anthropic-auth referrer=/$bunfs/root/src/index.js importKind=import-statement fatal Error: Unexpected error, check log file at for more details ResolveMessage: Cannot find module '/root/.cache/opencode/node_modules/opencode-anthropic-auth' from '/$bunfs/root/src/index.js'
maxjust commented on Jan 17, 2026
can i see full output of opencode run hello --print-logs
?
opencode run hello --print-logs 205ms 2026 M01 17, Sat 13:57:46
INFO 2026-01-17T10:57:50 +131ms service=default version=1.1.25 args=["run","hello","--print-logs"] opencode
INFO 2026-01-17T10:57:50 +0ms service=default directory=/home/max creating instance
INFO 2026-01-17T10:57:50 +1ms service=project directory=/home/max fromDirectory
INFO 2026-01-17T10:57:50 +2ms service=default directory=/home/max bootstrapping
INFO 2026-01-17T10:57:50 +2ms service=config path=/home/max/.config/opencode/config.json loading
INFO 2026-01-17T10:57:50 +0ms service=config path=/home/max/.config/opencode/opencode.json loading
INFO 2026-01-17T10:57:50 +0ms service=config path=/home/max/.config/opencode/opencode.jsonc loading
INFO 2026-01-17T10:57:50 +5ms service=bun cmd=["/home/max/.nvm/versions/node/v24.12.0/lib/node_modules/opencode-ai/node_modules/opencode-linux-x64/bin/opencode","add","@opencode-ai/[email protected]","--exact"] cwd=/home/max/.config/opencode running
INFO 2026-01-17T10:57:50 +3ms service=plugin name=CodexAuthPlugin loading internal plugin
INFO 2026-01-17T10:57:50 +0ms service=plugin name=CopilotAuthPlugin loading internal plugin
INFO 2026-01-17T10:57:50 +0ms service=plugin [email protected] loading plugin
INFO 2026-01-17T10:57:50 +1ms service=bun code=0 stdout=bun add v1.3.5 (1e86cebd)
installed @opencode-ai/[email protected]
[1.00ms] done
stderr=Saved lockfile
done
INFO 2026-01-17T10:57:50 +0ms service=bun cmd=["/home/max/.nvm/versions/node/v24.12.0/lib/node_modules/opencode-ai/node_modules/opencode-linux-x64/bin/opencode","install"] cwd=/home/max/.config/opencode running
INFO 2026-01-17T10:57:50 +9ms service=plugin path=@gitlab/[email protected] loading plugin
INFO 2026-01-17T10:57:50 +1ms service=bun code=0 stdout=bun install v1.3.5 (1e86cebd)
Checked 3 installs across 4 packages (no changes) [3.00ms]
stderr= done
INFO 2026-01-17T10:57:50 +30ms service=bus type=* subscribing
INFO 2026-01-17T10:57:50 +0ms service=bus type=session.updated subscribing
INFO 2026-01-17T10:57:50 +0ms service=bus type=message.updated subscribing
INFO 2026-01-17T10:57:50 +0ms service=bus type=message.part.updated subscribing
INFO 2026-01-17T10:57:50 +0ms service=bus type=session.updated subscribing
INFO 2026-01-17T10:57:50 +0ms service=bus type=message.updated subscribing
INFO 2026-01-17T10:57:50 +0ms service=bus type=message.part.updated subscribing
INFO 2026-01-17T10:57:50 +0ms service=bus type=session.diff subscribing
INFO 2026-01-17T10:57:50 +1ms service=format init
INFO 2026-01-17T10:57:50 +0ms service=bus type=file.edited subscribing
INFO 2026-01-17T10:57:50 +0ms service=lsp serverIds=deno, typescript, vue, eslint, oxlint, biome, gopls, ruby-lsp, pyright, elixir-ls, zls, csharp, fsharp, sourcekit-lsp, rust, clangd, svelte, astro, jdtls, kotlin-ls, yaml-ls, lua-ls, php intelephense, prisma, dart, ocaml-lsp, bash, terraform, texlab, dockerfile, gleam, clojure-lsp, nixd, tinymist, haskell-language-server enabled LSP servers
INFO 2026-01-17T10:57:50 +0ms service=bus type=command.executed subscribing
INFO 2026-01-17T10:57:50 +9ms service=server method=POST path=/session request
INFO 2026-01-17T10:57:50 +0ms service=server status=started method=POST path=/session request
INFO 2026-01-17T10:57:50 +1ms service=session id=ses_43465535fffeGzhqZBu7vhEhfD slug=nimble-falcon version=1.1.25 projectID=global directory=/home/max title=New session - 2026-01-17T10:57:50.240Z time={"created":1768647470240,"updated":1768647470240} created
INFO 2026-01-17T10:57:50 +1ms service=bus type=session.created publishing
INFO 2026-01-17T10:57:50 +1ms service=bus type=session.updated publishing
INFO 2026-01-17T10:57:50 +1ms service=server status=completed duration=4 method=POST path=/session request
INFO 2026-01-17T10:57:50 +0ms service=server method=GET path=/config request
INFO 2026-01-17T10:57:50 +0ms service=server status=started method=GET path=/config request
INFO 2026-01-17T10:57:50 +0ms service=server status=completed duration=0 method=GET path=/config request
INFO 2026-01-17T10:57:50 +1ms service=server method=GET path=/event request
INFO 2026-01-17T10:57:50 +1ms service=server status=started method=GET path=/event request
INFO 2026-01-17T10:57:50 +0ms service=server method=POST path=/session/ses_43465535fffeGzhqZBu7vhEhfD/message request
INFO 2026-01-17T10:57:50 +0ms service=server status=started method=POST path=/session/ses_43465535fffeGzhqZBu7vhEhfD/message request
INFO 2026-01-17T10:57:50 +0ms service=server event connected
INFO 2026-01-17T10:57:50 +1ms service=bus type=* subscribing
INFO 2026-01-17T10:57:50 +2ms service=server status=completed duration=3 method=GET path=/event request
INFO 2026-01-17T10:57:50 +0ms service=server status=completed duration=3 method=POST path=/session/ses_43465535fffeGzhqZBu7vhEhfD/message request
INFO 2026-01-17T10:57:50 +5ms service=provider status=started state
INFO 2026-01-17T10:57:50 +1ms service=models.dev file={} refreshing
ERROR 2026-01-17T10:58:00 +10002ms service=default e=The operation timed out. rejection
maxjust commented on 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? Reacted by nex0ma, mr-jovani-van-bread, Den le and rsxv nex0ma commented on 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 commented on 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:
- 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 Hathoute commented on Jan 18, 2026 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) pgroves commented on 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/[email protected]
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. Fire- commented on 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 commented on 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. Reacted by FeCCC, seydina-dev, Anders Pitman, Peter McHale and Tubagus Muhammad Ivan Syah Winata Kusuma anderspitman commented on Feb 11, 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.
This allowed me to run opencode in our HPC environment. Thanks! Reacted by Peter McHale, nex0ma and Tubagus Muhammad Ivan Syah Winata Kusuma github-actions commented on 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.
MetadataMetadatabugSomething isn't working DevelopmentNo branches or pull requestsIssue actions
|