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

[BUG] #680 idle detector flags a session idle while a foreground subagent works

Chiusa
#858 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #896 di @pbean — integrata

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
68/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
python
Ambito
observability

Direzione di ricerca

Start in src/bmad_loop/adapters/generic.py at _transcript_activity_key (around line 1750) and trace how the idle detector uses that activity key. Check how the Claude adapter locates session transcript directories; the issue proposes stat-only tracking of subagent *.jsonl files so profiles with usage_parser = "none" continue to work. Done means a growing subagent transcript prevents a false session-idle notice; run or add coverage for that behavior.

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

Descrizione

Description

The #680 idle detector keys on the main session transcript only (_transcript_activity_key, src/bmad_loop/adapters/generic.py:1750, unchanged on main @ d09a324a6). Claude Code writes a subagent's turns to its own file, ~/.claude/projects/<project>/<session-id>/subagents/agent-*.jsonl. While a foreground subagent works, the parent transcript does not change, so the detector journals session-idle for a session that is busy.

Steps to reproduce
  1. Claude adapter, dev_stall_grace_s = 600.
  2. Run a story whose dev session hands a slice to a foreground subagent that works for more than 600 s.
  3. Read the run journal.
Expected behavior

No session-idle while any subagent transcript of the session is growing.

Actual behavior

From a real run (bmad-loop 0.13.1):

{"kind": "session-idle",   "task_id": "...-dev-1", "idle_s": 604.737, "threshold_s": 600.0, ...}
{"kind": "session-active", "task_id": "...-dev-1", "idle_s": 846.486, ...}

The session was running a foreground subagent for those 846 s. The notice is observability only, but it reads as a stuck session in the journal and the TUI.

Suggested fix

Fold the newest (mtime_ns, size) of <transcript dir>/<session-id>/subagents/*.jsonl into the activity key, stat-only, so usage_parser = "none" profiles keep working.

Environment

bmad-loop 0.13.1 (68645cb), Claude Code adapter, macOS.

Lingua principale
Python
Stelle
160
Fork
68
Merge medio
1g 6h
PR unite (30g)
90

Preparare l'ambiente

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 bmad-code-org/bmad-loop

Tutte le issue di bmad-code-org/bmad-loop

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.