# Output tools and function tools are not executed in parallel tool call order when end strategy is exhaustive
How EndStrategy behaves in pydantic-ai (documented from the implementing PR). 'early' (default): if the model returns text plus tool calls, the text is captured as the final output and no tools run; if it returns tool calls ending in an output tool, only the output tool runs and everything else is skipped on success. 'exhaustive': text is still returned as final output but the tool calls also run; for a sequence like tool_1 -> tool_2 -> output_A -> tool_3 -> deferred_B -> tool_4, everything up to the first deferred tool runs (tool_1, tool_2, output_A, tool_3), then execution stops at deferred_B.
## Context from the issue
gh:pydantic/pydantic-ai#3791: Issue pydantic/pydantic-ai#3791 (closed, 42 comments): ### Description The `EndStrategy` parameter controls how the final result tool is handled. It supports two possible values, `early` and `exhaustive`. https://github.com/pydantic/pydantic-ai/blob/ad5ba4f17834aaf1469bae8f87c7cb5316e65094/pydantic_ai_slim/pydantic_ai/agent/__init__.py#L122-L127 https://github.com/pydantic/pydantic-ai/blob/ad5ba4f17834aaf1469bae8f87c7cb5316e65094/pydantic_ai_slim/pydantic_ai/_agent_graph.py#L865-L866 Both options run output tools before all the other tools. This didn't match with my intuition of how things should work.