Skip to content

OpenCode Desktop on Windows shows server status as red (unavailable) when not run as Administrator, with no clear error message #32618

Closed as not planned

Description

@TeaClearInkII

Description

When launching the OpenCode Desktop application on Windows without Administrator privileges, the built‑in server status indicator turns red (unavailable). Any request made to the server (e.g., via the integrated client or an external tool) returns 503 Service Unavailable with an empty response body. The application itself does not show any error pop‑up or log explaining the cause.

Running the same desktop application as Administrator resolves the issue – the server status turns green and all requests work properly.

The lack of feedback makes it very difficult for users to understand that elevated privileges are required.

Steps to Reproduce

  1. Double‑click the OpenCode Desktop shortcut (or run the executable) without using "Run as administrator".
  2. Observe that the server status indicator (usually at the bottom or in the settings panel) appears red.
  3. Try to load a project or send a request to the local server (e.g., using the integrated X client or curl to http://127.0.0.1:4096/agent?...).
  4. The response is 503 Service Unavailable with an empty body.
  5. Close the application.
  6. Right‑click the shortcut and select "Run as administrator".
  7. Upon launch, the server status turns green and all requests succeed.

Expected Behavior

  • The desktop application should either:
    • Work without requiring Administrator privileges (if technically possible), or
    • Display a clear, user‑friendly error message at startup (e.g., a dialog box saying "Insufficient permissions to start server. Please restart as Administrator.") and/or show a specific error in the status area.
  • The 503 response should include a descriptive error reason (e.g., a JSON field) instead of an empty body.

Actual Behavior

  • The server status simply turns red, with no tooltip or explanation.
  • All requests fail silently with 503 and empty response.
  • Only when run as Administrator does the server become available.

Suggested Improvements

  1. Add a permission check during server startup (port binding, file access, etc.) and show an actionable alert to the user if insufficient.
  2. Provide a more informative error in the 503 response (e.g., { "error": "permission_denied" }).
  3. Mention the need for Administrator privileges on Windows in the application's documentation or first‑run guide.

Additional Notes

  • This issue occurs on Windows (any version) with the desktop build.
  • The path to the project directory (containing non‑ASCII characters) does not affect the behaviour; the same problem exists with plain ASCII paths.
  • Firewall settings are not the cause – the problem is purely related to the process token.

Thank you for considering this improvement!

Activity

  1. changed the title [-]opencode server returns 503 Service Unavailable when run without admin privileges on Windows (desktop version)[/-] [+]OpenCode Desktop on Windows shows server status as red (unavailable) when not run as Administrator, with no clear error message[/+] on Jun 17, 2026
  2. github-actions commented on Aug 16, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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