Skip to content

fix(opencode): Detect managed v2 installation - #97

Merged
4ndreello merged 1 commit into
mainfrom
fix/opencode-v2-detection
Sep 21, 2026
Merged

4ndreello merged 1 commit into
mainfrom
fix/opencode-v2-detection

Conversation

@4ndreello

Copy link
Copy Markdown
Owner

OpenCode v2 installs its binary at ~/.opencode/bin/opencode and adds that directory to the shell PATH. The CodeDeck daemon can outlive the shell that launched it, so its inherited PATH may not include the new directory. The doctor then reports OpenCode as missing, and new sessions fail to spawn.\n\nFall back to the managed v2 path when PATH lookup fails and retain the resolved path for driver spawns. Add a regression test for a stale PATH.\n\nThis keeps the existing PATH lookup first and uses the managed path only when that lookup fails.

Look for OpenCode's managed v2 binary when the daemon PATH predates the installation. Reuse the resolved path for driver spawns so detection and execution use the same binary.

Co-Authored-By: Codex <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@4ndreello
4ndreello merged commit d2e4d6d into main Sep 21, 2026
4 checks passed
@4ndreello
4ndreello deleted the fix/opencode-v2-detection branch September 21, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant