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 become stuck all of a sudden. Does not launch anymore. #5485
I have a similar issue since this morning. It looks like an issue with TUI - open code is just stuck and doesn't open:
$ opencode --print-logs
INFO 2025-12-14T09:24:59 +83ms service=default version=1.0.152 args=["--print-logs"] opencode
ERROR 2025-12-14T09:24:59 +142ms service=acp-command promise={} reason=Failed to initialize OpenTUI render library: Failed to open library "/$bunfs/root/libopentui-5kxbhhq3.so": /$bunfs/root/libopentui-5kxbhhq3.so: cannot open shared object file: No such file or directory Unhandled rejection
ERROR 2025-12-14T09:24:59 +0ms service=default e=Failed to initialize OpenTUI render library: Failed to open library "/$bunfs/root/libopentui-5kxbhhq3.so": /$bunfs/root/libopentui-5kxbhhq3.so: cannot open shared object file: No such file or directory rejection
ERROR 2025-12-14T09:24:59 +0ms service=default Error: Failed to initialize OpenTUI render library: Failed to open library "/$bunfs/root/libopentui-5kxbhhq3.so": /$bunfs/root/libopentui-5kxbhhq3.so: cannot open shared object file: No such file or directory
This issue usually happens because of opencode autoupdating, which is why you see "No such file or directory"
You may add this to your opencode.json to prevent this from happening.
I have been having the exact same issue today (everything worked on Friday 12/12), very similar set up: Windows 11, Ubuntu 22.04 WSL 1. opencode opens on projects without actual code (i.e. markdown files), however coding projects hang as described in this thread.
Disabling lsp support and autoupdate globally yielded no change for me, unfortunately
However, I was able to get opencode working again when downgrading substantially (i.e. 1.0.0)
Output from my end, looks like in my case the corporate proxy my laptop sits behind is stepping on opencode.ai (I can't access it in the browser. I was using the GitHub Copilot backend before, which was working fine
Edit: Ran with the wrong version, but shows the same on the latest (`
$ opencode run hello --print-logs --model opencode/grok-code
INFO 2025-12-15T20:39:53 +194ms service=default version=1.0.158 args=["run","hello","--print-logs","--model","opencode/grok-code"] opencode
INFO 2025-12-15T20:39:53 +1ms service=default directory=/home/user/repos/testproject creating instance
INFO 2025-12-15T20:39:53 +0ms service=project directory=/home/user/repos/testproject fromDirectory
INFO 2025-12-15T20:39:53 +24ms service=default directory=/home/user/repos/testproject bootstrapping
INFO 2025-12-15T20:39:53 +4ms service=config path=/home/user/.config/opencode/config.json loading
INFO 2025-12-15T20:39:53 +0ms service=config path=/home/user/.config/opencode/opencode.json loading
INFO 2025-12-15T20:39:53 +1ms service=config path=/home/user/.config/opencode/opencode.jsonc loading
INFO 2025-12-15T20:39:53 +2ms service=bun cmd=["/home/user/.config/nvm/versions/node/v22.21.1/lib/node_modules/opencode-ai/node_modules/opencode-linux-x64/bin/opencode","add","@opencode-ai/plugin@1.0.158","--exact"] cwd=/home/user/.config/opencode running
INFO 2025-12-15T20:39:53 +36ms service=bun code=0 stdout=bun add v1.3.4 (5eb2145b)
installed @opencode-ai/plugin@1.0.158
[6.00ms] done
stderr=Saved lockfile
done
INFO 2025-12-15T20:39:53 +3ms service=plugin path=opencode-copilot-auth@0.0.9 loading plugin
INFO 2025-12-15T20:39:53 +3ms service=plugin path=opencode-anthropic-auth@0.0.5 loading plugin
INFO 2025-12-15T20:39:53 +31ms service=bus type=_ subscribing
INFO 2025-12-15T20:39:53 +1ms service=bus type=session.updated subscribing
INFO 2025-12-15T20:39:53 +0ms service=bus type=message.updated subscribing
INFO 2025-12-15T20:39:53 +0ms service=bus type=message.part.updated subscribing
INFO 2025-12-15T20:39:53 +0ms service=bus type=session.updated subscribing
INFO 2025-12-15T20:39:53 +0ms service=bus type=message.updated subscribing
INFO 2025-12-15T20:39:53 +0ms service=bus type=message.part.updated subscribing
INFO 2025-12-15T20:39:53 +0ms service=bus type=session.diff subscribing
INFO 2025-12-15T20:39:53 +0ms service=format init
INFO 2025-12-15T20:39:53 +0ms service=bus type=file.edited subscribing
INFO 2025-12-15T20:39:53 +0ms service=lsp serverIds=deno, typescript, vue, eslint, biome, gopls, ruby-lsp, pyright, elixir-ls, zls, csharp, fsharp, sourcekit-lsp, rust, clangd, svelte, astro, jdtls, yaml-ls, lua-ls, php intelephense, dart, ocaml-lsp, bash, terraform, texlab, dockerfile, gleam enabled LSP servers
INFO 2025-12-15T20:39:53 +0ms service=file.watcher init
INFO 2025-12-15T20:39:53 +3ms service=bus type=command.executed subscribing
INFO 2025-12-15T20:39:53 +5ms service=file.watcher platform=linux backend=inotify watcher backend
INFO 2025-12-15T20:39:53 +98ms service=vcs branch=master initialized
INFO 2025-12-15T20:39:53 +1ms service=bus type=file.watcher.updated subscribing
INFO 2025-12-15T20:39:53 +6ms service=server method=POST path=/session request
INFO 2025-12-15T20:39:53 +0ms service=server status=started method=POST path=/session request
INFO 2025-12-15T20:39:53 +3ms service=session id=session-id version=1.0.158 projectID=projectId directory=/home/user/repos/testproject title=New session - 2025-12-15T20:39:53.958Z time={"created":1765831193958,"updated":1765831193958} created
INFO 2025-12-15T20:39:53 +2ms service=bus type=session.created publishing
INFO 2025-12-15T20:39:53 +0ms service=bus type=session.updated publishing
INFO 2025-12-15T20:39:53 +2ms service=server status=completed duration=7 method=POST path=/session request
INFO 2025-12-15T20:39:53 +2ms service=server method=GET path=/config request
INFO 2025-12-15T20:39:53 +0ms service=server status=started method=GET path=/config request
INFO 2025-12-15T20:39:53 +0ms service=server status=completed duration=0 method=GET path=/config request
ERROR 2025-12-15T20:39:53 +0ms service=acp-command promise={} reason=Bad file descriptor Unhandled rejection
ERROR 2025-12-15T20:39:53 +0ms service=default e=Bad file descriptor rejection
INFO 2025-12-15T20:39:53 +5ms service=server method=GET path=/event request
INFO 2025-12-15T20:39:53 +0ms service=server status=started method=GET path=/event request
INFO 2025-12-15T20:39:53 +0ms service=server event connected
INFO 2025-12-15T20:39:53 +1ms service=bus type=_ subscribing
INFO 2025-12-15T20:39:53 +1ms service=server status=completed duration=2 method=GET path=/event request
INFO 2025-12-15T20:39:53 +0ms service=server method=POST path=/session/session-id/message request
INFO 2025-12-15T20:39:53 +1ms service=server status=started method=POST path=/session/session-id/message request
INFO 2025-12-15T20:39:53 +2ms service=server status=completed duration=3 method=POST path=/session/session-id/message request
INFO 2025-12-15T20:39:53 +24ms service=bus type=message.updated publishing
INFO 2025-12-15T20:39:54 +2ms service=provider status=started state
INFO 2025-12-15T20:39:54 +2ms service=models.dev file={} refreshing
INFO 2025-12-15T20:39:54 +11ms service=provider init
INFO 2025-12-15T20:39:54 +0ms service=bus type=message.part.updated publishing
INFO 2025-12-15T20:39:54 +2ms service=bus type=session.updated publishing
INFO 2025-12-15T20:39:54 +2ms service=bus type=session.status publishing
INFO 2025-12-15T20:39:54 +0ms service=session.prompt step=0 sessionID=session-id loop
INFO 2025-12-15T20:39:54 +2ms service=provider providerID=opencode found
INFO 2025-12-15T20:39:54 +0ms service=provider status=completed duration=19 state
INFO 2025-12-15T20:39:54 +30ms service=llm providerID=opencode modelID=gpt-5-nano sessionID=session-id small=true agent=title stream
INFO 2025-12-15T20:39:54 +1ms service=provider status=started providerID=opencode getSDK
INFO 2025-12-15T20:39:54 +0ms service=provider providerID=opencode pkg=@ai-sdk/openai using bundled provider
INFO 2025-12-15T20:39:54 +0ms service=provider status=completed duration=0 providerID=opencode getSDK
INFO 2025-12-15T20:39:54 +0ms service=bus type=message.updated publishing
INFO 2025-12-15T20:39:54 +1ms service=session.prompt status=started resolveTools
INFO 2025-12-15T20:39:54 +2ms service=llm providerID=opencode modelID=gpt-5-nano sessionID=session-id small=true agent=title params={"options":{"reasoningEffort":"minimal","promptCacheKey":"session-id","include":["reasoning.encrypted_content"],"reasoningSummary":"auto"}} params
INFO 2025-12-15T20:39:54 +10ms service=tool.registry status=started invalid
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=started bash
INFO 2025-12-15T20:39:54 +0ms service=bash-tool shell=/bin/zsh bash tool using shell
INFO 2025-12-15T20:39:54 +1ms service=tool.registry status=started read
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=started glob
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=started grep
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=started list
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=started edit
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=started write
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=started task
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=started webfetch
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=started todowrite
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=started todoread
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=started websearch
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=started codesearch
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=completed duration=1 invalid
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=completed duration=0 read
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=completed duration=0 glob
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=completed duration=0 grep
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=completed duration=0 list
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=completed duration=0 edit
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=completed duration=0 write
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=completed duration=0 webfetch
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=completed duration=0 todowrite
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=completed duration=0 todoread
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=completed duration=0 websearch
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=completed duration=0 codesearch
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=completed duration=1 bash
INFO 2025-12-15T20:39:54 +0ms service=tool.registry status=completed duration=0 task
INFO 2025-12-15T20:39:54 +4ms service=session.prompt status=completed duration=17 resolveTools
INFO 2025-12-15T20:39:54 +1ms service=ripgrep cwd=/home/user/repos/testproject limit=200 tree
INFO 2025-12-15T20:39:54 +15ms service=bus type=message.updated publishing
INFO 2025-12-15T20:39:54 +1ms service=llm providerID=opencode modelID=gpt-5-nano sessionID=session-id small=true agent=title stream
INFO 2025-12-15T20:39:54 +0ms service=llm providerID=opencode modelID=gpt-5-nano sessionID=session-id small=true agent=title params={"options":{"reasoningEffort":"minimal","promptCacheKey":"session-id","include":["reasoning.encrypted_content"],"reasoningSummary":"auto"}} params
INFO 2025-12-15T20:39:54 +2ms service=bus type=session.updated publishing
INFO 2025-12-15T20:39:54 +1ms service=bus type=session.diff publishing
INFO 2025-12-15T20:39:54 +9ms service=session.processor process
INFO 2025-12-15T20:39:54 +0ms service=llm providerID=opencode modelID=grok-code sessionID=session-id small=false agent=build stream
INFO 2025-12-15T20:39:54 +0ms service=provider status=started providerID=opencode getSDK
INFO 2025-12-15T20:39:54 +0ms service=provider providerID=opencode pkg=@ai-sdk/openai-compatible using bundled provider
INFO 2025-12-15T20:39:54 +0ms service=provider status=completed duration=0 providerID=opencode getSDK
INFO 2025-12-15T20:39:54 +1ms service=llm providerID=opencode modelID=grok-code sessionID=session-id small=false agent=build params={"options":{}} params
INFO 2025-12-15T20:39:54 +0ms service=bus type=session.status publishing
ERROR 2025-12-15T20:39:54 +774ms service=llm providerID=opencode modelID=grok-code sessionID=session-id small=false agent=build error={"error":{"code":"ConnectionRefused","path":"https://opencode.ai/zen/v1/responses","errno":0}} stream error
ERROR 2025-12-15T20:39:54 +2ms service=acp-command promise={} reason=No output generated. Check the stream for errors. Unhandled rejection
ERROR 2025-12-15T20:39:54 +0ms service=default e=No output generated. Check the stream for errors. rejection
ERROR 2025-12-15T20:39:54 +0ms service=llm providerID=opencode modelID=grok-code sessionID=session-id small=false agent=build error={"error":{"code":"ConnectionRefused","path":"https://opencode.ai/zen/v1/responses","errno":0}} stream error
ERROR 2025-12-15T20:39:54 +0ms service=session.prompt error=No output generated. Check the stream for errors. failed to generate title
ERROR 2025-12-15T20:39:54 +1ms service=llm providerID=opencode modelID=grok-code sessionID=session-id small=false agent=build error={"error":{"code":"ConnectionRefused","path":"https://opencode.ai/zen/v1/chat/completions","errno":0}} stream error
ERROR 2025-12-15T20:39:54 +1ms service=session.processor error=Unable to connect. Is the computer able to access the url? process
INFO 2025-12-15T20:39:54 +0ms service=bus type=session.error publishing
INFO 2025-12-15T20:39:54 +2ms service=bus type=message.updated publishing
INFO 2025-12-15T20:39:54 +1ms service=session.compaction pruning
Error: Error: Unable to connect. Is the computer able to access the url?
INFO 2025-12-15T20:39:54 +37ms service=session.prompt sessionID=session-id cancel
INFO 2025-12-15T20:39:54 +0ms service=bus type=session.status publishing
INFO 2025-12-15T20:39:54 +0ms service=bus type=session.idle publishing
I am having a similar issue. My open code just hangs indefinitely when trying to launch. FWIW, it still launches in other session (precisely, other tmux panes). It seems to occur anytime the launch would be the second running instance of opencode.
Per above, I tried opencode run hello with both grok-code and my default model (opus 4.5 via anthropic). Grok works, but not specifying model does not.
The opencode run where it hangs seems to loop indefinitely on:
INFO 2026-01-22T15:17:19 +78ms service=server method=POST path=/tui/show-toast request
INFO 2026-01-22T15:17:19 +0ms service=server status=started method=POST path=/tui/show-toast request
INFO 2026-01-22T15:17:19 +1ms service=bus type=tui.toast.show publishing
INFO 2026-01-22T15:17:19 +0ms service=server status=completed duration=1 method=POST path=/tui/show-toast request
Version:
> opencode -v
1.1.31
Works: opencode run hello --print-logs --model opencode/grok-code
Encountered same issue on arch. TUI broke after updating to 1.1.34. Rolling back to the previous version I had been using (1.1.25) did not help. Launching opencode with a vpn helped, and it has been working after that with a vpn disabled. Couldn't reproduce this issue again even after reinstall, so not sure what resource was the culprit
I was able to reproduce the issue again by running opencode in a docker container. In my case the problem was in models.dev. My provider apparently blocking access to this site, and opencode was not able to start without access to it
I just had it happen on freshly updated homebrew version. Tried a couple of things which didn't work so eventually tried re-installing using script provided in the documentation which also didn't work.
Then opened Activity Monitor on macOS and searched for opencode; saw two processes so killed one of them and then hanging TUI session actually rendered.
I'm having the same issue, fresh installed with the curl script, I'm under a VPN, running opencode results in a blank screen, trying to run any hello commands with different models hangs:
$ opencode run hello --print-logs --model github-copilot/gpt-4.1
INFO 2026-02-02T08:47:31 +258ms service=default version=1.1.48 args=["run","hello","--print-logs","--model","github-copilot/gpt-4.1"] opencode
INFO 2026-02-02T08:47:31 +1ms service=default directory=/home/atinocom creating instance
INFO 2026-02-02T08:47:31 +0ms service=project directory=/home/atinocom fromDirectory
INFO 2026-02-02T08:47:31 +6ms service=default directory=/home/atinocom bootstrapping
INFO 2026-02-02T08:47:31 +3ms service=config path=/home/atinocom/.config/opencode/config.json loading
INFO 2026-02-02T08:47:31 +1ms service=config path=/home/atinocom/.config/opencode/opencode.json loading
INFO 2026-02-02T08:47:31 +0ms service=config path=/home/atinocom/.config/opencode/opencode.jsonc loading
INFO 2026-02-02T08:47:31 +8ms service=bun cmd=["/home/atinocom/.opencode/bin/opencode","add","@opencode-ai/plugin@1.1.48","--exact"] cwd=/home/atinocom/.config/opencode running
I saw on some other threads that .env files were causing issues, so I gave that a shot on my end.
The projects I was having issues launching all had .env files, renaming them to something like .env.bak allowed opencode to launch successfully.
I did also try modifying the file permissions (0644, 0755, 0777), but that did not work on my end. I suppose that could be a WSL 1 specific quirk, or something like that.
In my case it was because of this block in opencode.json. When this is enabled, only one instance of opencode can be launched. The second one will hang. --print-log shows nothing.
Activity
github-actions commentedon Dec 13, 2025
This issue might be a duplicate of existing issues. Please check:
bun addget stuck #4682: OpenCode gets stuck when bun add gets stuck (can freeze indefinitely during initialization)Feel free to ignore if none of these address your specific case.
raymelon commentedon Dec 13, 2025
Well, apparently my opencode was updated to 1.0.142
It looks like the update caused the issue?
raymelon commentedon Dec 13, 2025
I decided to proceed with updating it to 1.0.125, but it also looks like it failed to detect the installed version.
raymelon commentedon Dec 13, 2025
This is bad. Despite updating to 1.0.152, it's still stuck.
rekram1-node commentedon Dec 13, 2025
hm that’s very strange
are you able to do:
opencode run hello
and pass print logs to that?
radomirml commentedon Dec 14, 2025
I have a similar issue since this morning. It looks like an issue with TUI - open code is just stuck and doesn't open:
This works:
opencode run hello --print-logsradomirml commentedon Dec 14, 2025
Ignore my comment - in my case the problem was full /tmp partition
CountElqyd commentedon Dec 15, 2025
This issue usually happens because of opencode autoupdating, which is why you see "No such file or directory"
You may add this to your opencode.json to prevent this from happening.
"autoupdate": false,acbk2b commentedon Dec 15, 2025
I have been having the exact same issue today (everything worked on Friday 12/12), very similar set up: Windows 11, Ubuntu 22.04 WSL 1.
opencodeopens on projects without actual code (i.e.markdownfiles), however coding projects hang as described in this thread.Disabling
lspsupport andautoupdateglobally yielded no change for me, unfortunatelyHowever, I was able to get
opencodeworking again when downgrading substantially (i.e.1.0.0)rekram1-node commentedon Dec 15, 2025
Can anyone having issue show me:
opencode run hello --print-logs --model opencode/grok-codeand we can see if stuff is hanging and where
acbk2b commentedon Dec 15, 2025
Output from my end, looks like in my case the corporate proxy my laptop sits behind is stepping on
opencode.ai(I can't access it in the browser. I was using theGitHub Copilotbackend before, which was working fineEdit: Ran with the wrong version, but shows the same on the latest (`
rekram1-node commentedon Dec 15, 2025
@acbk2b can you try the same with a copilot model?
opencode run hello --print-logs --model github-copilot/gpt-4.1acbk2b commentedon Dec 15, 2025
I get a
ProviderModelNotFoundErrorerror on that:25 remaining items
maxjust commentedon Jan 16, 2026
+1
Godlaa commentedon Jan 17, 2026
+2
Songze1019 commentedon Jan 19, 2026
Same issue, I noticed that opening opencode with VSCode,
these garbled characters have appeared with an "Aborted" .
rnwolfe commentedon Jan 22, 2026
I am having a similar issue. My open code just hangs indefinitely when trying to launch. FWIW, it still launches in other session (precisely, other tmux panes). It seems to occur anytime the launch would be the second running instance of opencode.
Per above, I tried
opencode run hellowith both grok-code and my default model (opus 4.5 via anthropic). Grok works, but not specifying model does not.The
opencode runwhere it hangs seems to loop indefinitely on:Version:
> opencode -v 1.1.31Works:
opencode run hello --print-logs --model opencode/grok-codeHangs:
opencode run hello --print-logs(default model, opus 4.5 via anthropic)AT120 commentedon Jan 24, 2026
Encountered same issue on arch. TUI broke after updating to 1.1.34. Rolling back to the previous version I had been using (1.1.25) did not help. Launching opencode with a vpn helped, and it has been working after that with a vpn disabled. Couldn't reproduce this issue again even after reinstall, so not sure what resource was the culprit
AT120 commentedon Jan 24, 2026
I was able to reproduce the issue again by running opencode in a docker container. In my case the problem was in models.dev. My provider apparently blocking access to this site, and opencode was not able to start without access to it
sanchez1337 commentedon Jan 28, 2026
I just had it happen on freshly updated homebrew version. Tried a couple of things which didn't work so eventually tried re-installing using script provided in the documentation which also didn't work.
Then opened Activity Monitor on macOS and searched for opencode; saw two processes so killed one of them and then hanging TUI session actually rendered.
EDIT: Screen capture:
MrMarble commentedon Feb 2, 2026
I'm having the same issue, fresh installed with the
curlscript, I'm under a VPN, runningopencoderesults in a blank screen, trying to run anyhellocommands with different models hangs:acbk2b commentedon Feb 9, 2026
@rekram1-node
I saw on some other threads that
.envfiles were causing issues, so I gave that a shot on my end.The projects I was having issues launching all had
.envfiles, renaming them to something like.env.bakallowedopencodeto launch successfully.I did also try modifying the file permissions (
0644,0755,0777), but that did not work on my end. I suppose that could be a WSL 1 specific quirk, or something like that.hvdute commentedon Feb 23, 2026
In my case it was because of this block in
opencode.json. When this is enabled, only one instance of opencode can be launched. The second one will hang.--print-logshows nothing.{ // "server": { // "port": 4096, // "hostname": "100.64.142.97", // "mdns": false // }, "autoupdate": false }bondtesty commentedon Mar 24, 2026
seems same here
xkuznetc commentedon Apr 18, 2026
Having same issue with (
1.4.0), just hangs on Fedora 43 KDE with all latest updates:kinfo:installed via Homebrew (
brew info opencode):and node: