Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

s17: IDLE teammates cannot resume their own in-progress tasks

オープン 初心者向け
#519 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 15 日以内に返信

@hichipli がすでに取り組んでいます。

2026年8月30日 から。

  • #555 @hichipli による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
84/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
静か
技術スタック
python
領域
ai

調査の方向性

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
  1. Create a pending task and start a teammate.
  2. Let the teammate claim the task but end a WORK phase before marking it complete.
  3. Observe that the task is still in_progress with that teammate as owner.
  4. 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

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

shareAI-lab/learn-claude-code のほかの issue

shareAI-lab/learn-claude-code の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。