Quitting an in-process chat silently strands its running task
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
- 52/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- go
- Bereich
- backend, cli, documentation, testing
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Go
- Sterne
- 115
- Forks
- 14
- Ø Merge
- 12 Std. 24 Min.
- Gemergte PRs (30 T.)
- 310
Entwicklungsumgebung
Die Einrichtungsdateien dieses Projekts haben wir noch nicht geprüft. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
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 Agent-Field/CodeAF
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 66/100
Agent-Field/CodeAF#1841 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:chat bug sev:papercut
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Agent-Field/CodeAF#1805 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:session bug sev:papercut
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Agent-Field/CodeAF#1779 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:session bug sev:papercut
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Agent-Field/CodeAF#1768 ·
Maintainer antworten meist innerhalb von 1 Tag
-
area:chat bug sev:papercut
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Agent-Field/CodeAF#1742 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in Agent-Field/CodeAF
Ähnliche Issues
-
good first issue help wanted v3
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
oras-project/oras-go#1621 ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 80/100
Maintainer antworten meist innerhalb von 4 Tagen
-
Chained slog With calls discard previously bound attributesEvtl. vergeben @yuefdev hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
Maintainer antworten meist innerhalb von 1 Tag
-
[scanner] TestAgentNowLineStates hard-fails instead of degrading when node is off PATHEvtl. vergeben @arteeh hat das heute übernommen. Offenagent/scanner ci help wanted kind/test
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
hivecommons/hive#12924 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Gentleman-Programming/engram#1940 ·
Maintainer antworten meist innerhalb von 1 Tag