[Bug] Windows: shell tool dies process-wide with "opencode-pty request timed out" after long service-mode session; only full reboot recovers
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Accessibilité débutants
- 12/100
- Type d'issue
- Bug
- Clarté
- À clarifier
- Activité
- Active
- Stack technique
- powershell, typescript
- Domaine
- backend
Piste de recherche
Start from the shell/PTY tool path in the TypeScript server and the source of the opencode-pty request timed out error, then reproduce with serve --service on Windows and inspect the managed-service logs around the run= id and shell-output 404/499 entries. Read #61644 for ConPTY teardown and #52049/#53416 for managed-service replacement before changing anything. The goal is a minimal trigger and a distinct dead-PTY error, not a patch from this thread.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Description
On Windows, after several hours of continuous use of opencode serve --service, the shell tool stopped working process-wide. Every command — including echo hi — failed immediately with:
opencode-pty request timed out
The failure was instant, not after the requested tool timeout. It affected the main session, subagents, other existing sessions, and brand-new sessions created afterwards: no session on that server instance had a working shell. File tools (read/write/edit/grep/glob), web search and model calls kept working, and the local model server stayed healthy, so the machine itself was fine.
I was connected through the Android client and could not restart the desktop process. Restarting the OpenCode client/app did not help: the server log shows no new cli starting line, and every entry kept run=c9657fd3 from the original 05:07:54Z start. A full Windows reboot fixed it immediately — the log then shows two fresh managed-service starts, at 13:36:12Z (run=63e68047, v2.3.0) and 13:36:18Z (run=b9a8957b, v2.3.2 after auto-update).
So a client restart is not enough; only a machine reboot cleared the wedged PTY service.
Plugins
None.
OpenCode version
2.3.0 at failure (channel=latest, local=false, args="[\"serve\",\"--service\"]"). Rebooted into 2.3.2 via auto-update.
Steps to reproduce
- Run OpenCode 2.3.0 on Windows in service mode (
serve --service) for several hours. - Connect from the Android app, open and switch several workspaces, and run many shell commands including at least one backgrounded command.
- Shell requests begin failing instantly with
opencode-pty request timed out. Confirm fresh sessions and subagents fail identically. - Restart the client app: no help, the managed service keeps the same
run=id. Perform a full OS reboot: fixed.
I cannot confirm which step is causal. This is what happened, not a minimised reproducer.
Operating System
Windows (PC; exact build not recorded).
Terminal
OpenCode Android app as remote client; the desktop service spawned C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.EXE.
Evidence
Verbatim opencode.log lines (UTC):
2026-11-20T05:07:54.425Z ... message="cli starting" version=2.3.0 channel=latest local=false args="[\"serve\",\"--service\"]" run=c9657fd3
2026-11-20T06:20:40.167Z ... GET /api/shell/sh_.../output http.status=499
2026-11-20T06:27:41.949Z ... GET /api/shell/sh_.../output http.status=404
2026-11-20T06:43:47.132Z ... POST /api/experimental/session/<id>/wait http.status=499
2026-11-20T13:36:12.541Z ... message="cli starting" version=2.3.0 ... run=63e68047
2026-11-20T13:36:18.083Z ... message="cli starting" version=2.3.2 ... run=b9a8957b
Notes on the evidence: the exact string opencode-pty request timed out was not in opencode.log; it was returned by the tool layer to the agent. The 499s are client-cancelled long polls and also occur on earlier days, so they are context, not proof of cause. The shell-output 404 suggests the backgrounded shell disappeared. The strongest discriminator is that a brand-new session failed identically, so this is not session-local state.
Related issues
- #61644 — Windows ConPTY teardown hangs, leaked
OpenConsole.exe, same error string; open and still reproducing at v2.3.0. The hang also occurs when deleting a session removes its terminals. - #52049 / #53416 — Windows managed service replacement can lose persistent terminals.
- #63384 — browser/attach RPC hangs producing long 499s alongside
/api/event.
Questions for maintainers
- Is there a supported way to restart only the shell/PTY subsystem from a client or an HTTP endpoint, without killing the session?
- Should a dead PTY service return a distinct, actionable error instead of a generic request timeout?
- Was anything in 2.3.2 changed in this area, or should I re-test on the latest build?
- Langage dominant
- TypeScript
- Étoiles
- 227k
- Forks
- 30.7k
- Merge moyen
- 3 h 57 min
- PR mergées (30 j)
- 484
Préparer son environnement
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Lire le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de anomalyco/opencode
-
[Site] Active section detection should respect scroll-margin-topPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouvertearea/web reproduced type/bug
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
anomalyco/opencode#65384 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
area/cli type/feature version/v2
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
anomalyco/opencode#65379 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Shell tool: no upper bound on the timeout a model can ask for, so one call can hold a turn for hoursOuvertearea/core platform/linux type/feature version/v2
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
anomalyco/opencode#65254 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
inference/go type/feature
Difficulté 1/5 1-3 heures Accessibilité débutants 72/100
anomalyco/opencode#65148 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
area/providers type/feature version/v2
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
anomalyco/opencode#64845 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de anomalyco/opencode
Issues similaires
-
[Provider] antigravity-acp catalog omits gemini-4-hydrogen and gemini-4-neon that agy acp offersPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouvertecatalog provider provider-compatibility
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
lidge-jun/opencodex#9037 · 1 commentaire · 1 réaction ·
Les mainteneurs répondent en général sous 1 jour
-
Project submission: xmcp DocsOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 62/100
slavakurilyak/awesome-ai-agents#1005 ·
-
kind/bug triage/unresolved
Difficulté 2/5 1-3 heures Accessibilité débutants 60/100
Les mainteneurs répondent en général sous 1 jour
-
effort:S P3 refactor
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
nightscout/nocturne#3735 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
wpilibsuite/systemcore-blocks-interface#641 ·
Les mainteneurs répondent en général sous 2 jours