Enable untrusted context tool outputs by default (#60487)

## What changed

Mark `untrusted_as_tool_output` as stable and enable it by default. Untrusted additional context, such as browser information and goal objectives, now reaches the model as `function_call_output` items in the `agent` namespace instead of user messages. Setting `features.untrusted_as_tool_output = false` preserves the message format.

## Testing

Update core, app-server, TUI, and Python SDK test expectations for the default output format. Cover context persistence, deduplication, goal continuation, and explicit opt-out behavior.

GitOrigin-RevId: 30828351e2ed584928f6055b6dcf276d8288c0fb
This commit is contained in:
Alex Kira
2026-11-10 01:30:08 +00:00
committed by copyberry
parent d8c42ecf8f
commit 08ae615122
10 changed files with 107 additions and 57 deletions
@@ -74,9 +74,12 @@ def test_private_goal_operation_coalesces_runtime_continuations(tmp_path) -> Non
"result": (result.id, result.status, result.final_response),
"messages": agent_message_texts(events),
"request_count": len(requests),
"objective_reached_model": (
"<external_goal_objective>Improve benchmark coverage</external_goal_objective>"
in requests[0].message_input_texts("user")
"objective_reached_model": any(
item.get("type") == "function_call_output"
and item.get("namespace") == "agent"
and item.get("name") == "goal_objective"
and item.get("output") == "Improve benchmark coverage"
for item in requests[0].input()
),
"steering_reached_model": any(
"Continue working toward the active thread goal." in text