title: one round in the event stream, from the tool call to the next message
source: manuals/docker-sandboxes-101/capture/out/19-background.ndjson
lines: 13-19
lang: jsonl
note: Read safety_label in the metadata, the two hook events, and isError in the result.
---
{"agent_name": "root", "metadata": {"safety_label": "unknown"}, "timestamp": "<ts>", "tool_call": {"function": {"arguments": "{\"agent\": \"writer\", \"task\": \"Write one sentence on the topic microVMs\", \"expected_output\": \"A single sentence about microVMs\"}", "name": "run_background_agent"}, "id": "<call-id>", "type": "function"}, "tool_definition": {"annotations": {"idempotentHint": false, "readOnlyHint": false, "title": "Run Background Agent"}, "category": "transfer", "description": "Start a sub-agent task in the background and return immediately with a task ID.\nUse this to dispatch work to multiple sub-agents concurrently. Native sub-agents inherit the current\nsession's safety policy and permissions; calls requiring confirmation are denied because background\ntasks are non-interactive. External harnesses enforce their own permission model. Check progress with\nview_background_agent, or join tasks and collect results with wait_background_agents instead of polling.", "name": "run_background_agent", "outputSchema": null, "parameters": {"additionalProperties": false, "properties": {"agent": {"description": "The name of the sub-agent to run in the background.", "type": "string"}, "expected_output": {"description": "The expected output from the agent (optional).", "type": "string"}, "task": {"description": "A clear and concise description of the task the agent should achieve.", "type": "string"}}, "required": ["agent", "task"], "type": "object"}}, "type": "tool_call_confirmation"}
{"agent_name": "root", "hook_event": "tool_input_transform", "session_id": "<uuid>", "timestamp": "<ts>", "type": "hook_started"}
{"agent_name": "root", "hook_event": "tool_response_transform", "session_id": "<uuid>", "timestamp": "<ts>", "type": "hook_started"}
{"agent_name": "root", "allowed": true, "duration_ms": "<n>", "hook_event": "tool_input_transform", "session_id": "<uuid>", "timestamp": "<ts>", "type": "hook_finished"}
{"agent_name": "root", "allowed": true, "duration_ms": "<n>", "hook_event": "tool_response_transform", "session_id": "<uuid>", "timestamp": "<ts>", "type": "hook_finished"}
{"agent_name": "root", "response": "The user rejected the tool call.", "result": {"isError": true, "output": "The user rejected the tool call."}, "timestamp": "<ts>", "tool_call_id": "<call-id>", "tool_definition": {"annotations": {"idempotentHint": false, "readOnlyHint": false, "title": "Run Background Agent"}, "category": "transfer", "description": "Start a sub-agent task in the background and return immediately with a task ID.\nUse this to dispatch work to multiple sub-agents concurrently. Native sub-agents inherit the current\nsession's safety policy and permissions; calls requiring confirmation are denied because background\ntasks are non-interactive. External harnesses enforce their own permission model. Check progress with\nview_background_agent, or join tasks and collect results with wait_background_agents instead of polling.", "name": "run_background_agent", "outputSchema": null, "parameters": {"additionalProperties": false, "properties": {"agent": {"description": "The name of the sub-agent to run in the background.", "type": "string"}, "expected_output": {"description": "The expected output from the agent (optional).", "type": "string"}, "task": {"description": "A clear and concise description of the task the agent should achieve.", "type": "string"}}, "required": ["agent", "task"], "type": "object"}}, "type": "tool_call_response"}
{"agent_name": "root", "session_id": "<uuid>", "timestamp": "<ts>", "type": "message_added"}
