[BUG] #680 idle detector flags a session idle while a foreground subagent works
维护者通常 1 天内回复
已经有一个关联 PR 被合并了。
- #896 来自 @pbean —— 已合并
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 68/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- python
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Python
- 星标
- 174
- 派生
- 72
- 平均合并
- 1 天 19 分钟
- 30 天内合并 PR
- 85
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
bmad-code-org/bmad-loop 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 69/100
bmad-code-org/bmad-loop#973 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
bmad-code-org/bmad-loop#965 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 72/100
bmad-code-org/bmad-loop#1004 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 49/100
bmad-code-org/bmad-loop#1002 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 36/100
bmad-code-org/bmad-loop#972 ·
维护者通常 1 天内回复
查看 bmad-code-org/bmad-loop 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 88/100
btclib-org/btclib-node#2198 ·
维护者通常 1 天内回复
-
Remove the em dashes from the skill smart-account reference可能已有人在做 @Vamsi-2581 今天认领。 未关闭agent-ready area: docs documentation good first issue
难度 2/5 1-3 小时 新手友好度 74/100
Soneso/stellar-agent-wallet#541 · 2 条评论 ·
维护者通常 1 天内回复
-
good first issue
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
sususweet/midea_auto_cloud#285 ·
维护者通常 1 天内回复
-
2026-11 documentation good first issue gsoc-2027 project: gsoc
难度 2/5 1-3 小时 新手友好度 75/100
alphaonelabs/website#1154 · 1 条评论 ·
维护者通常 1 天内回复