Desktop shows "OpenCode 1" for incompatible SSH servers even when remote is V2

Open Beginner friendly
#62,582 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
78/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
typescript
Domain
frontend

Research direction

Read packages/app/src/runtime/server/health-machine.ts and trace how incompatible health retains the probed version. Then check the fallback in packages/app/src/home/projects/view.tsx and packages/app/src/session/server-unavailable-panel.tsx, along with their relevant tests. Done means V2 or unknown versions are not labeled OpenCode 1, while known incompatible versions are shown accurately.

Written by the indexing model from the issue text.

Description

pending close triaging
Summary

When an SSH remote is marked incompatible, Desktop always shows:

This server is running OpenCode 1, which isn't compatible with this app. Upgrade it to OpenCode V2 to continue.

even if the remote is actually running OpenCode V2 (e.g. background service 2.2.5).

Screenshot

SSH remote "deba" tooltip says OpenCode 1

Environment
  • Client: OpenCode Desktop 2.2.6 on Linux
  • Remote over SSH running OpenCode background service 2.2.5 (opencode-cli serve --service; ~/.local/state/opencode/service.json reports "version":"2.2.5")
  • CLI on the remote PATH is also V2 (opencode v2.2.5)
  • SSH auth succeeds; failure is the post-connect incompatible UI
Expected
  • Do not claim the remote is OpenCode 1 when the version is unknown or is a V2 build
  • If the remote is V2 at the wrong patch version, prefer the exact-version / "Server update required" path
  • If truly incompatible, show the actual probed version when known
Actual

Tooltip says the server is running OpenCode 1 and asks to upgrade to V2.

Suspected cause

selectServerVersion only returns a version for healthy health. For incompatible it returns undefined, and the UI falls back to "1":

// packages/app/src/runtime/server/health-machine.ts
export function selectServerVersion(health: ServerHealth | undefined) {
  return health?.type === "healthy" ? health.version : undefined
}

// packages/app/src/home/projects/view.tsx
props.language.t("server.row.incompatible", {
  version: selectServerVersion(props.health) ?? "1",
})

Same fallback in packages/app/src/session/server-unavailable-panel.tsx.

Notes

Updating the remote from 2.2.5 → 2.2.6 restores connectivity in this setup, but the OpenCode 1 label is still incorrect and misleading.

Dominant language
TypeScript
Stars
224k
Forks
30k
Avg merge
4h 44m
Merged PRs (30d)
513

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from anomalyco/opencode

All issues in anomalyco/opencode

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.