[Bug] Opencode crashes on second run in Termux/Proot distro
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/
To Reproduce
Steps to reproduce the behavior:
- Install Opencode in Termux with any Proot distro.
- Run
opencodefor the first time — it works normally. - Close Opencode.
- Run
opencodeagain. - 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.
This issue might be a duplicate of existing issues. Please check:
- #387: Very similar "Error: Unexpected error, check log file at" message with detailed logs showing crash patterns
- #961: General Termux support request indicating ongoing compatibility issues
- #709: Specific Termux installation and execution problems with error messages about missing files
Feel free to ignore if none of these address your specific case.
Can you show what the error log says? Maybe drop the file if possible?
Can you show what the error log says? Maybe drop the file if possible?
Here's the log file 2025-10-14T081251.log
I also cannot get opencode to run in Termux, neither in vanilla Termux nor proot (arch).