Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Quitting an in-process chat silently strands its running task

Aperta
#1,452 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
go

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area:chat area:session bug sev:serious

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-host gives 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.md and a change entry's invalidates.
Lingua principale
Go
Stelle
115
Fork
14
Merge medio
9h 38m
PR unite (30g)
730

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Agent-Field/CodeAF

Tutte le issue di Agent-Field/CodeAF

Issue simili

Altre issue su Go

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.