Skip to content

ADKRuntime._run_swarm raises IndexError on empty/misconfigured team #3

Description

@fulfarodev

Minor robustness gap found during ADKRuntime review.

Location: astromesh-adk/astromesh_adk/runner.pyADKRuntime._run_swarm.

Issue: entry = team.entry_agent or team.agents[0] raises an unguarded IndexError when a swarm AgentTeam is constructed with neither entry_agent nor any agents. A misconfigured team should fail with a clear, actionable error instead.

Ask: raise a descriptive ValueError (e.g. "swarm team '' has no entry_agent and no agents") when both are absent. Consider the same guard for any other pattern that indexes team.agents[0].

Severity: low. Only triggers on caller misconfiguration; no impact on the Clarus path (which doesn't use swarm).

Filed as a follow-up by the ADKRuntime work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions