Skip to content

Coordinator hangs waiting for subagent stopped after MaxTurnsExceeded #870

Description

@yehia

Bug

When a child agent reaches MaxTurnsExceeded, Strix marks it as stopped, but the root coordinator can continue waiting indefinitely for a completion message that will never arrive.

Evidence

  • Child agent: 0ccd175e (SQL Injection)
  • Failure: MaxTurnsExceeded: Max turns (500) exceeded
  • Status changed to: stopped
  • Root remained in wait_for_message
  • The run stayed running without further model turns until manually steered

Expected behavior

stopped, failed, crashed, and completed child agents must be treated as terminal states. The root should resume, finalize the scan, and report that the child was capped.

Actual behavior

The root waits for a completion message that cannot arrive, leaving the scan stalled/looped.

Suggested fix

  1. Wake the parent when a child enters any terminal state.
  2. Treat stopped as terminal in coordinator wait logic.
  3. Prevent wait_for_message from waiting on stopped children.
  4. Add a regression test for MaxTurnsExceeded.

Environment

  • Strix target: [redacted-target]
  • Scan mode: deep/full
  • Observed: 2026-07-23/24

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions