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
Session stops on a dropped connection when the provider wraps the network error #53396
If the internet or DNS drops for a moment, the session stops with an error instead of retrying.
Session retry only checks the error message against patterns like getaddrinfo or enotfound. Provider plugins often wrap the socket error. For example, cursor-opencode-provider throws CursorTransportError("Cursor HTTP/2 connection failed") with the original ENOTFOUND error on .cause. The message doesn't match, so the session errors out on the first attempt.
Thanks for the detailed report and for tracking down the cause, @moritzWa.
This looks like OpenCode v1 (opencode-ai 0.x/1.x). Your PR #53397 changes the v1 retry code, and the 5-retry budget and message-pattern matching you describe are v1 behaviour. v1 now only gets critical fixes (data loss, security problems, crashes with no workaround). A session stopping after a brief network drop can be worked around by resending the prompt, so this is unlikely to be fixed in v1.
We'd encourage you to try v2 (@opencode/cli, the opencode command). Its retry logic was rewritten: it decides from structured provider errors instead of matching message text, and it allows more retries with backoff. cursor-opencode-provider also ships a v2 plugin entry (cursor-opencode-provider/plugin/opencode2).
If this also happens on v2, please reply with your opencode --version and the error or log line you see, and we'll take another look. Please also reply if you think this is critical.
We haven't heard back, so I'm closing this as not planned. Retrying network errors that a provider wraps (like CursorTransportError with ENOTFOUND on .cause) is a v1 retry problem, and v1 only gets critical fixes now.
v2 (@opencode/cli) has a different retry implementation. It decides from structured provider errors instead of matching message text. If you see the same thing on v2, please open a new issue with your opencode --version and the error or log line, and we'll take a look. Thanks again for the detailed report and the PR (#53397).
Activity
github-actions commentedon Oct 5, 2026
This issue might be a duplicate of an existing issue. Please check:
opencodejr commentedon Oct 27, 2026
Thanks for the detailed report and for tracking down the cause, @moritzWa.
This looks like OpenCode v1 (
opencode-ai0.x/1.x). Your PR #53397 changes the v1 retry code, and the 5-retry budget and message-pattern matching you describe are v1 behaviour. v1 now only gets critical fixes (data loss, security problems, crashes with no workaround). A session stopping after a brief network drop can be worked around by resending the prompt, so this is unlikely to be fixed in v1.We'd encourage you to try v2 (
@opencode/cli, theopencodecommand). Its retry logic was rewritten: it decides from structured provider errors instead of matching message text, and it allows more retries with backoff.cursor-opencode-provideralso ships a v2 plugin entry (cursor-opencode-provider/plugin/opencode2).If this also happens on v2, please reply with your
opencode --versionand the error or log line you see, and we'll take another look. Please also reply if you think this is critical.Related:
opencodejr commentedon Oct 28, 2026
We haven't heard back, so I'm closing this as not planned. Retrying network errors that a provider wraps (like
CursorTransportErrorwithENOTFOUNDon.cause) is a v1 retry problem, and v1 only gets critical fixes now.v2 (
@opencode/cli) has a different retry implementation. It decides from structured provider errors instead of matching message text. If you see the same thing on v2, please open a new issue with youropencode --versionand the error or log line, and we'll take a look. Thanks again for the detailed report and the PR (#53397).