Closed
Closed
Copy link
Description
Description
After upgrading to Desktop v1.18.5, the app shows a notification on startup:
无法重新加载test
UnsupportedContentType
The "test" project is the current workspace directory.
Root Cause
The error UnsupportedContentType originates from the generated client SDK (packages/client/src/generated/client.ts), thrown when the server returns a Content-Type header that is neither application/json nor text/event-stream.
This appears to be related to the dual-server compatibility ("Current" architecture) changes in #38462. The new server protocol detection logic is likely sending a request that gets back an unexpected Content-Type response.
Environment
- OpenCode Desktop v1.18.5
- Windows 11
- Project: D:\Workspace\Demo\test
Steps to Reproduce
- Install/upgrade to Desktop v1.18.5
- Open the app
- The app loads the "test" project and shows the error notification
Workaround
(Needs confirmation)
Screenshots
N/A (terminal error notification)
Additional Context
- Clearing Desktop cache did not resolve the issue
- The project directory contains normal files (json, html, mjs, md)
Reacted by Nicol1B13, ChrisXpert, Akuta Zehy, Reza Arkan Partadiredja and Joshua Blake Smith
Metadata
Metadata
Assignees
Labels
No labels
Activity
Start-Gao commentedon Jul 25, 2026
chenye041208 commentedon Jul 25, 2026
Can reproduce this on Windows 10 with v1.18.5.
Steps I confirmed:
AppData/Roaming/ai.opencode.desktop)UnsupportedContentTypeerror pops up every timeSo this is not project-specific — any workspace triggers it.
Screenshot attached.
SherUnlocked-4869 commentedon Jul 25, 2026
I also encountered the same issue
wujialeHK commentedon Jul 25, 2026
I also encountered this problem. In addition, I closed the old session and the session creation failed when I reopened the new session. Do you have this problem?
pppbfw commentedon Jul 25, 2026
Me too, the desktop is terrible.
zhangxyjlu commentedon Jul 25, 2026
I also encountered the same issue
satrapu commentedon Jul 25, 2026
I can reproduce this consistently on a clean Windows machine with a local Ollama setup.
Environment
winget)Ollama configuration
OpenCode is configured to use the local OpenAI-compatible endpoint:
{ "$schema": "https://opencode.ai/config.json", "enabled_providers": ["ollama"], "provider": { "ollama": { "options": { "baseURL": "http://localhost:11434/v1" }, "models": { "qwen3-coder:30b": {}, "devstral:24b": {} } } } }Models
Reproduction
The issue occurs regardless of the opened workspace:
Steps:
Expected
The prompt should immediately be sent to Ollama and inference should start.
Actual
OpenCode stays on Thinking for several minutes (or indefinitely).
During this time:
ollama psshows no running modelRunning the exact same prompt directly works immediately:
Additional diagnostics
The local OpenAI-compatible endpoint is working correctly:
returns:
Content-Type: application/jsonThe problem also reproduces when launching OpenCode via:
so it does not appear to be caused by my manual configuration.
The issue is also reproducible:
Logs
renderer.logconsistently contains:This appears during application startup, before any prompt is sent to Ollama.
The most important observation is that while OpenCode displays Thinking,
ollama psremains empty, suggesting that the request is never sent to Ollama.Nicol1B13 commentedon Jul 26, 2026
I can confirm this regression on Windows 11 with OpenCode Desktop 1.18.5 (v1.18.4 works fine).
Note: The CLI (terminal) version works without issues. The "Unsupported ContentType" error only pops up in the Desktop GUI on the very 1st session initialization (cold start). Subsequent sessions load normally.
walunt236 commentedon Jul 26, 2026
太恼火了干净安装进去弹的第一个弹窗就是无法重新加载项目
Kuromi-zyzy commentedon Jul 26, 2026
I encountered the same issue and did some deeper investigation. Here are additional technical findings:
Additional Root Cause Details
The error occurs during the "bootstrap instance" process (logged in renderer.log as "Failed to finish bootstrap instance ClientError: UnsupportedContentType"), which fires once per restored session on app startup.
I confirmed that the sidecar (Go backend, listens on a random localhost port) returns the SPA HTML page (Content-Type: text/html) for unknown routes, including:
Instead of the expected text/event-stream or JSON content type. All standard REST API endpoints (GET /project, GET /project/current, GET /project/{id}) work correctly (HTTP 200 with JSON).
Impact Pattern
The toast appears for each previously open session at startup. If you had 3 sessions open when closing the app, you will see 3 toasts on the next launch, each for a different project. The toasts auto-dismiss after a few seconds. Core functionality (chat, code editing, file operations) is unaffected.
Environment
AssabTigleG commentedon Jul 26, 2026
SAME HERE:
AqueleHaru commentedon Jul 26, 2026
facing same issue here.
joshbla commentedon Jul 26, 2026
same issues here. on both mac and windows versions of the desktop app.
opencode-agent commentedon Jul 27, 2026
Fixed in v1.18.6 by #38816, which restores legacy MCP state/resource refreshes for V1 workspaces.
cashee commentedon Jul 27, 2026
+1 — same issue on Windows 11, confirmed root cause is sidecar returning SPA HTML for /api/mcp\ and /api/mcp/resource\ routes. v1.18.4 works fine. Waiting for v1.18.6 fix.