Max hours ends chat but leaves its delegated run running
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
- 55/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- Active
- Stack technique
- go
- Domaine
- backend, cli, documentation, testing-qa
Piste de recherche
Start with Agent.launchBudgetBlockLocked in internal/session/interactive_budget.go, v3LaunchShape in cmd/codeaf/chatv3_local.go, and Agent.CancelWithReason in internal/session/cancel.go to trace the conversation time-limit path and delegated-run ownership. Run the specified tmux e2e scenarios and add unit coverage for terminal time-limit paths. Done means owned runs stop and settle before the error, spend remains stable, the no-limit control keeps running, and both manual pages quote the required strings.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
What happened
PRE-EXISTING defect seen on commit 17ae56d34 (staging-20260921-17ae56d3496f) on 2026-09-21 and also on v0.3.0 (9258f7052). Lane A1, item A1-10, launched chat with --max-hours 0.01; both versions eventually printed:
error: conversation time limit reached · start a new conversation or relaunch with a larger --max-hours
The delegated run continued after the advertised interactive conversation: 36s: current staging stayed running past 1m 40s, v0.3.0 past 1m, and the rail and spend continued rising.
Replication
Deterministic (no model).
No no-model reproduction is established; lane A1 exercised the conversation wall around a live delegated run.
Field (real models).
Set OPENROUTER_API_KEY, then start a fresh local chat with the short conversation wall:
root="$(mktemp -d)"; export CODEAF_HOME="$root/home"; repo="$root/repo"
mkdir -p "$CODEAF_HOME" "$repo" && git -C "$repo" init -q
git -C "$repo" -c user.name=Test -c [email protected] commit --allow-empty -m base
cd "$repo" && codeaf chat --no-host --yolo --max-hours 0.01 --model deepseek/deepseek-v4-flash
Enter /task write numbers 1 through 2000, sleeping one second after each number and wait past 36 seconds. Today the exact time-limit error appears while the task remains running and spend rises.
Allow about two minutes and $0.05. Run the same steps on v0.3.0 as the control; it has the same defect.
Where
The launch wall is shaped by Agent.launchBudgetBlockLocked in internal/session/interactive_budget.go and v3LaunchShape in cmd/codeaf/chatv3_local.go; delegated-run cancellation flows through Agent.CancelWithReason in internal/session/cancel.go. The evidence shows the lifecycle split but not its cause.
The fix
When the conversation reaches --max-hours, stop every delegated run owned by that conversation before printing the terminal error. Each stopped run should name a time limit you set stopped it, and no later model usage may be charged to it.
Acceptance
- e2e: Through tmux
codeaf chat --no-host --max-hours 0.01with a stub long-running task, assert the exact conversation error, a run reason ofa time limit you set stopped it, norunningtask, stable spend, and exit 0. - e2e: Through the same chat without
--max-hours, assert the stub remainsrunningpast 36 seconds until the person stops it, proving the wall owns the cancellation. - Unit: Every terminal conversation-time-limit path calls cancellation and waits until all conversation-owned runs are non-running before emitting the error.
- The manual pages
internal/manual/chat/running-from-the-terminal.mdandinternal/manual/chat/task-controls.mdquote both time-limit strings, and the change entry'sinvalidatesnames the old belief that--max-hoursgoverned only the foreground conversation.
Filed from the 2026-09-21 staging verification of 17ae56d34; the lane reports, frames and e2e logs are in the owner's handoff folder for this promotion.
- Langage dominant
- Go
- Étoiles
- 115
- Forks
- 14
- Merge moyen
- 9 h 37 min
- PR mergées (30 j)
- 755
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
-
area:chat bug sev:papercut
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
Agent-Field/CodeAF#1592 ·
Les mainteneurs répondent en général sous 1 jour
-
area:headless bug sev:critical
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
Agent-Field/CodeAF#1566 · 1 personne assignée ·
Les mainteneurs répondent en général sous 1 jour
-
area:chat feature
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
Agent-Field/CodeAF#1510 ·
Les mainteneurs répondent en général sous 1 jour
-
area:tests bug
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
Agent-Field/CodeAF#1489 ·
Les mainteneurs répondent en général sous 1 jour
-
area:chat bug good first issue sev:papercut
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Agent-Field/CodeAF#1470 ·
Les mainteneurs répondent en général sous 1 jour
Toutes les issues de Agent-Field/CodeAF
Issues similaires
-
Remove CAAPFOuvertekind/chore kind/cleanup needs-area
Difficulté 2/5 1-3 heures Accessibilité débutants 86/100
rancher/turtles#2848 · 3 commentaires ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 1 jour
-
good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
Les mainteneurs répondent en général sous 1 jour
-
priority: low 🌱 type: enhancement 💅🏼
Difficulté 2/5 Une demi-journée Accessibilité débutants 84/100
nebari-dev/llm-serving-pack#199 ·
Les mainteneurs répondent en général sous 3 jours
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
kedacore/keda#8225 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour