Skip to content

V2 desktop bootstrap calls legacy config endpoints and leaves project sync incomplete #40209

Description

@resetsix

Description

The Desktop app correctly detects its local sidecar as V2 through GET /api/health, but the app bootstrap still calls the legacy config endpoints:

  • GET /global/config
  • `GET /config

Both return 404 on the V2 server. The /config response has an empty body and no Content-Type, causing the legacy SDK to throw UnsupportedContentType.

Because the directory config request is part of the project bootstrap tasks, the project store remains in partial instead of advancing to complete. The UI then shows "Failed to reload " after startup or reload.

The calls appear in:

  • packages/app/src/context/global-sync/bootstrap.ts:111
  • packages/app/src/context/global-sync/bootstrap.ts:379

Expected behavior: once the server is detected as V2, the app should not call legacy config endpoints. V1 config loading should remain unchanged.

Plugins

None

OpenCode version

dev branch, local V2 build (/api/health reports version local)

Steps to reproduce

  1. Check out the current dev branch.
  2. Run bun dev:desktop.
  3. Let Desktop start its local V2 sidecar.
  4. Open or create a project.
  5. Reload the Desktop renderer.
  6. Observe "Failed to reload " with UnsupportedContentType.
  7. Inspect the network requests:
    • /api/health returns 200 application/json and identifies the server as V2.
    • /global/config returns 404.
    • /config returns 404 with an empty body and no Content-Type.

Screenshot and/or share link

Image

Operating System

macOS 15.0.1

Terminal

VS Code integrated terminal, zsh

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions