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 command disappears after first run due to install-method misdetection during upgrade #26473
When opencode starts, the auto-upgrade flow can infer installation method from process.execPath (Node/Bun runtime path) instead of the invoked opencode CLI path. In some local setups this appears to select the wrong installer and can leave the command unavailable after exit.
System information
OpenCode version: 1.14.41
Operating system: Linux
Reproduction
Install and run opencode in an environment where runtime executable path differs from the installed CLI shim path.
Start opencode and allow startup update checks.
Exit the command.
Observe that opencode may no longer resolve in shell.
Expected
opencode remains installed and available after running/exiting.
Proposed fix
Use invoked command path (process.argv[1] fallback chain) in installation method detection heuristics, instead of relying on process.execPath.
Missing system information: please include your OpenCode version and operating system. This context is important for diagnosing and reproducing the issue.
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
[FEATURE]: Smart auto-upgrade based on installation method #23435: [FEATURE]: Smart auto-upgrade based on installation method — describes the same root problem (install method misdetection via process.execPath) and proposes the same fix direction (process.argv[1] / invoked path). Consider adding your bug report details there, or linking the two.
opencode upgrade issue #358: opencode upgrade issue — upgrade completes but the new version doesn't take effect (related symptom)
If you believe this was flagged incorrectly, please let a maintainer know.
Activity
github-actions commentedon May 9, 2026
This issue doesn't fully meet our contributing guidelines.
What needs to be fixed:
Please edit this issue to address the above within 2 hours, or it will be automatically closed.
This issue might be a duplicate of existing issues. Please check:
process.execPath) and proposes the same fix direction (process.argv[1]/ invoked path). Consider adding your bug report details there, or linking the two.If you believe this was flagged incorrectly, please let a maintainer know.
github-actions commentedon May 9, 2026
This issue has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.
Feel free to open a new issue that follows our issue templates.