Skip to content

Session Management

The agent can inspect, communicate with, and spawn sessions. These tools enable cross-session workflows, background task delegation, and cross-channel messaging -- all under write-down enforcement.

Tools

sessions_list

List all active sessions visible to the current session.

Takes no parameters. Results are filtered by taint level -- a PUBLIC session cannot see CONFIDENTIAL session metadata.

sessions_history

Get the message history for a session by ID.

ParameterTypeRequiredDescription
session_idstringyesThe session ID to retrieve history for

Access is denied if the target session's taint is higher than the caller's taint.

sessions_send

Send content from the current session to another session. Subject to write-down enforcement.

ParameterTypeRequiredDescription
session_idstringyesTarget session ID
contentstringyesThe message content to send

Write-down check: The caller's taint must be able to flow to the target session's classification level. A CONFIDENTIAL session cannot send data to a PUBLIC session.

sessions_spawn

Spawn a new background session for an autonomous task.

ParameterTypeRequiredDescription
taskstringyesDescription of what the background session should do

The spawned session starts with independent PUBLIC taint and its own isolated workspace. It runs autonomously and returns results when complete.

session_status

Get metadata and status for a specific session.

ParameterTypeRequiredDescription
session_idstringyesThe session ID to check

Returns session ID, channel, user, taint level, and creation time. Access is taint-gated.

message

Send a message to a channel and recipient. Subject to write-down enforcement via policy hooks.

ParameterTypeRequiredDescription
channelstringyesTarget channel (e.g. telegram, slack)
recipientstringyesRecipient identifier within the channel
textstringyesMessage text to send

summarize

Generate a concise summary of the current conversation. Useful for creating handoff notes, compressing context, or producing a recap for delivery to another channel.

ParameterTypeRequiredDescription
scopestringnoWhat to summarize: session (default), topic

simulate_tool_call

Simulate a tool call to preview the policy engine's decision without executing the tool. Returns the hook evaluation result (ALLOW, BLOCK, or REDACT) and the rules that were evaluated.

ParameterTypeRequiredDescription
tool_namestringyesThe tool to simulate calling
argsobjectnoArguments to include in the simulation

Use simulate_tool_call to check whether a tool call will be allowed

before executing it. This is useful for understanding policy behavior without side effects. :::

Use Cases

Background Task Delegation

The agent can spawn a background session to handle a long-running task without blocking the current conversation:

User: "Research competitor pricing and put together a summary"
Agent: [calls sessions_spawn with the task]
Agent: "I've started a background session to research that. I'll have results shortly."

Cross-Session Communication

Sessions can send data to each other, enabling workflows where one session produces data that another consumes:

Background session completes research → sessions_send to parent → parent notifies user

Cross-Channel Messaging

The message tool lets the agent proactively reach out on any connected channel:

Agent detects an urgent event → message({ channel: "telegram", recipient: "owner", text: "Alert: ..." })

Security

  • All session operations are taint-gated: you cannot see, read, or send to sessions above your taint level
  • sessions_send enforces write-down prevention: data cannot flow to a lower classification
  • Spawned sessions start at PUBLIC taint with independent taint tracking
  • The message tool passes through PRE_OUTPUT policy hooks before delivery
  • Session IDs are injected from the runtime context, not from LLM arguments -- the agent cannot impersonate another session

SECURITY Write-down prevention is enforced on all cross-session

communication. A session tainted at CONFIDENTIAL cannot send data to a PUBLIC session or channel. This is a hard boundary enforced by the policy layer. :::