Return empty success output from v2 send_message (#62093)

## What changed

Remove the acknowledgment text and `followup_task` hint from successful v2
`send_message` responses, including messages sent to the root agent. The shared
messaging handler now returns empty text with the success flag set.

Update the idle eviction follow-up scenario snapshot to expect empty tool output.

GitOrigin-RevId: 9eab3ae7264e6ddf3db6ae40a34cc895d0954621
This commit is contained in:
surajs-oai
2026-11-17 18:44:30 +00:00
committed by copyberry
parent 444803ddcd
commit e9a43d43c5
3 changed files with 3 additions and 17 deletions
@@ -1359,7 +1359,7 @@ async fn multi_agent_v2_send_message_accepts_root_target_from_child() {
agent_role: None,
});
let output = SendMessageHandlerV2
SendMessageHandlerV2
.handle(invocation(
Arc::new(session),
Arc::new(turn),
@@ -1371,10 +1371,6 @@ async fn multi_agent_v2_send_message_accepts_root_target_from_child() {
))
.await
.expect("send_message should accept the root agent path");
assert_eq!(
expect_text_output(output),
("Message accepted.".to_string(), Some(true))
);
assert!(manager.captured_ops().iter().any(|(id, op)| {
*id == root.thread_id
@@ -83,13 +83,6 @@ pub(super) async fn handle_message_string_tool(
let receiver_agent_path = receipt.metadata.agent_path.ok_or_else(|| {
FunctionCallError::RespondToModel("target agent is missing an agent_path".to_string())
})?;
let output = match mode {
MessageDeliveryMode::QueueOnly if receiver_agent_path.is_root() => "Message accepted.",
MessageDeliveryMode::QueueOnly => {
"Message accepted. If the recipient is idle and should act now, use followup_task to ask it to act on the message."
}
MessageDeliveryMode::TriggerTurn => "",
};
emit_sub_agent_activity(
&session,
&turn,
@@ -104,8 +97,5 @@ pub(super) async fn handle_message_string_tool(
)
.await;
Ok(FunctionToolOutput::from_text(
output.to_string(),
Some(true),
))
Ok(FunctionToolOutput::from_text(String::new(), Some(true)))
}
@@ -55,7 +55,7 @@ Scenario: A parent with no configured environment delegates an API migration, qu
Run send_message for the API migration.
-- request 4 (turn) --
10:function_call/collaboration.send_message:{"message":"Use the new API for the migration.","target":"worker"}
11:function_call_output:Message accepted. If the recipient is idle and should act now, use followup_task to ask it to act on the message.
11:function_call_output:
12:agent_message
-- request 5 (turn) --
13:message/user: