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
Updated agent/harness/toolautocall so invocable local tool calls still run when the same assistant turn also includes declaration-only schema tools. The middleware now executes the invocable siblings, leaves declaration-only calls actionable for the caller, and marks only the executed local calls informational-only. Added a regression test covering mixed-call ordering.
This was originally intended as a pull request, but GitHub Actions is not permitted to create or approve pull requests in this repository.
The changes have been pushed to branch copilot/dotnet-port-fixes-toolautocall-mixed-calls-d7ea5478fe3d9fd5.
To fix the permissions issue, go to Settings → Actions → General and enable Allow GitHub Actions to create and approve pull requests. See also: gh-aw FAQ
Show patch preview (182 of 182 lines)
From a26c3605f50f7db7c237a0f39de58c066cae389e Mon Sep 17 00:00:00 2001
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Fri, 14 Aug 2026 03:23:30 +0000
Subject: [PATCH] [dotnet-port-fixes] Execute invocable tool siblings
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
agent/harness/toolautocall/autocall.go | 42 ++++++++++++++++-----
agent/harness/toolautocall/autocall_test.go | 39 +++++++++++++++++++
2 files changed, 71 insertions(+), 10 deletions(-)
diff --git a/agent/harness/toolautocall/autocall.go b/agent/harness/toolautocall/autocall.go
index 5be95edbc..03f198756 100644
--- a/agent/harness/toolautocall/autocall.go+++ b/agent/harness/toolautocall/autocall.go@@ -117,6 +117,11 @@ type autocall struct {
enableMessageInjection bool
}
+type functionCallExecutionPlan struct {+ process []*message.FunctionCallContent+ terminate bool+}+
// New creates a new function-invoking chat client that wraps the provided client.
func New(cfg Config) agent.Middleware {
if cfg.NewID == nil {
@@ -292,9 +297,11 @@ func (f *autocall) Run(next agent.RunFunc, ctx context.Context, messages []*mess
return
}
}
+ executionPlan := f.buildFunctionCallExecutionPlan(ctx, functionCallContents, tools)+
// If there's nothing more to do, break out of the loop and allow the handling at the
// end to configure the response with aggregated data from previous requests.
- if i >= f.maximumIterationsPerRequest || hasApprovalRequiringFcc || f.shouldTerminateLoopBasedOnHandleableFunctions(ctx, functionCallContents, tools) {+ if i >= f.maximumIterationsPerRequest || hasApprovalRequiringFcc || (executionPlan.terminate && len(executionPlan.process) == 0) {
// When message injection is enabled, check if any tools enqueued messages
// during this iteration. If so, add them to the conversation and continue
// the loop so the provider sees the new user messages — even though
... (truncated)
Summary
Updated
agent/harness/toolautocallso invocable local tool calls still run when the same assistant turn also includes declaration-only schema tools. The middleware now executes the invocable siblings, leaves declaration-only calls actionable for the caller, and marks only the executed local calls informational-only. Added a regression test covering mixed-call ordering.Ported .NET PRs
aaaa56bc60b6703b305664f196e74b284e425918, based ondotnet/src/Microsoft.Agents.AI/ChatClient/InvocableFunctionBypassingChatClient.csanddotnet/tests/Microsoft.Agents.AI.UnitTests/ChatClient/InvocableFunctionBypassingChatClientTests.cs.Breaking Changes
No.
Tests and Examples
go test ./agent/harness/toolautocallTestFunctionInvoking_MixedInvocableAndNonInvocableSchemaToolExecutesInvocableSiblingNotes
agent/harness/toolautocall; no exported Go API changed.TerminateOnUnknownCallsbehavior for unknown tools and only realigned mixed invocable/declaration-only schema-tool handling.Note
This was originally intended as a pull request, but GitHub Actions is not permitted to create or approve pull requests in this repository.
The changes have been pushed to branch
copilot/dotnet-port-fixes-toolautocall-mixed-calls-d7ea5478fe3d9fd5.Click here to create the pull request
To fix the permissions issue, go to Settings → Actions → General and enable Allow GitHub Actions to create and approve pull requests. See also: gh-aw FAQ
Show patch preview (182 of 182 lines)