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
- Claude adapter,
dev_stall_grace_s = 600.
- Run a story whose dev session hands a slice to a foreground subagent that works for more than 600 s.
- 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.
Description
The #680 idle detector keys on the main session transcript only (
_transcript_activity_key,src/bmad_loop/adapters/generic.py:1750, unchanged onmain@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 journalssession-idlefor a session that is busy.Steps to reproduce
dev_stall_grace_s = 600.Expected behavior
No
session-idlewhile any subagent transcript of the session is growing.Actual behavior
From a real run (bmad-loop 0.13.1):
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/*.jsonlinto the activity key, stat-only, sousage_parser = "none"profiles keep working.Environment
bmad-loop 0.13.1 (
68645cb), Claude Code adapter, macOS.