Skip to content

[dotnet-port-fixes] Execute invocable tool siblings - #863

Open
Michelle Clayton (michelle-clayton-work) wants to merge 1 commit into
mainfrom
copilot/dotnet-port-fixes-toolautocall-mixed-calls-d7ea5478fe3d9fd5
Open

[dotnet-port-fixes] Execute invocable tool siblings#863
Michelle Clayton (michelle-clayton-work) wants to merge 1 commit into
mainfrom
copilot/dotnet-port-fixes-toolautocall-mixed-calls-d7ea5478fe3d9fd5

Conversation

@michelle-clayton-work

Copy link
Copy Markdown
Contributor

Summary

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.

Ported .NET PRs

Breaking Changes

No.

Tests and Examples

  • go test ./agent/harness/toolautocall
  • Added TestFunctionInvoking_MixedInvocableAndNonInvocableSchemaToolExecutesInvocableSibling
  • No examples changed

Notes

  • Kept the fix internal to agent/harness/toolautocall; no exported Go API changed.
  • Preserved existing TerminateOnUnknownCalls behavior for unknown tools and only realigned mixed invocable/declaration-only schema-tool handling.

Generated by .NET to Go Fixes and Test Porting Agent · gpt54 · 212.2 AIC · ⌖ 12.4 AIC · ⊞ 24.2K ·

Closes #842

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings August 18, 2026 21:21
@github-actions github-actions Bot added area:agent Changes files in the agent area size:medium At most 100 changed lines across at most 5 files labels Aug 18, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the agent/harness/toolautocall middleware to correctly handle mixed assistant turns that contain both (a) invocable local function calls and (b) declaration-only (non-invocable) schema tool calls. The middleware now executes the invocable siblings, leaves declaration-only calls actionable for the caller, and only marks the executed local calls as informational-only, with a regression test covering the mixed-call ordering.

Changes:

  • Added an execution-plan step to split function calls into “processable now” vs “terminate after processing” to avoid bypassing invocable siblings.
  • Updated the main loop to use the plan for termination decisions and for selecting which calls to execute/mark informational-only.
  • Added a regression test for mixed invocable + non-invocable schema tool calls to ensure invocable siblings still execute.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
agent/harness/toolautocall/autocall.go Builds and uses a function-call execution plan so invocable siblings execute even when non-invocable schema tools are present.
agent/harness/toolautocall/autocall_test.go Adds regression coverage ensuring mixed-call ordering executes the invocable tool and leaves declaration-only calls actionable.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

Parity Review: ✅ Approved

This PR ports a behavior correction from the upstream .NET implementation (microsoft/agent-framework#7388, commit aaaa56bc) and stays semantically aligned with InvocableFunctionBypassingChatClient.cs.

Scope: Internal to agent/harness/toolautocall — no exported Go APIs were added, removed, or changed.

Parity check:

  • ✅ Go fix mirrors the upstream .NET logic: invocable tool calls in a mixed turn (alongside declaration-only schema tools) are now correctly executed rather than bypassed.
  • ✅ Declaration-only calls are left actionable for the caller, matching upstream semantics.
  • TerminateOnUnknownCalls behavior is preserved unchanged.
  • ✅ No analogous Python surface exists for this middleware layer; Python divergence is not a concern here.

No cross-repo consistency issues found. No public API surface changed — the public-api-change label is not needed.

Generated by Go API Consistency Review Agent for #863 · sonnet46 · 14.1 AIC · ⌖ 5.64 AIC · ⊞ 5.7K ·

@github-actions github-actions Bot added parity-approved Go API consistency review found no parity issues kind:code Changes production behavior or code kind:tests Changes tests, fixtures, or test infrastructure failed-auto-risk Automatic risk classification was inconclusive or failed risk:medium Contained production impact requiring normal review depth and removed failed-auto-risk Automatic risk classification was inconclusive or failed labels Aug 18, 2026

@qmuntal Quim Muntal (qmuntal) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

microsoft/agent-framework#7388 implements a new feature, it doesn't fix a bug, but the Go PR landed as part of the dotnet-port-fixes. AFAIU, this shouldn't have happened. Also, the port seems incomplete, as the .NET feature is opt-in.

@michelle-clayton-work

Copy link
Copy Markdown
Contributor Author

Quim Muntal (@qmuntal) opened up #872 to improve the wording of the workflow prompts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:agent Changes files in the agent area kind:code Changes production behavior or code kind:tests Changes tests, fixtures, or test infrastructure parity-approved Go API consistency review found no parity issues risk:medium Contained production impact requiring normal review depth size:medium At most 100 changed lines across at most 5 files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[dotnet-port-fixes] Execute invocable tool siblings

4 participants