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
/message endpoint returns empty body (HTTP 200, Content-Length: 0) #16860
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.
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?
What is the correct way to call LLM programmatically via the HTTP server API?
Activity
github-actions commentedon Mar 10, 2026
This issue might be a duplicate of existing issues. Please check:
prompt_asynchandler (missingawaitcausing immediate cancellation of prompt processing)prompt_asyncendpoint returning empty responses due to the stream() wrapper never writing data, with the prompt being cancelled after the HTTP response is sent — matches the server log sequence you observed (loop → completed → cancel)github-actions commentedon Jul 4, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.