# Send a message and wait for the turn result in one request

> The sessions API can now hold a message request open until the turn finishes, and Framework runs accept a timeout, for callers that do not consume SSE.

Source: <https://everruns.com/docs/changelog/2026-09-12-wait-for-message-completion/>

Date: 2026-09-12
Products: Platform, Cloud, Framework
Category: Feature
Available: In 0.26.0
Pull request: everruns/everruns#3541

Callers that want a result instead of an event stream can now wait for it.

**In the API:** `POST /v1/sessions/{id}/messages?wait=true` returns `200` with the turn result when the turn completes or fails, or `202` with partial messages when `timeout_ms` (default 120 s, at most 600 s) expires. Without `wait` it still returns `201` immediately, so existing clients are unaffected.

**In code:** `RunOptions::timeout` bounds `Session::run_with`; when it expires the in-process turn is cancelled and its outcome returned.

See [Sessions](https://everruns.com/docs/framework/sessions/) and [Stream events](https://everruns.com/docs/how-to/stream-events/). [#3541](https://github.com/everruns/everruns/pull/3541)