[FEATURE]: desktop: abort session when its conversation tab is closed
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Fonctionnalité
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- typescript
- Domaine
- desktop
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- TypeScript
- Étoiles
- 230k
- Forks
- 31.3k
- Merge moyen
- 5 h 32 min
- PR mergées (30 j)
- 453
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
-
area/desktop platform/macos status/repro-plausible type/bug version/v2
Difficulté 1/5 1-3 heures Accessibilité débutants 88/100
anomalyco/opencode#67064 · 4 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 Une demi-journée Accessibilité débutants 82/100
anomalyco/opencode#67009 · 2 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
area/web type/feature version/v2
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
anomalyco/opencode#67001 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
skills: a Claude-compatible SKILL.md that fails to parse is dropped without any logPeut-être pris @liwenjie200543 l’a pris il y a 2 jours. Ouvertearea/plugins platform/linux reproduced type/bug version/v2
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
anomalyco/opencode#66970 · 4 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
tui: Mermaid renderer displays <b>/<strong> tags literally and ignores \n line breaksPeut-être pris @argszero l’a pris il y a 2 jours. Ouvertearea/tui platform/wsl status/repro-simulated type/bug version/v2
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
anomalyco/opencode#66773 · 4 commentaires ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de anomalyco/opencode
Issues similaires
-
enhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
ci
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
ClickHouse/clickhouse-js#1248 ·
Les mainteneurs répondent en général sous 1 jour
-
E2E: Darlehen-Test wartet auf die gebuchte Auszahlung, bevor er zur Liquiditätsvorschau wechseltOuvertetechnik
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 67/100
SR5-FoundryVTT/SR5-FoundryVTT#2162 ·
Les mainteneurs répondent en général sous 1 jour
-
enhancement good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
AhmedNAgy25/analysor#25 ·
Les mainteneurs répondent en général sous 1 jour