Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở Phù hợp với người mới
#519 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@hichipli đang làm issue này rồi.

Từ ngày 30/8/2026.

  • #555 của @hichipli — đang mở

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
84/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
python
Lĩnh vực
ai

Hướng nghiên cứu

Bắt đầu trong s17_autonomous_agents/code.py bằng cách đọc idle_poll(name, ...) và scan_unclaimed_tasks(). Tái hiện đường đi IDLE với một tác vụ in_progress thuộc sở hữu của nó và một tác vụ pending khác, sau đó xác minh hành vi hồi quy được mô tả: teammate tiếp tục tác vụ của mình, quay lại WORK, chèn một resume message và để tác vụ pending không bị nhận.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
Python
Star
79k
Fork
12.6k
Merge trung bình
8 ngày 11 giờ
Pull request đã merge (30 ngày)
7

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của shareAI-lab/learn-claude-code

Tất cả issue của shareAI-lab/learn-claude-code

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.