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
- Start an agent that issues 2+ interactive tool calls
- Submit a result for only the first tool call
- Assert the agent is still blocked (running but waiting)
- Submit a result for the second tool call
- Assert the agent resumes and eventually completes
File
apps/frontman_server/test/frontman_server/tasks/execution_test.exs
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?/1implements this check, but no integration test verifies the gating behavior with partial results.Missing Invariant
With N pending tool calls:
all_pending_tools_resolved?returns falseall_pending_tools_resolved?returns trueProposed Test
File
apps/frontman_server/test/frontman_server/tasks/execution_test.exs