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
[Bug] Opencode crashes on second run in Termux/Proot distro #3143
Describe the bug
Opencode runs fine the first time, but when I try to open it a second time in Termux (any Proot distro), it fails with the following message:
Error: Unexpected error, check log file at /root/.local/share/opencode/log/.log for more details
To Reproduce
Steps to reproduce the behavior:
Install Opencode in Termux with any Proot distro.
Run opencode for the first time — it works normally.
Close Opencode.
Run opencode again.
Observe the unexpected error.
Expected behavior
Opencode should open and run correctly on subsequent launches as well.
Screenshots/Logs
The error log is located at: /root/.local/share/opencode/log/<timestamp>.log
(Attach log content if possible.)
Environment:
OS: Termux (any Proot distro)
Opencode version: latest version
Node/npm version: latest version
Additional context
This issue only occurs on the second and subsequent runs, not on the first launch. It might be related to session, cache, or file handling between runs.
Activity
github-actions commentedon Oct 13, 2025
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
rekram1-node commentedon Oct 13, 2025
Can you show what the error log says? Maybe drop the file if possible?
Ritusmin325k commentedon Oct 14, 2025
Here's the log file
2025-10-14T081251.log
621625 commentedon Dec 11, 2025
I also cannot get opencode to run in Termux, neither in vanilla Termux nor proot (arch).
michaelphagen commentedon Jan 7, 2026
For reference, it seems to run again if you delete ~/.cache/opencode/version. I'm just deleting that before each run
pabloXDXDXD commentedon Jan 9, 2026
@michaelphagen I tried and it still doesn't work.
danielpcampagna commentedon Feb 4, 2026
Also, my first time has taken too long time to start up
github-actions commentedon Apr 6, 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.