You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python: [Bug]: Executable sibling tool calls are never run when a declaration-only tool call appears in the same model response #8898
When one model response contains a call to a declaration-only tool (FunctionTool(func=None),
answered by the host, for example by asking the user) and a call to an ordinary executable
tool, the Python function invocation layer runs neither. Both calls come back to the caller
as user-input pauses, although the executable tool has a function and needs no approval.
This is the Python counterpart of the .NET bug #6922 ("FunctionInvokingChatClient drops sibling
backend tool calls when a frontend (declaration-only) tool call appears in the same iteration"),
fixed there by #7388 ("Store executable function calls bypassed by declaration-only tool calls").
Code Sample
if has_declaration_only_call:
# Declaration-only calls are returned as user input rather than executed locally.
declaration_only_calls: list[Content] = []
for function_call in function_calls:
if function_call.type == "function_call":
declaration_only_calls.append(_as_user_input_pause(function_call))
return [[function_call] for function_call in declaration_only_calls], False
Error Messages / Stack Traces
Package Versions
agent-framework-core: 1.19.0
Python Version
3.14
Additional Context
The approval path in the same function already handles a mixed batch: executable siblings of an
approval request are stored and run when the approval batch resumes. The declaration-only path
has no equivalent.
changed the title [-]Python: [Bug]: Executable sibling tool calls are never run when a declaration-only tool call appears in the same model response[/-][+].NET: Python: [Bug]: Executable sibling tool calls are never run when a declaration-only tool call appears in the same model response[/+]on Sep 30, 2026
🤖 Automated triage reproduction notes(agent-authored — trust but verify)
Agent analysis
The bug occurs in python/packages/core/agent_framework/_tools.py::_try_execute_function_call_groups, particularly the declaration-only branch at line 2514. A response containing FunctionTool(func=None) and an executable sibling marks both as user-input pauses, and the executable call is absent when the host result resumes the session. Minimal repro: return both calls from a mocked client, resolve the host call in a second Agent.run, and assert that the executable tool ran once.
changed the title [-].NET: Python: [Bug]: Executable sibling tool calls are never run when a declaration-only tool call appears in the same model response[/-][+] Python: [Bug]: Executable sibling tool calls are never run when a declaration-only tool call appears in the same model response[/+]on Sep 30, 2026
A local fix follows the existing approval mixed-batch path: when one response has a declaration-only call and an executable sibling, the executable call is stored and run once after the host function_result, instead of being returned as another user-input pause. I'll open a PR shortly.
Activity
[-]Python: [Bug]: Executable sibling tool calls are never run when a declaration-only tool call appears in the same model response[/-][+].NET: Python: [Bug]: Executable sibling tool calls are never run when a declaration-only tool call appears in the same model response[/+]github-actions commentedon Sep 30, 2026
🤖 Automated triage reproduction notes (agent-authored — trust but verify)
Agent analysis
The bug occurs in
python/packages/core/agent_framework/_tools.py::_try_execute_function_call_groups, particularly the declaration-only branch at line 2514. A response containingFunctionTool(func=None)and an executable sibling marks both as user-input pauses, and the executable call is absent when the host result resumes the session. Minimal repro: return both calls from a mocked client, resolve the host call in a secondAgent.run, and assert that the executable tool ran once.python/packages/core/tests/core/test_function_invocation_logic.py::test_mixed_declaration_only_and_executable_batch_runs_executable_after_host_response1.19.01.19.0[-].NET: Python: [Bug]: Executable sibling tool calls are never run when a declaration-only tool call appears in the same model response[/-][+] Python: [Bug]: Executable sibling tool calls are never run when a declaration-only tool call appears in the same model response[/+]Li-john1021 commentedon Oct 2, 2026
I'll take this.
A local fix follows the existing approval mixed-batch path: when one response has a declaration-only call and an executable sibling, the executable call is stored and run once after the host
function_result, instead of being returned as another user-input pause. I'll open a PR shortly.fix: match declaration-only host pauses by occurrence (microsoft#8898)
fix: run executable sibling tools alongside declaration-only calls (m…
fix: match declaration-only host pauses by occurrence (microsoft#8898)