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 crashes the entire terminal session right after open #1220
@thdxr i ended up deleting the folder again because i needed to use the tool again, but as soon as i can reproduce this issue again i'll test this out for you
@thdxr not sure if it's related or not, but everytime that this happens, I try to update opencode by running the install script again (with curl -fsSL https://opencode.ai/install | bash) and I get this error:
\033[0;31mFailed to fetch version information\033[0m
after a few minutes, the install script starts working again. I'm just adding this here because, since opencode has a self update feature now, maybe this is related?
after the script is back working, the session still crashes until i update it, so it might not be directly affecting this, but i still thought that you should know
update: after more usage i stumbled across the same issue but on another context. instead of crashing as soon as I open the program, i was in the middle of typing out a prompt and it crashed. then when i tried opening up opencode again, it said that opencode is not a valid program, as if it was uninstalled. I ran the install script again and it installed version 0.4.42, which was release just the minute before
I'm inclined to believe that this bug is related to the self update feature on opencode and some issue when fetching version information on github
@thdxr this has been happening pretty much twice a day now, to the point where i always run curl -fsSL https://opencode.ai/install | bash before opening opencode just to make sure that it won't crash my entire tmux session
any tips on how to get proper logs on this crashes? with that i could probably debug the crash cause from here
I checked the logs on this directory but it doesn't seem to be anything crash related over there. pretty much all logs are basic info.
I'll see if I can get a reproduceable state happening again, and when that happens i'll try to dump all files and folders into a docker container and see if it crashes from there. this way at least we might have some sort of reproduceable state
just have to be careful not to leak my anthropic credentials in the process
@rekram1-node hey, it's been a while, sorry about that. I ended up ditching AI agents for a bit and got back to it just recently.
unfortunatelly, I couldn't reproduce this bug on a docker container or something similar, however it's still happening, and now it's constant: reinstalling it doesn't fix the issue.
Here is a video showcasing the issue:
opencode-crashing-2025-12-24_09.37.14.mp4
As you can see, I install opencode and open it, only to have it crash right after. Right after installing, I check the executable path and it points to ~/.opencode/bin normally, however once it crashes, opencode is not on the path anymore.
I forgot to show this part on the video, but if we run ls -la ~/.opencode/bin we can see that the folder is empty:
Does the autoupdate process delete the old binary file? maybe we are crashing midway through and ending up in a broken, not installed state
have encountered the exact same issue several times. Previously, I resolved it by deleting OpenCode and reinstalling it a few days later, which would work temporarily.
This time, I found this issue and just tried to update direcly. This time it went from version 1.2.6 to 1.2.9. Now it starts without crashing the terminal. I was able to run opencode run ... with version 1.2.6, but not the TUI.
Unfortunately, I did not check the ~/.opencode/bin folder before updating.
I will let you know if it caches on the next release as well.
Activity
brunobmello25 commentedon Jul 22, 2025
ran with
opencode --log-level DEBUG --print-logs &> logs.txtand got this output:thdxr commentedon Jul 22, 2025
does it happen only with the tui? fine with
opencode run?brunobmello25 commentedon Jul 23, 2025
@thdxr i ended up deleting the folder again because i needed to use the tool again, but as soon as i can reproduce this issue again i'll test this out for you
brunobmello25 commentedon Jul 23, 2025
@thdxr it happened again and now I can confirm: only happening with the TUI. with
opencode runit runs finebrunobmello25 commentedon Aug 6, 2025
@thdxr not sure if it's related or not, but everytime that this happens, I try to update opencode by running the install script again (with
curl -fsSL https://opencode.ai/install | bash) and I get this error:after a few minutes, the install script starts working again. I'm just adding this here because, since opencode has a self update feature now, maybe this is related?
after the script is back working, the session still crashes until i update it, so it might not be directly affecting this, but i still thought that you should know
brunobmello25 commentedon Aug 13, 2025
update: after more usage i stumbled across the same issue but on another context. instead of crashing as soon as I open the program, i was in the middle of typing out a prompt and it crashed. then when i tried opening up opencode again, it said that
opencodeis not a valid program, as if it was uninstalled. I ran the install script again and it installed version0.4.42, which was release just the minute beforeI'm inclined to believe that this bug is related to the self update feature on opencode and some issue when fetching version information on github
rekram1-node commentedon Aug 13, 2025
I've had a similar situation happen to what you just described^^ new install broke my opencode installation forcing me to delete and reinstall
brunobmello25 commentedon Aug 25, 2025
@thdxr this has been happening pretty much twice a day now, to the point where i always run
curl -fsSL https://opencode.ai/install | bashbefore opening opencode just to make sure that it won't crash my entire tmux sessionany tips on how to get proper logs on this crashes? with that i could probably debug the crash cause from here
rekram1-node commentedon Aug 25, 2025
hmm all logs go to ~/.local/share/opencode/log/...
if you run:
it shows were all main paths are
Haven't seen this specific issue (opencode crashes) before or heard anyone else report it...
brunobmello25 commentedon Aug 25, 2025
@rekram1-node thanks!
I checked the logs on this directory but it doesn't seem to be anything crash related over there. pretty much all logs are basic info.
I'll see if I can get a reproduceable state happening again, and when that happens i'll try to dump all files and folders into a docker container and see if it crashes from there. this way at least we might have some sort of reproduceable state
just have to be careful not to leak my anthropic credentials in the process
rekram1-node commentedon Aug 25, 2025
Is this happening only when a fresh version is available? it seems like the autoupdate is crashing your opencode instance to me?
rekram1-node commentedon Aug 25, 2025
you could try (installing a previous version):
then run opencode and see if the auto update would kill it?
brunobmello25 commentedon Aug 25, 2025
@rekram1-node got it crashing with this approach! however, there isn't any relevant log in the logs directory about this crash
I'll see if I can move this to a container so that it's easily reproduceable
brunobmello25 commentedon Dec 24, 2025
@rekram1-node hey, it's been a while, sorry about that. I ended up ditching AI agents for a bit and got back to it just recently.
unfortunatelly, I couldn't reproduce this bug on a docker container or something similar, however it's still happening, and now it's constant: reinstalling it doesn't fix the issue.
Here is a video showcasing the issue:
opencode-crashing-2025-12-24_09.37.14.mp4
As you can see, I install opencode and open it, only to have it crash right after. Right after installing, I check the executable path and it points to
~/.opencode/binnormally, however once it crashes, opencode is not on the path anymore.I forgot to show this part on the video, but if we run
ls -la ~/.opencode/binwe can see that the folder is empty:Does the autoupdate process delete the old binary file? maybe we are crashing midway through and ending up in a broken, not installed state
iamDrakkir commentedon Feb 20, 2026
have encountered the exact same issue several times. Previously, I resolved it by deleting OpenCode and reinstalling it a few days later, which would work temporarily.
This time, I found this issue and just tried to update direcly. This time it went from version 1.2.6 to 1.2.9. Now it starts without crashing the terminal. I was able to run
opencode run ...with version 1.2.6, but not the TUI.Unfortunately, I did not check the ~/.opencode/bin folder before updating.
I will let you know if it caches on the next release as well.
iamDrakkir commentedon Feb 27, 2026
Started crashing again with the new release.
Let me know if i should test anything before i upgrade via the bash script.
brunobmello25 commentedon Feb 27, 2026
@iamDrakkir does it also crash running inside tmux?
Over here, it crashes my entire tmux session as well as my terminal emulator.
github-actions commentedon Apr 29, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.