Keep async user messages on the direct tool surface (#39601)

## What changed

- Register `send_user_message_async` as `DirectModelOnly` so supported models can call it directly without exposing it through code mode.
- Exercise the async message flow with a code-mode-only model configuration and verify that the tool remains directly visible.

GitOrigin-RevId: ce22d5f63471ce90ac55ae2f3d0048f6cda57e01
This commit is contained in:
rka-oai authored and copyberry committed 2026-08-20 05:42:20 +00:00
1 parent f6950546e5
commit 198f42067a
2 files changed
+3 -1

No files matched your search

+1 -1
View File
@@ -1069,7 +1069,7 @@ fn add_core_utility_tools(context: &CoreToolPlanContext<'_>, registry: &mut Tool
.iter()
.any(|tool| tool == "send_user_message_async")
{
registry.add(SendUserMessageAsyncHandler);
registry.add_with_exposure(SendUserMessageAsyncHandler, ToolExposure::DirectModelOnly);
}
if environment_mode.has_environment() && features.enabled(Feature::RequestPermissionsTool) {