Skip to content

[Bug] Opencode crashes on second run in Termux/Proot distro #3143

Closed

Description

@Ritusmin325k

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:

  1. Install Opencode in Termux with any Proot distro.
  2. Run opencode for the first time — it works normally.
  3. Close Opencode.
  4. Run opencode again.
  5. 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.

Image

Activity

  1. github-actions commented on Oct 13, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  2. rekram1-node commented on Oct 13, 2025

    @rekram1-node
    Contributor

    Can you show what the error log says? Maybe drop the file if possible?

  3. self-assigned this
    on Oct 13, 2025
  4. Ritusmin325k commented on Oct 14, 2025

    @Ritusmin325k
    Author

    Can you show what the error log says? Maybe drop the file if possible?

    Here's the log file
    2025-10-14T081251.log

  5. 621625 commented on Dec 11, 2025

    @621625

    I also cannot get opencode to run in Termux, neither in vanilla Termux nor proot (arch).

  6. michaelphagen commented on Jan 7, 2026

    @michaelphagen

    For reference, it seems to run again if you delete ~/.cache/opencode/version. I'm just deleting that before each run

  7. pabloXDXDXD commented on Jan 9, 2026

    @pabloXDXDXD

    @michaelphagen I tried and it still doesn't work.

  8. danielpcampagna commented on Feb 4, 2026

    @danielpcampagna

    Also, my first time has taken too long time to start up

  9. github-actions commented on Apr 6, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions