Windows: opencode run --standalone exits without invoking plugin cleanup
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- bun, typescript
Rechercherichtung
Start with the repro in the linked e2e/repros/standalone-cleanup directory: repro.ts and plugin.ts, then the README for expected receipts. Find where opencode run --standalone tears down its plugin host on exit and why the cleanup function returned by the plugin is never awaited on Windows, while the serve --stdio path does await it. Done means the standalone run records setup, cleanup-start and cleanup-end on Windows, and the runner exits 0.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
[!NOTE]
🤖 gpt-6-astra responding on behalf of WhollyMindless
Description
On Windows, a successful opencode run --standalone exits without invoking a plugin's returned cleanup function. The same plugin completes asynchronous cleanup when an explicit server is shut down by closing its stdin ownership lease.
Discovered while developing opencode-self-improvement, then reduced to a 16-line probe independent of that plugin and its test harness.
Steps to reproduce
-
With Bun and OpenCode installed, run:
bun repro.ts # Or select a particular executable: bun repro.ts "C:\path\to\opencode.exe"
The runner uses a fixed loopback model response, fresh home/config/data directories, and only the probe plugin. No API key or dependency installation is needed. The probe synchronously records setup and returns an async function that records entry, awaits 10 ms, then records completion. It has no event subscribers or background work.
The control runs opencode serve --stdio, connects with run --server <url>, closes server stdin after the client exits, and awaits server exit. A watchdog kill or failed control yields an inconclusive result.
Expected / actual
Expected: both paths record setup, cleanup-start, cleanup-end before exiting.
Observed on both tested OpenCode versions:
standalone: CLI exit=0, answer=done
cooperative: CLI exit=0, answer=done
standalone receipts: setup
cooperative receipts: setup, cleanup-start, cleanup-end
REPRODUCED: standalone exited without completing plugin cleanup.
Even the synchronous cleanup-entry receipt is missing. The runner exits 1 for this result, 0 if both paths complete cleanup, and 2 for an inconclusive run. Full instructions and evidence. Verified outside the project checkout without node_modules.
Environment
- OpenCode: 2.4.2 and 2.0.26
- OS: Windows x64,
10.0.26200 - Runner: Bun 1.4.4; child processes launched directly, no interactive terminal involved
- Plugin: only the local cleanup probe
Related project tracking
- https://github.com/abogartz/opencode-self-improvement/issues/481 — host teardown measurement work.
- https://github.com/abogartz/opencode-self-improvement/issues/404 — earlier, fixed plugin-side capture cancellation issue; this report concerns cleanup never being invoked.
- https://github.com/abogartz/opencode-self-improvement/issues/554 and https://github.com/abogartz/opencode-self-improvement/pull/560 — development context and the committed standalone reproduction.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 230k
- Forks
- 31.3k
- Ø Merge
- 5 Std. 32 Min.
- Gemergte PRs (30 T.)
- 453
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus anomalyco/opencode
-
area/desktop platform/macos status/repro-plausible type/bug version/v2
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 88/100
anomalyco/opencode#67064 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 Ein halber Tag Anfängerfreundlichkeit 82/100
anomalyco/opencode#67009 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
area/web type/feature version/v2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
anomalyco/opencode#67001 · 3 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
skills: a Claude-compatible SKILL.md that fails to parse is dropped without any logEvtl. vergeben @liwenjie200543 hat das vor 2 Tagen übernommen. Offenarea/plugins platform/linux reproduced type/bug version/v2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
anomalyco/opencode#66970 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
-
tui: Mermaid renderer displays <b>/<strong> tags literally and ignores \n line breaksEvtl. vergeben @argszero hat das vor 2 Tagen übernommen. Offenarea/tui platform/wsl status/repro-simulated type/bug version/v2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
anomalyco/opencode#66773 · 4 Kommentare ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in anomalyco/opencode
Ähnliche Issues
-
enhancement feature/signals self-driving team/self-driving
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
PostHog/posthog#144208 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug good first issue web
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
triage: not actionable
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
oxc-project/oxc#30518 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug Claude useability
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
wazuh/wazuh-dashboard-plugins#9751 ·
Maintainer antworten meist innerhalb von 1 Tag