Skip to content

fix(agent-teams): resume owned in-progress tasks from IDLE - #555

Open
hichipli wants to merge 1 commit into
shareAI-lab:mainfrom
hichipli:fix/idle-resume-owned-task
Open

fix(agent-teams): resume owned in-progress tasks from IDLE#555
hichipli wants to merge 1 commit into
shareAI-lab:mainfrom
hichipli:fix/idle-resume-owned-task

Conversation

@hichipli

@hichipli hichipli commented Aug 30, 2026

Copy link
Copy Markdown

Summary

  • let an IDLE teammate resume its own unfinished in_progress task befor looking for new work
  • reuse the existing assignment/worktree recovery path for resumed work
  • apply the fix to the current Agent Teams lesson and the integrated harness
  • add one regression test that runs against both lesson implementations
  • keep the English, Chinese, and Japanese lesson documentation synchronized

Context

The lesson numbers have changed since #519 was filed. The affected current implementations are s13_agent_teams and s15_integrated_harness.

Previously, a teammate that ended a model turn without calling complete_task entered IDLE with an owned in_progress task. IDLE only attempted to claim new work, while the task ownership invariant correctly prevented a second claim. The teammate could therefore loop forever without resuming the task it already owned.

The updated order is:

  1. process mailbox messages
  2. resume the teammate's unfinished assignment
  3. atomically claim a new ready task only when no owned task exists

Validation

  • python3 -m unittest tests.test_agent_teams_runtime.AgentTeamsRuntimeTests.test_idle_teammate_resumes_owned_task_before_claiming_new_work
  • python3 -m unittest tests.test_agent_teams_runtime
  • 65 runtime tests passed
  • python3 -m py_compile s13_agent_teams/code.py s15_integrated_harness/code.py tests/test_agent_teams_runtime.py
  • npm run extract from web/
  • the regression test covers both s13_agent_teams and s15_integrated_harness
  • git diff --check
  • the Python examples in the English, Chinese, and Japanese S13 READMEs are byte-for-byte identical

Closes #519.

Check owned in-progress work before idle teammates claim new tasks in both current team runtimes. Reuse the existing assignment/worktree recovery path so mailbox priority and one-task ownership remain unchanged.

Add a cross-lesson regression test, synchronize English, Chinese, and Japanese lesson docs, and regenerate the course website data.

Fixes shareAI-lab#519
@hichipli
hichipli marked this pull request as ready for review August 30, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

1 participant