pub enum Request {
Show 49 variants
Chat {
session_id: String,
text: String,
attachments: Vec<ChatAttachment>,
},
CreateSession {
model: Option<String>,
provider: Option<String>,
system_prompt: Option<String>,
cwd: Option<String>,
parent_id: Option<String>,
child_budget: u32,
tagline: Option<String>,
auto_archive: bool,
notify_parent: bool,
project_name: Option<String>,
sandbox_profile: Option<String>,
},
GetSessionInfo {
session_id: String,
},
GetSessionAncestors {
session_id: String,
},
ListSessions {
include_archived: bool,
project_name: Option<String>,
},
ArchiveSession {
session_id: String,
require_ancestor: Option<String>,
},
RestoreSession {
session_id: String,
},
DeleteSession {
session_id: String,
},
ListModels,
ListAliases {
cwd: Option<String>,
},
SetModel {
session_id: String,
model_id: String,
caller_session_id: Option<String>,
},
SetCwd {
session_id: String,
cwd: String,
caller_session_id: Option<String>,
},
ReparentChildren {
old_parent_id: String,
new_parent_id: String,
},
SetSessionSuccessor {
session_id: String,
successor_id: Option<String>,
caller_session_id: Option<String>,
},
ResolveSuccessor {
session_id: String,
},
SucceedSession {
session_id: String,
tagline: Option<String>,
caller_session_id: Option<String>,
},
GetTaskSessionRole {
session_id: String,
},
Login {
provider: String,
},
AuthStatus,
GetSubscriptionUsage,
GetMessages {
session_id: String,
},
Subscribe {
session_id: String,
},
WaitSessions {
session_ids: Vec<String>,
timeout_secs: u64,
},
WaitAnySessions {
session_ids: Vec<String>,
timeout_secs: u64,
},
CancelChat {
session_id: String,
caller_session_id: Option<String>,
},
Steer {
session_id: String,
text: String,
},
Compact {
session_id: String,
keep_hint: Option<String>,
},
QueueMessage {
target_session_id: String,
content: String,
sender_info: String,
await_reply: bool,
reply_to: Option<String>,
},
QueueInfo {
target_session_id: String,
text: String,
},
ReplyToMessage {
msg_id: String,
content: String,
},
ReloadPlugins {
session_id: String,
},
ReloadConfig,
GcSessions {
older_than_days: u64,
},
FireHook {
name: String,
data: Value,
},
ExecuteTool {
session_id: String,
tool_name: String,
arguments: Value,
},
EnqueuePostIdleAction {
session_id: String,
action: PostIdleAction,
},
SetTagline {
session_id: String,
tagline: String,
},
TaskList {
project: String,
state: Option<String>,
parent_id: Option<i64>,
},
TaskGet {
id: i64,
},
TaskCreate {
project: String,
title: String,
parent_id: Option<i64>,
priority: Option<i32>,
tags: Vec<String>,
sandbox_profile: Option<String>,
},
TaskUpdate {
id: i64,
state: Option<String>,
title: Option<String>,
priority: Option<i64>,
tags: Option<Value>,
affected_files: Option<Value>,
skip_review: Option<bool>,
require_approval: Option<bool>,
sandbox_profile: Option<String>,
},
TaskSearch {
project: String,
query: String,
state: Option<String>,
},
TaskAssign {
id: i64,
session_id: String,
},
TaskStatus {
project: String,
},
TaskOverview {
project: String,
recent_limit: usize,
},
TaskMergeQueue {
project: String,
},
ProjectStats {
project_name: String,
},
GetProjectInfo {
project_name: String,
},
Shutdown {
restart: bool,
},
}Variants§
Chat
Send a chat message in a session.
Fields
attachments: Vec<ChatAttachment>Optional attachments (images for now). Empty by default for backward compatibility with older clients/payloads.
CreateSession
Create a new session.
Fields
GetSessionInfo
Get info about a specific session.
GetSessionAncestors
Return the requested session and all its ancestors.
Ordered leaf-first: index 0 is session_id, the last entry is the root
(or the deepest reachable ancestor when the depth guard trips or a
parent_id points at a missing row).
Returns an empty sessions vec if session_id itself is unknown —
not an error response.
ListSessions
List sessions.
Fields
ArchiveSession
Archive a session (and all its children).
Fields
RestoreSession
Restore (un-archive) a session and all its descendants.
DeleteSession
Delete a session.
ListModels
List available models.
ListAliases
List configured aliases (global + per-project).
cwd is the project directory whose .tau/models.toml should be
inspected for project-level aliases. Pass None to get global
aliases only.
Added in protocol v0.2: older servers will respond with an error. Clients should treat that as “no aliases” and degrade gracefully.
SetModel
Change model for a session.
Fields
SetCwd
Change working directory for a session.
Fields
ReparentChildren
Re-parent all child sessions from one parent to another.
SetSessionSuccessor
Mark session_id as superseded by successor_id. Future
notifications / queued messages / new-child-parent-anchor lookups
targeted at session_id are forwarded to the resolved tip of the
successor chain. successor_id == None clears the link (un-retire).
The predecessor stays in the DB — message history is preserved and remains readable — but it will not receive new wakeups while a successor is set. See task 914.
Fields
ResolveSuccessor
Resolve the live tip of session_id’s successor chain.
Returns Response::ResolvedSuccessor. Used by plugins (notably
the tasks plugin) to redirect notifications away from retired
sessions. See task 914.
SucceedSession
Atomically create a new session inheriting session_id’s
model / cwd / system_prompt / project_name / child_budget,
then mark session_id as retired by setting its successor_id
to the new session’s id.
The new session is always top-level (parent_id = None) so
succession does not change the predecessor’s place in the session
tree. Returns Response::SessionCreated with the successor id
on success and broadcasts Response::SessionSucceeded on the
predecessor’s subscriber channel. See task 915.
Fields
GetTaskSessionRole
Look up whether session_id is recorded as a session of any
non-terminal task and, if so, return the (task_id, role) it
plays. Used by orchestration tools (today: session_succeed)
that must refuse to disturb a task-managed session lifecycle.
Returns Response::TaskSessionRole always — a non-task session
yields is_worker = false with task_id / role set to None.
See task 915.
Login
Start OAuth login for a provider.
AuthStatus
Query authentication status.
GetSubscriptionUsage
Fetch subscription usage (OAuth only, cached 5 min).
GetMessages
Get message history for a session.
Subscribe
Subscribe to live events on a session (for multi-client). The connection stays open and receives Stream/AgentDone/Cancelled events.
WaitSessions
Wait for sessions to complete.
WaitAnySessions
Wait for any of the specified sessions to complete (returns as soon as >= 1 is done).
CancelChat
Cancel an in-progress chat (agent loop) for a session.
Fields
Steer
Inject a steering message into a running agent loop. The message is inserted as a user message between tool results and the next LLM call. If no agent is running, treated as Chat.
Compact
Trigger context compaction now. Optional keep_hint is free-form
text the summarizer is asked to preserve in addition to its standard
sections (advisory, not a hard filter).
QueueMessage
Queue a message for delivery to a target session.
When await_reply is true the caller blocks until the target
calls session_reply with the corresponding msg_id.
Fields
QueueInfo
Persist a zero-token display-only info message to a session’s
message history. Unlike QueueMessage, this does not wake the
agent loop and the message is excluded from LLM context.
Intended for observational notifications such as task state-change info-lines surfaced in the TUI.
ReplyToMessage
Reply to a pending await_reply message.
ReloadPlugins
Reload plugins for a session (destroy + re-init).
ReloadConfig
Re-read providers.toml and global models.toml without restarting
the server. On success, the in-memory provider/model tables and the
global alias map are swapped in; on error (IO / parse failure) the
existing state is left untouched and the server returns
Response::Error so a broken edit can’t brick a running server.
Narrow by design: this does not reload plugins (see
Request::ReloadPlugins), auth.json (re-read per request),
or per-project .tau/models.toml (re-read per lookup).
GcSessions
Garbage-collect archived sessions older than a threshold.
FireHook
Broadcast a hook to other plugins (plugin-to-plugin communication).
ExecuteTool
Execute a tool directly on a session (no LLM involved).
EnqueuePostIdleAction
Enqueue a Tier-3 post-idle action for the given session. The server drains the queue once the session’s lock releases (after the agent loop exits). Intended for side effects that need exclusive access to the caller’s session or its subtree (e.g. archival, merge pass).
See crate::types::PostIdleAction for the action semantics.
SetTagline
Set the tagline for a session.
TaskList
List tasks for a project.
TaskGet
Get full details of a task.
TaskCreate
Create a new task.
Fields
TaskUpdate
Update a task (state, title, priority, etc.).
Fields
TaskSearch
Search tasks by query.
TaskAssign
Assign a task to a session.
TaskStatus
Get scheduler status.
TaskOverview
Structured task overview for interactive rendering.
Returns active/queued/blocked/held tasks plus a bounded tail of
recently-terminated (merged / closed) tasks, all as TaskInfo
rather than pre-formatted text. Consumers (the TUI task picker)
render the overview grouped by scheduler position.
recent_limit applies per bucket — up to recent_limit merged
tasks plus up to recent_limit closed tasks, so the tail length
is at most 2 * recent_limit.
Fields
TaskMergeQueue
Get merge queue (approved + merging tasks).
ProjectStats
Project-wide aggregate usage / cost stats.
Returns totals across every session (archived included) belonging
to project_name.
GetProjectInfo
Look up a project by name. Returns the project’s root path so the
caller can recover when a session’s cwd has disappeared
(worktree removed, etc.) and the worker wants to fall back to the
project root before executing a bash command. See task 720.
Shutdown
Shut down the server.