s17: IDLE teammates cannot resume their own in-progress tasks
メンテナーはふだん 15 日以内に返信
評価
調査の方向性
s17_autonomous_agents/code.py で idle_poll(name, ...) と scan_unclaimed_tasks() を読むことから始めます。所有している in_progress タスクと別の pending タスクを用意して IDLE パスを再現し、説明されているリグレッションの動作を検証します。つまり、teammate が自分のタスクを再開し、WORK に戻り、resume message を注入して、pending タスクを未claimのままにすることを確認します。
索引モデルが issue の本文から書いたものです。
説明
Bug
In the teaching implementation of s17_autonomous_agents/code.py, a teammate can leave tasks it already owns stuck in in_progress and then exit after the 60-second IDLE timeout.
Cause
idle_poll(name, ...) only calls scan_unclaimed_tasks(). That scan accepts only tasks that are:
status == "pending"- unowned
- dependency-ready
It never looks for tasks with status == "in_progress" and owner == name.
Therefore, after a WORK phase ends without a tool_use response (for example, the model returns ordinary text before it has called complete_task), the outer loop enters IDLE. The teammate cannot rediscover its own unfinished task, waits for IDLE_TIMEOUT = 60, sends a final summary, and exits. The task remains owned and in_progress.
Reproduction
- Create a pending task and start a teammate.
- Let the teammate claim the task but end a WORK phase before marking it complete.
- Observe that the task is still
in_progresswith that teammate as owner. - The teammate polls for 60 seconds, finds no unclaimed work, and exits instead of resuming its owned task.
Expected behavior
During IDLE, after handling inbox messages and before claiming new work, a teammate should resume one of its own in_progress tasks. It should return to WORK with that task injected into its messages, rather than timing out.
Minimal fix
Add a helper such as scan_resumable_tasks(owner) to find in_progress tasks owned by the current teammate. In idle_poll, prioritize one resumable task before scan_unclaimed_tasks() and append a message like:
{"role": "user", "content": "<resume-task>Task ...</resume-task>"}
I verified this with a regression test: when Alice owns an in_progress task and another pending task exists, idle_poll("alice", ...) returns "work", injects the owned task, and leaves the pending task unclaimed.
This is a teaching-version bug report; it is not a claim about the production Claude Code scheduler.
- 主要言語
- Python
- スター
- 79.5k
- フォーク
- 12.7k
- 平均マージ
- 11日 19時間
- マージ済み PR(30日)
- 5
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
shareAI-lab/learn-claude-code のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
shareAI-lab/learn-claude-code#583 ·
メンテナーはふだん 15 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
shareAI-lab/learn-claude-code#528 ·
メンテナーはふだん 15 日以内に返信
-
s09: select_relevant_memories 的 "recent" 拼接顺序与切片不合理,不是真正的最近 2k 上下文対応中かも @siri666942 が 79 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
shareAI-lab/learn-claude-code#517 ·
メンテナーはふだん 15 日以内に返信
-
plan_approval_response 不会唤醒 idle teammate再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
shareAI-lab/learn-claude-code#455 ·
メンテナーはふだん 15 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 52/100
shareAI-lab/learn-claude-code#605 ·
メンテナーはふだん 15 日以内に返信
shareAI-lab/learn-claude-code の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
namespace operations
難易度 1/5 1時間未満 初心者へのやさしさ 65/100
EclipseFdn/open-vsx.org#15057 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
FinanceFlash/unvibecode#349 ·
-
Mission statement: why this is free, in the README, Why This Exists and the wiki Home対応中かも @ChiefGyk3D が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
ChiefGyk3D/Clouds-Against-Humanity#348 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
vllm-project/vime#508 ·
メンテナーはふだん 4 日以内に返信