Skip to content

fix(s16): resume teammate after plan approval - #499

Open
ivaris03 wants to merge 1 commit into
shareAI-lab:mainfrom
ivaris03:codex/fix-s16-plan-approval-resume
Open

fix(s16): resume teammate after plan approval#499
ivaris03 wants to merge 1 commit into
shareAI-lab:mainfrom
ivaris03:codex/fix-s16-plan-approval-resume

Conversation

@ivaris03

@ivaris03 ivaris03 commented Aug 1, 2026

Copy link
Copy Markdown

Summary

  • wake an idle teammate when plan_approval_response is received
  • keep each idle inbox batch local so previously consumed messages are not re-injected
  • start a fresh LLM turn after idle inbox activity instead of appending an empty tool-result user message
  • add a deterministic regression test for approval wake-up, context injection, and graceful shutdown

Root cause

The idle loop handled plan_approval_response but did not treat it as a resume signal. When another inbox message did break the idle loop, execution fell through to the tool-result path for a response with no tool calls, appending an empty user content list. The next API call could fail and the teammate thread would exit because that exception is swallowed by the teaching harness.

Validation

  • python -m pytest -q tests/test_s16_team_protocols.py
  • python -m pytest -q (25 passed, 30 subtests passed)
  • python -m py_compile s16_team_protocols/code.py tests/test_s16_team_protocols.py
  • git diff --check

Closes #455

@ivaris03
ivaris03 marked this pull request as ready for review August 1, 2026 11: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.

plan_approval_response 不会唤醒 idle teammate

1 participant