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
Aligns the TodoList_Complete tool in agent/harness/todo with the upstream .NET change from PR microsoft/agent-framework#5902. The .NET implementation changed the complete tool's input from a plain list of integer IDs to a structured list of {id, reason} objects, requiring agents to provide a reason describing how each item was completed. This improves auditability of todo item lifecycle events.
Changes made:
Added CompleteInput struct with ID int and Reason string fields
Updated TodoList_Complete tool to accept []CompleteInput instead of []int
Updated tool description to mention the reason field
Updated default instructions to prompt agents to "Include a reason describing how the items were completed"
Updated all existing tests to use the new input format
Added two new tests: TestCompleteTodos_WithReason and TestCompleteToolDescription_MentionsReason
(Only the TodoList_Complete reason requirement is ported here. The SubAgents→BackgroundAgents rename is in .NET-specific Harness infrastructure with no current Go equivalent.)
Breaking Changes
Yes. The TodoList_Complete tool previously accepted []int (a list of IDs). It now accepts []CompleteInput where each entry is {"id": <int>, "reason": "<string>"}. Any agent or integration that calls TodoList_Complete with plain integers will receive a JSON deserialization error. Since the Go SDK is in beta this is acceptable; agents driven by LLMs will naturally adapt once the updated tool description and instructions reach them.
Tests and Examples
All pre-existing tests in agent/harness/todo updated to use new input format — all pass
TestCompleteTodos_WithReason: verifies items are marked complete when a reason is supplied
TestCompleteToolDescription_MentionsReason: verifies the tool description contains "reason"
Run: go test ./agent/harness/todo/...
Notes
The upstream commit also renames SubAgents* → BackgroundAgents* across the .NET Harness. The Go SDK does not yet have a SubAgents/BackgroundAgents provider, so that rename has no Go counterpart to port. It is tracked in the feature comparison doc as a future addition.
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 dotnet-port/todo-complete-with-reason-8f4efb574b9292e1.
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 (198 of 198 lines)
From 338c8da69aaa6a4455d573089c600d16ab9cd9b9 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com>
Date: Tue, 19 May 2026 10:21:09 +0000
Subject: [PATCH] feat(todo): require reason in TodoList_Complete aligned with
.NET PR #5902
Port the upstream .NET change that replaces the plain-ID slice in
TodoList_Complete with a structured CompleteInput{ID, Reason} slice.
Agents are now prompted to include a completion reason, which improves
auditability of todo lifecycle events.
Changes:
- Add CompleteInput struct (id + reason fields)- Update completeTool to accept []CompleteInput instead of []int- Update tool description to mention the reason field- Update default instructions to ask agents to include a reason- Update all existing tests to use the new input format- Add TestCompleteTodos_WithReason and TestCompleteToolDescription_MentionsReason
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
agent/harness/todo/todo.go | 19 ++++++----
agent/harness/todo/todo_test.go | 63 +++++++++++++++++++++++++++++----
2 files changed, 69 insertions(+), 13 deletions(-)
diff --git a/agent/harness/todo/todo.go b/agent/harness/todo/todo.go
index 17ca2a14..25b15370 100644
--- a/agent/harness/todo/todo.go+++ b/agent/harness/todo/todo.go@@ -36,7 +36,7 @@ When a user changes the topic or changes their mind, ensure that you update the
Use these tools to manage your tasks:
- Use TodoList_Add to break down complex work into trackable items (supports adding one or many at once).
-- Use TodoList_Complete to mark items as done when finished (supports one or many at once).+- Use TodoList_Complete to mark items as done when finished (supports one or many at once). Include a reason describing how the items were completed.
- Use TodoList_GetRemaining to check what work is still pending.
- Use TodoList_GetAll to review the full list including completed items.
- Use TodoList_Remove to remove items that are no lo
... (truncated)
Summary
Aligns the
TodoList_Completetool inagent/harness/todowith the upstream .NET change from PR microsoft/agent-framework#5902. The .NET implementation changed the complete tool's input from a plain list of integer IDs to a structured list of{id, reason}objects, requiring agents to provide a reason describing how each item was completed. This improves auditability of todo item lifecycle events.Changes made:
CompleteInputstruct withID intandReason stringfieldsTodoList_Completetool to accept[]CompleteInputinstead of[]intTestCompleteTodos_WithReasonandTestCompleteToolDescription_MentionsReasonPorted .NET PRs
(Only the
TodoList_Completereason requirement is ported here. The SubAgents→BackgroundAgents rename is in.NET-specific Harness infrastructure with no current Go equivalent.)Breaking Changes
Yes. The
TodoList_Completetool previously accepted[]int(a list of IDs). It now accepts[]CompleteInputwhere each entry is{"id": <int>, "reason": "<string>"}. Any agent or integration that callsTodoList_Completewith plain integers will receive a JSON deserialization error. Since the Go SDK is in beta this is acceptable; agents driven by LLMs will naturally adapt once the updated tool description and instructions reach them.Tests and Examples
agent/harness/todoupdated to use new input format — all passTestCompleteTodos_WithReason: verifies items are marked complete when a reason is suppliedTestCompleteToolDescription_MentionsReason: verifies the tool description contains "reason"go test ./agent/harness/todo/...Notes
The upstream commit also renames
SubAgents*→BackgroundAgents*across the .NET Harness. The Go SDK does not yet have a SubAgents/BackgroundAgents provider, so that rename has no Go counterpart to port. It is tracked in the feature comparison doc as a future addition.Upstream commit: 7cea5e162a5a80f29dc986bfb324c7bc5bd81c09
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
dotnet-port/todo-complete-with-reason-8f4efb574b9292e1.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 (198 of 198 lines)
From 338c8da69aaa6a4455d573089c600d16ab9cd9b9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <github-actions[bot]@users.noreply.github.com> Date: Tue, 19 May 2026 10:21:09 +0000 Subject: [PATCH] feat(todo): require reason in TodoList_Complete aligned with .NET PR #5902 Port the upstream .NET change that replaces the plain-ID slice in TodoList_Complete with a structured CompleteInput{ID, Reason} slice. Agents are now prompted to include a completion reason, which improves auditability of todo lifecycle events. Changes: - Add CompleteInput struct (id + reason fields) - Update completeTool to accept []CompleteInput instead of []int - Update tool description to mention the reason field - Update default instructions to ask agents to include a reason - Update all existing tests to use the new input format - Add TestCompleteTodos_WithReason and TestCompleteToolDescription_MentionsReason Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- agent/harness/todo/todo.go | 19 ++++++---- agent/harness/todo/todo_test.go | 63 +++++++++++++++++++++++++++++---- 2 files changed, 69 insertions(+), 13 deletions(-) diff --git a/agent/harness/todo/todo.go b/agent/harness/todo/todo.go index 17ca2a14..25b15370 100644 --- a/agent/harness/todo/todo.go +++ b/agent/harness/todo/todo.go @@ -36,7 +36,7 @@ When a user changes the topic or changes their mind, ensure that you update the Use these tools to manage your tasks: - Use TodoList_Add to break down complex work into trackable items (supports adding one or many at once). -- Use TodoList_Complete to mark items as done when finished (supports one or many at once). +- Use TodoList_Complete to mark items as done when finished (supports one or many at once). Include a reason describing how the items were completed. - Use TodoList_GetRemaining to check what work is still pending. - Use TodoList_GetAll to review the full list including completed items. - Use TodoList_Remove to remove items that are no lo ... (truncated)