Skip to content

prompt_async silently discards requests in v1.14.44 (SSE path broken) #26635

@jacob-bd

Description

@jacob-bd

What's broken

Starting in v1.14.44, POST /session/{id}/prompt_async accepts the request (returns 204) but never fires the model. No SSE events are emitted, no inference runs. The session just sits there.

The sync POST /session/{id}/message endpoint works perfectly on the same session, same model, same everything.

Two separate issues

1. prompt_async silently discards requests

Fire prompt_async, get a clean 204 back, and then... nothing. The SSE stream only ever receives server.connected. No message.part.delta, no session.status, no error. The model is never invoked. Token counts are 0/0.

This isn't a rate limit or auth problem. Health endpoint returns healthy, session creation works, and the sync /message endpoint on the same session responds with a full model output (tokens, reasoning, text, the whole thing).

2. session.idle sent on SSE connect before any prompt

v1.14.44 sends a session.status: idle event as soon as you connect to /event. If your client opens the SSE stream before firing prompt_async (which is the right pattern to avoid missing early delta events), the idle event looks like a completion signal and kills the stream before the prompt even fires.

Previous versions didn't do this.

Bonus: opencode version is also broken

$ opencode version
Error: Failed to change directory to /Users/.../version

Looks like it's trying to cd into a directory called "version" instead of printing the version string.

How to reproduce

# Start the server
opencode serve --port 4096

# Create a session
SESSION=$(curl -s -X POST http://127.0.0.1:4096/session \
  -H "Content-Type: application/json" -d '{}' | jq -r '.id')

# Open SSE in one terminal
curl -N http://127.0.0.1:4096/event

# Fire prompt_async in another terminal
curl -X POST "http://127.0.0.1:4096/session/$SESSION/prompt_async" \
  -H "Content-Type: application/json" \
  -d '{"parts":[{"type":"text","text":"Say hello"}]}'
# Returns 204, but SSE only shows server.connected. Nothing else.

# Compare with sync endpoint (this works fine):
SESSION2=$(curl -s -X POST http://127.0.0.1:4096/session \
  -H "Content-Type: application/json" -d '{}' | jq -r '.id')
curl -s -X POST "http://127.0.0.1:4096/session/$SESSION2/message" \
  -H "Content-Type: application/json" \
  -d '{"parts":[{"type":"text","text":"Say hello"}]}' | jq .info.tokens
# Returns full response with tokens

Environment

  • macOS (Intel)
  • opencode v1.14.44 (binary at ~/.opencode/bin/opencode)
  • Provider: opencode-go (deepseek-v4-flash), also tested with default model (big-pickle). Same result.
  • Health endpoint reports {"healthy":true,"version":"1.14.44"}

Workaround

Fall back to the sync /message endpoint. Works fine but you lose streaming and real-time tool call visibility.

Impact

Anyone using prompt_async + SSE for streaming responses (which is the whole point of the async API) is broken on v1.14.44. The sync endpoint works, so it's not a total outage, but it's a significant regression for API consumers that depend on streaming.

Checked v1.14.45 and v1.14.46 release notes, doesn't look like this was addressed yet.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions