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
# Desktop: "Could not reach Local Server" when the protocol probe times out (TypeError reading 'temperature') #51587
On some launches, Desktop shows "Could not reach Local Server / Retrying automatically..." and never recovers. The sidecar is healthy: main.log shows server ready. The renderer crashes during bootstrap:
[global-sdk] event stream failed [object Object]
Failed to finish bootstrap instance TypeError: Cannot read properties of undefined (reading 'temperature')
Pressing Ctrl+R about 30 seconds later always fixes it. Clicking "Other servers" > "Local Server" also fixes it.
Root cause (from the bundled renderer, out/renderer/assets/main-*.js)
detectServerProtocol() probes /global/health with AbortSignal.timeout(5000). If that probe fails or times out, and /api/health gives no answer either, the function falls through to return "v2".
On my machine the sidecar is unresponsive for roughly 20 seconds after server ready. So on some launches the probe times out and a v1 server is treated as v2.
loadAgentsQuery then takes the v2 path. The agents come back in the AgentV2 shape, whose request object contains only { headers, body }. Provider.Request has no settings.
agent.request.settings is undefined, so this throws.
The detected protocol is cached for the connection, so "Retrying automatically" never re-probes. Only a reload or reconnect recovers.
Steps to reproduce
Launch Desktop on a machine where the sidecar takes more than 5 seconds to become responsive after spawn. Mine has about 30 skills in ~/.config/opencode/skills and a OneDrive-synced project folder.
Observe the "Could not reach Local Server" screen and the TypeError in logs/<ts>/renderer.log.
Press Ctrl+R after the server has warmed up. The app loads normally.
Suggested fixes
Guard the read, e.g. agent.request?.settings?.temperature and agent.request?.settings?.topP.
Don't default to "v2" when both health probes fail or time out. Retry the probe, or re-detect it on each reconnect attempt, instead of caching the fallback.
Optionally, give the first probe after sidecar spawn a longer timeout.
Environment
Windows 11 Enterprise 10.0.26100, x64
Desktop 1.18.31 (1.18.32 pending; I checked its renderer and it has the same normalizeAgentList and detectServerProtocol code)
Custom providers configured via @ai-sdk/openai-compatible and @ai-sdk/anthropic behind a corporate gateway. I don't think this is relevant: the crash is in agent normalization, not provider loading.
Plugins
No response
OpenCode version
Version: OpenCode Desktop 1.18.31, Windows 11 x64 (same code is also in 1.18.32)
V2 no longer uses the v1/v2 protocol probe or caches a guessed protocol after its health checks time out. The desktop app uses the native v2 client connection with managed reconnection, removing the v1-sidecar misclassification path described here. To get v2: npm i -g @opencode/cli@latest or curl -fsSL https://opencode.ai/v2/install | bash (desktop: update the app). If you still see this on v2, please open a new issue with the details.
Activity
github-actions commentedon Sep 27, 2026
This issue might be a duplicate of existing issues. Please check:
normalizeAgentListerror whenagent.request.settingsis missing.temperatureTypeError while loading providers and models.For keybind-related issues, please also check our pinned keybinds documentation: #4997
neriousy commentedon Oct 19, 2026
V2 no longer uses the v1/v2 protocol probe or caches a guessed protocol after its health checks time out. The desktop app uses the native v2 client connection with managed reconnection, removing the v1-sidecar misclassification path described here. To get v2:
npm i -g @opencode/cli@latestorcurl -fsSL https://opencode.ai/v2/install | bash(desktop: update the app). If you still see this on v2, please open a new issue with the details.