v2: WebSocket idle-timeout bypasses the 3-timeout retry cap, so a dead stream can hold a step for hours
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 78/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- typescript
Línea de trabajo
Lee packages/core/src/model-retry.ts, especialmente la política MAX_TIMEOUT_RETRIES y la prueba existente del timeout HTTP. Comprueba cómo el motivo del reintento expone el código WebSocket idle-timeout; después, añádelo al límite de timeouts y cubre ese caso en la prueba de la política. La tarea está completa cuando los reintentos de idle-timeout se detengan en el mismo límite que los timeouts HTTP.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Description
A WebSocket stream that goes silent fails with transport code idle-timeout after 30 minutes (packages/core/src/session/model-transport.ts:418-424, IDLE_TIMEOUT = "30 minutes"). The retry policy only counts code === "Timeout" toward MAX_TIMEOUT_RETRIES = 3 (packages/core/src/model-retry.ts:53). So an idle-timeout falls under the general 10-retry allowance, and one dead step can hold a session or subagent for hours.
This shows up after a laptop sleeps or the network drops with agents mid-run. On a v2.0.32 install over one week, 264 model requests failed on transport and took 54.8 request-hours. One review subagent spent 243 of its 256 minutes in 9 failed requests ("Timed out waiting for WebSocket data", "WebSocket closed with code 1006"), each about 15-40 min. The agent also sees these as failed tool calls with empty input (patch {}), so it changes its own behavior instead of recognising a provider stall.
Expected: an idle-timeout counts toward the timeout cap like an HTTP Timeout, the same reasoning as the comment above MAX_TIMEOUT_RETRIES.
Possible fix: in model-retry.ts, count reason.code === "idle-timeout" (WebSocket) along with "Timeout", plus a policy test next to the existing HTTP timeout test.
Plugins
Local plugins only (cache TTL, cost); none touch transport or retry.
OpenCode version
2.0.32 (code references from dev at ce15cd882)
Steps to reproduce
- Start a long task on an OpenAI model over the Responses WebSocket transport.
- Put the machine to sleep, or block network egress, mid-stream for a few minutes, then restore it.
- The step waits 30 min for
idle-timeout, then retries under the general allowance instead of the 3-timeout cap.
Operating System
macOS 27
Terminal
OpenCode TUI
- Lenguaje dominante
- TypeScript
- Estrellas
- 221k
- Forks
- 29.6k
- Merge medio
- 4 h 35 min
- PR fusionados (30 d)
- 521
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de anomalyco/opencode
-
triaging
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
anomalyco/opencode#58821 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
anomalyco/opencode#58774 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
anomalyco/opencode#58725 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Snapshot capture failure (EPERM spawning git) fails the whole step despite the best-effort contractPosiblemente ocupada @Dopetaiga la tomó hace 1 día. Abiertoreproduced
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
anomalyco/opencode#58685 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
tui: PHP code blocks without `<?php` are not syntax highlightedPosiblemente ocupada @SwastikTripathi la tomó hace 1 día. Abiertoreproduced
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
anomalyco/opencode#58664 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de anomalyco/opencode
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
microsoft/playwright#43640 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
grasshopper-protocol/grsshppr#172 ·
Los mantenedores suelen responder en 1 día
-
bug help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Tencent/teamai-cli#1397 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
DouyinFE/semi-design#3641 ·
Los mantenedores suelen responder en 3 días
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 1 día