Quitting an in-process chat silently strands its running task
Les mainteneurs répondent en général sous 1 jour
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 52/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- go
- Domaine
- backend, cli, documentation, testing
Piste de recherche
Start with internal/session/task_run_belt.go at cutBeltRun and driveBeltRun, then reproduce the scripted RunEngine scenario described in the issue, including the done-during-close race. Read internal/manual/chat/worker-harness.md:523 for the current promise. Done means the in-process close behavior is explicit and ordered, the e2e and unit acceptance cases pass, and the manual plus change entry are updated.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Found on santos/dev2 at 008363c98 (#1410). It reaches dev when #1410 merges.
What happened
On 2026-09-24, /quit during a /task in codeaf chat --no-host closed the window without warning. The run later read interrupted; its file never landed, and its branch and copy remained. worker-harness.md says closing the window, ctrl+c and /quit do not stop a run and its work lands by itself. The engine road did land in the control run. Related design: #1318.
Replication
Deterministic (no model). In internal/session, use a scripted RunEngine whose worker waits on a channel. Start a belt run, call Agent.Close, release the worker, and inspect the root and target Git tree. Today the close cancels the driver and the non-done result takes the interruption return without landing.
Field (real models). With OPENROUTER_API_KEY, deepseek/deepseek-v4-flash and a throwaway Git repository, ask /task run sleep 45, then write done.txt containing done; while it runs, enter /quit. Allow about two minutes and a few cents. Reopen: done.txt is absent and the run is interrupted. Repeat on the engine road as a control.
Where
internal/session/task_run_belt.go:744, cutBeltRun, cancels the run; driveBeltRun at :795 returns without landing when closing. The unqualified manual promise is internal/manual/chat/worker-harness.md:523.
The fix
Make the close behavior explicit on the in-process road: keep the run alive through an owner able to finish it, or warn before quitting that the run will be interrupted. Make the manual precise for both roads.
Suspicion, not reproduced
From reading the code, not reproduced: Agent.Close cancels the run but never waits on run.over. A run answering done during close may merge into the person's checkout after Close returns. A hand test pressing /quit as the final leaf finishes, plus a session test whose RunEngine.Start answers done just after cancellation and asserts run.over closed before Close returns, would settle this.
Acceptance
- e2e:
codeaf chat --no-hostgives the chosen explicit close warning or completes landing; the run, file and branch match its words. - Unit: close and driver completion have a defined ordering, including the done-during-close race.
- Update
worker-harness.mdand a change entry'sinvalidates.
- Langage dominant
- Go
- Étoiles
- 115
- Forks
- 14
- Merge moyen
- 12 h 24 min
- PR mergées (30 j)
- 310
Préparer son environnement
Nous n'avons pas encore vérifié les fichiers d'installation de ce projet. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
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 Agent-Field/CodeAF
-
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
Agent-Field/CodeAF#1841 ·
Les mainteneurs répondent en général sous 1 jour
-
area:chat bug sev:papercut
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Agent-Field/CodeAF#1805 ·
Les mainteneurs répondent en général sous 1 jour
-
area:session bug sev:papercut
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Agent-Field/CodeAF#1779 ·
Les mainteneurs répondent en général sous 1 jour
-
tasks: a stopped task's commit is signed with the chat model, not the model that did the workOuvertearea:session bug sev:papercut
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Agent-Field/CodeAF#1768 ·
Les mainteneurs répondent en général sous 1 jour
-
area:chat bug sev:papercut
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Agent-Field/CodeAF#1742 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de Agent-Field/CodeAF
Issues similaires
-
Docs: how to get more careful answers (Effort, reasoning models, Reasoning level, Deliberate)Ouvertedocumentation priority:p1
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
yeixio/toskar-core#697 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
keyxmakerx/Chronicle#1532 ·
Les mainteneurs répondent en général sous 1 jour
-
The acquisition fixture's search path skips the argument table production enforces (regression from #285)Peut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Judgment-Pack/judgment-pack-gateway#293 ·
Les mainteneurs répondent en général sous 1 jour
-
[Bug]: 【优化】对话消息底部增加发送时间展示Ouvertebug desktop v3 windows
Difficulté 2/5 1-3 heures Accessibilité débutants 65/100
esengine/DeepSeek-Reasonix#13697 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
good first issue help wanted
Difficulté 1/5 Moins d'une heure Accessibilité débutants 95/100
eugenioenko/ttt#959 ·
Les mainteneurs répondent en général sous 1 jour