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
Normalize report_intent tool-list drift in replay proxy
The 1.0.72 CLI now appends the full built-in tool enumeration to the
"Tool 'report_intent' does not exist." error, while existing snapshots
recorded it truncated. Strip the whole "Available tools that can be
called are <list>." sentence on both the request and stored sides so
list-present, list-absent, and differing list contents are all
equivalent, fixing subagent_hooks (all SDKs) and should_abort_a_session
(Go/Python/Rust/.NET) without editing any snapshots.
Also collapse the new trailing multi-turn advice on the task tool's
background-agent start result to a stable placeholder.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: e94bab38-c22e-4a38-8d8b-c82c1991a33c
// The whole enumeration collapses so snapshots stay stable as the built-in
547
-
// tool set evolves (e.g. write_agent being added).
546
+
// The whole "Available tools..." sentence is stripped so snapshots stay
547
+
// stable whether or not the runtime emits the list and as the built-in tool
548
+
// set evolves (e.g. write_agent being added).
548
549
expect(toolMessage?.content).toBe(
549
-
"Tool 'report_intent' does not exist. Available tools that can be called are ${available_tools}.",
550
+
"Tool 'report_intent' does not exist.",
551
+
);
552
+
});
553
+
554
+
test("collapses background-agent start advice to a stable placeholder",async()=>{
555
+
constrequestBody=JSON.stringify({
556
+
messages: [
557
+
{role: "user",content: "Help me"},
558
+
{
559
+
role: "assistant",
560
+
tool_calls: [
561
+
{
562
+
id: "tc1",
563
+
type: "function",
564
+
function: {name: "task",arguments: "{}"},
565
+
},
566
+
],
567
+
},
568
+
{
569
+
role: "tool",
570
+
tool_call_id: "tc1",
571
+
content:
572
+
"Agent started in background with agent_id: read-file. You'll be notified when it completes. Tell the user you're waiting and end your response, or continue unrelated work until notified. The agent supports multi-turn conversations — use write_agent to send follow-up messages.",
// Newer runtime appends the full built-in tool enumeration.
1053
+
content:
1054
+
"Tool 'report_intent' does not exist. Available tools that can be called are bash, read_bash, view, read_agent, list_agents, write_agent, grep, glob, task.",
test("matches background-agent start results after the advice wording changes",async()=>{
1071
+
constcachePath=path.join(tempDir,"cache.yaml");
1072
+
// Legacy snapshot recorded before the runtime appended multi-turn advice
1073
+
// to the background-agent start message.
1074
+
constcacheContent=yaml.stringify({
1075
+
models: ["test-model"],
1076
+
conversations: [
1077
+
{
1078
+
messages: [
1079
+
{role: "system",content: "${system}"},
1080
+
{role: "user",content: "Spawn an agent"},
1081
+
{
1082
+
role: "assistant",
1083
+
tool_calls: [
1084
+
{
1085
+
id: "toolcall_0",
1086
+
type: "function",
1087
+
function: {name: "task",arguments: "{}"},
1088
+
},
1089
+
],
1090
+
},
1091
+
{
1092
+
role: "tool",
1093
+
tool_call_id: "toolcall_0",
1094
+
content:
1095
+
"Agent started in background with agent_id: read-file. You'll be notified when it completes. Tell the user you're waiting and end your response, or continue unrelated work until notified.",
"Agent started in background with agent_id: read-file. You'll be notified when it completes. Tell the user you're waiting and end your response, or continue unrelated work until notified. The agent supports multi-turn conversations — use write_agent to send follow-up messages.",
0 commit comments