[FEATURE]: desktop: abort session when its conversation tab is closed
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- typescript
- Ambito
- desktop
Direzione di ricerca
Start in packages/app/src/context/tabs.tsx, where closeTab calls removeTab and never calls session.abort. Check how the Stop action calls session.abort or session.interrupt so the tab-close path can reuse it. Done means closing a tab with a setting enabled stops the running session, and the existing close behaviour stays unchanged when the setting is off. The default (opt-in or on) still needs a maintainer decision.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Feature hasn't been suggested before.
- I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
Problem
In OpenCode Desktop, closing a conversation tab only removes the UI view. The agent keeps running on the server and keeps appending messages/tokens after the tab is closed. There is no setting or hook to make a tab close stop the session, so an abandoned tab can burn tokens indefinitely.
Proposal
Add an option (and/or make it the default) to abort the session's active run when its conversation tab is closed, equivalent to pressing Stop (session.abort / session.interrupt). Suggested behavior:
- Setting: "Stop session when its tab is closed" (opt-in, or on by default).
- Applies to the tab close button (X) and to
Ctrl/Cmd+W. - Optional modifier (e.g.
Ctrl+Shift+W) to close without stopping, for users who want the current behavior.
Why it matters
- Prevents abandoned sessions from consuming tokens and writing history.
- Matches the natural expectation that closing the conversation ends it.
- Complements
session.idle: closing a tab is a clear signal the user is done with that run.
Current behavior and workarounds
packages/app/src/context/tabs.tsxcloseTab->removeTabremoves the tab only; it does not callsession.abort.opencode:session-tabs-removedis dispatched only by archive/delete/server-removal paths, not by user-initiated tab close, so a GUI plugin cannot hook the X button.- Workaround today: press Stop before closing, or run a watchdog that interrupts long-running sessions.
- A GUI plugin can register a command bound to a key that calls
session.interruptthencommands.run("tab.close"), but it cannot intercept the X button.
Environment
- OpenCode Desktop 2.3.0 (opencode-cli 2.3.0), Windows x64.
- Reproduced consistently by closing a tab while a multi-step agent run is in progress.
- Lingua principale
- TypeScript
- Stelle
- 230k
- Fork
- 31.3k
- Merge medio
- 5h 32m
- PR unite (30g)
- 453
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di anomalyco/opencode
-
area/desktop platform/macos status/repro-plausible type/bug version/v2
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
anomalyco/opencode#67064 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 Mezza giornata Idoneità per principianti 82/100
anomalyco/opencode#67009 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
area/web type/feature version/v2
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
anomalyco/opencode#67001 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
skills: a Claude-compatible SKILL.md that fails to parse is dropped without any logForse già presa @liwenjie200543 l’ha presa 2 giorni fa. Apertaarea/plugins platform/linux reproduced type/bug version/v2
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
anomalyco/opencode#66970 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
tui: Mermaid renderer displays <b>/<strong> tags literally and ignores \n line breaksForse già presa @argszero l’ha presa 2 giorni fa. Apertaarea/tui platform/wsl status/repro-simulated type/bug version/v2
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
anomalyco/opencode#66773 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di anomalyco/opencode
Issue simili
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
ci
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
ClickHouse/clickhouse-js#1248 ·
I maintainer di solito rispondono entro 1 giorno
-
E2E: Darlehen-Test wartet auf die gebuchte Auszahlung, bevor er zur Liquiditätsvorschau wechseltApertatechnik
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
SR5-FoundryVTT/SR5-FoundryVTT#2162 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
AhmedNAgy25/analysor#25 ·
I maintainer di solito rispondono entro 1 giorno