Skip to content

fix(service): validate subagent HITL confirm against worker SSOT and cascade interrupt - #2327

Open
REISEN2330 wants to merge 1 commit into
agentscope-ai:mainfrom
REISEN2330:fix/2324-hitl-confirm-ssot
Open

fix(service): validate subagent HITL confirm against worker SSOT and cascade interrupt#2327
REISEN2330 wants to merge 1 commit into
agentscope-ai:mainfrom
REISEN2330:fix/2324-hitl-confirm-ssot

Conversation

@REISEN2330

Copy link
Copy Markdown

Fixes #2324

What

Two guards around the subagent HITL confirm loop:

  1. POST /chat's confirm-routing branch now checks the worker's SSOT
    (_worker_still_asking) before enqueueing the resume. When the worker
    is no longer parked on the ASKING tool call, the stale card is cleared
    (projection delete + subagent_user_confirm_result publish) and the
    endpoint returns 409 — so the front-end stops re-posting the same
    UserConfirmResultEvent (previously 437x) instead of spinning forever.
  2. POST /sessions/{id}/interrupt now cascades to team members: parked
    HITL runs are interrupted via resume triggers carrying
    UserInterruptEvent, and their projected cards are purged, so the
    card can no longer survive an interrupt.

Verification

  • pre-commit run --all-files clean
  • pytest tests/chat_router_hitl_test.py -v — 3 new regression tests pass
  • pytest tests/hitl_user_confirmation_test.py tests/service_subagent_hitl_projector_test.py -q — 16 pass

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.

[Bug]: Subagent HITL confirm card spins forever; every click logs "Agent is not waiting for user confirmation" (same event re-posted 400+ times)

1 participant