Skip to content

/message endpoint returns empty body (HTTP 200, Content-Length: 0) #16860

Closed as not planned

Description

@mgu1206

Environment
- OpenCode version: 1.2.22 (also tested on 1.2.24 — same behavior) - OS: Windows 11 Pro (10.0.26200)

  • Installation: npm package opencode-ai, running via opencode serve
  • Provider: OpenAI only, authenticated via OAuth, Team plan
  • ChatGPT and Codex work fine — the OpenAI account/authentication itself has no issues
    Problem
    POST /session/{id}/message takes approximately 5 minutes to return a response, even for trivial queries like "Say hello". The response itself is correct when it eventually arrives, but the latency makes it
    unusable.

Reproduce

SESSION=$(curl -s -X POST http://localhost:4096/session | jq -r '.id')

curl -X POST "http://localhost:4096/session/$SESSION/message" \ -H "Content-Type: application/json"
-d '{
"model": {"providerID": "openai", "modelID": "gpt-4.1-mini"},
"parts": [{"type": "text", "text": "Say hello.", "role": "user"}] }'

Result: ~5 min wait, then correct response

  • The same query via ChatGPT or Codex responds in seconds - Internal sessions (build agent, title generation) appear to work at normal speed

  • POST /session/{id}/prompt_async has the same slow behavior
    What was tried

  • Fresh DB reset (deleted opencode.db) — same result - Different models (gpt-4.1-mini, gpt-5.2) — same result

  • Versions 1.2.22 and 1.2.24 — same result
    Questions
    1. Is this expected latency for the HTTP server API? 2. Is /message intended for external HTTP clients, or only for the built-in UI?

  1. What is the correct way to call LLM programmatically via the HTTP server API?

Activity

  1. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Mar 10, 2026
  2. github-actions commented on Mar 10, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  3. assigned and unassigned on Apr 26, 2026
  4. removed
    bugSomething isn't working
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  5. github-actions commented on Jul 4, 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