Skip to content

test: add integration test for all_pending_tools_resolved? gating with multiple tool calls #773

@BlueHotDog

Description

@BlueHotDog

Context

When an agent issues multiple tool calls in a single response, the agent should NOT resume until ALL tool results have arrived. Interaction.all_pending_tools_resolved?/1 implements this check, but no integration test verifies the gating behavior with partial results.

Missing Invariant

With N pending tool calls:

  • Submitting N-1 results: agent must NOT resume, all_pending_tools_resolved? returns false
  • Submitting the Nth result: agent resumes, all_pending_tools_resolved? returns true

Proposed Test

  1. Start an agent that issues 2+ interactive tool calls
  2. Submit a result for only the first tool call
  3. Assert the agent is still blocked (running but waiting)
  4. Submit a result for the second tool call
  5. Assert the agent resumes and eventually completes

File

apps/frontman_server/test/frontman_server/tasks/execution_test.exs

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