fix(craft): allow 90 seconds for OpenCode session initialization (#15715)

This commit is contained in:
Wenxi authored and GitHub committed 2026-10-08 18:17:20 +00:00
1 parent 45b31b5f41
commit b266a22e31
6 files changed
+109 -3

No files matched your search

@@ -121,10 +121,16 @@ class OpencodeServeClient:
produces the same accumulator as the live stream."""
```
`ClientTimeouts` is a small dataclass with three named timeouts:
`ClientTimeouts` is a small dataclass with four named timeouts:
- `connect_timeout` (default 5s) — TCP/TLS handshake to serve
- `request_timeout` (default 30s) — per-request HTTP for non-streaming endpoints
- `event_read_timeout` (default 60s) — `/event` SSE idle timeout; client reconnects after this
- `session_init_timeout` (default 90s) — HTTP read/write timeout for session lookup and creation in `ensure_session`
Session lookup and creation can initialize a cold directory-scoped OpenCode Instance.
They use a per-request timeout override. Message submission and other requests keep
`request_timeout`; TCP connection and pool waits keep `connect_timeout`.
The initialization timeout is not an overall provisioning deadline.
## Internal architecture