pub enum Request {
Show 45 variants
Hello {
client: String,
since: Option<Seq>,
token: Option<String>,
epoch: Option<String>,
},
Snapshot,
Spawn(SpawnRequest),
Prompt {
session: SessionId,
text: String,
attachments: Vec<Attachment>,
queue: bool,
},
Exec {
session: SessionId,
command: String,
},
QueueClear {
session: SessionId,
},
QueuePop {
session: SessionId,
},
Cancel {
session: SessionId,
},
SessionRemove {
session: SessionId,
force: bool,
},
Handoff {
session: SessionId,
kind: AgentKind,
model: Option<String>,
effort: Option<String>,
note: Option<String>,
role: Option<Role>,
parent: Option<ParentChange>,
force: bool,
},
Kill {
session: SessionId,
},
KillBgProc {
session: SessionId,
pid: Option<u32>,
force: bool,
},
Resume {
session: SessionId,
prompt: Option<String>,
},
Clear {
session: SessionId,
force: bool,
},
Sleep {
session: SessionId,
},
Wake {
session: SessionId,
},
SessionConfig {
session: SessionId,
model: Option<String>,
effort: Option<String>,
},
SessionBudget {
session: SessionId,
budget_usd: f64,
},
McpPermission {
session: SessionId,
title: String,
detail: String,
},
ApprovalAsk {
session: SessionId,
tool: String,
input: String,
},
Permission {
session: SessionId,
req: String,
decision: Decision,
},
McpQuestion {
session: SessionId,
question: String,
header: Option<String>,
options: Vec<String>,
multi_select: bool,
},
AnswerQuestion {
session: SessionId,
id: String,
answers: Vec<String>,
},
BusSend {
from: Option<SessionId>,
to: Target,
kind: MsgKind,
body: String,
reply_to: Option<MsgId>,
},
BusInbox {
session: SessionId,
unread_only: bool,
},
BusWait {
session: SessionId,
from: Option<SessionId>,
reply_to: Option<MsgId>,
timeout_ms: u64,
},
TaskCreate {
title: String,
detail: String,
assignee: Option<SessionId>,
created_by: Option<SessionId>,
depends_on: Vec<TaskId>,
project_root: Option<String>,
},
TaskUpdate {
id: TaskId,
status: Option<TaskStatus>,
assignee: Option<SessionId>,
detail: Option<String>,
},
TaskDelete {
id: TaskId,
},
SessionLabel {
session: SessionId,
label: String,
},
SessionNote {
session: SessionId,
note: String,
},
ArtifactShare {
session: SessionId,
kind: ArtifactKind,
path: String,
note: String,
},
WorktreeList,
WorktreeDiff {
session: SessionId,
stat_only: bool,
paths: Vec<String>,
max_lines: Option<usize>,
fold_generated: bool,
},
WorktreeDiscard {
session: SessionId,
file: String,
patch: Option<String>,
},
WorktreeMerge {
session: SessionId,
dry_run: bool,
resolve: bool,
strategy: Option<MergeStrategy>,
},
WorktreePr {
session: SessionId,
title: String,
body: String,
},
WorktreeGc {
session: Option<SessionId>,
force: bool,
},
Prune {
project: Option<String>,
},
ReviewComment {
session: SessionId,
location: String,
comment: String,
},
WebControl {
enabled: Option<bool>,
addr: Option<String>,
},
KeepAwake {
enabled: bool,
},
ListModels {
kind: String,
},
Shutdown,
Restart,
}Expand description
client -> daemon.
Variants§
Hello
Greet and (optionally) replay events after since; remote connections may include token.
Fields
Snapshot
Request a full state snapshot.
Spawn(SpawnRequest)
Prompt
Send a prompt / user input to a session.
Fields
attachments: Vec<Attachment>Attachments (files, images).
Exec
Execute a shell command in the session’s working directory (bypassing the agent), writing output to the transcript.
QueueClear
Clear a session’s pending prompt queue.
QueuePop
Pop (remove) the last entry from a session’s pending prompt queue, returning its raw text via Frame::Ok { note }.
Cancel
Interrupt the current turn (without killing the process).
SessionRemove
Remove an ended session from the list; for worktree branches behaves like gc (unmerged or uncommitted changes require force).
Handoff
Hand off a session’s work to another agent: generates a handoff brief and reuses the same working directory.
Fields
parent: Option<ParentChange>Kill
End the session and kill its process.
KillBgProc
Terminate background child processes of a session (pid: None cleans up all).
Resume
Resume an ended session: reconnect to the original conversation using the agent’s native conversation id (keeping the ertangle session id).
Clear
Reset context while keeping identity: kill the agent process and restart with a fresh conversation
(preserving ertangle session id, label, parent/child links, worktree, inbox, and tasks). Rejected while busy unless force interrupts first.
Sleep
Pause an idle session’s child process (SIGSTOP).
Wake
Wake a sleeping session’s child process (SIGCONT).
SessionConfig
Switch a session’s model and/or effort at runtime (takes effect on the next turn).
SessionBudget
Set or raise a session’s cost limit (USD) and clear over_budget.
McpPermission
Agent (via MCP ertangle_approve) requests approval and waits for the decision.
ApprovalAsk
Agent (via MCP ertangle_approve) requests approval and waits for the decision; Ok note is allow or deny.
Permission
Reply to an approval request.
McpQuestion
Agent asks a question through MCP ertangle_question and waits for the user’s answer.
Fields
AnswerQuestion
Reply to an interactive question.
BusSend
Send a message onto the bus (inter-agent communication).
BusInbox
Read a session’s inbox (by default unread only, advancing the cursor).
BusWait
Block waiting for the next message in the inbox (optionally filtered by sender or reply_to).
TaskCreate
Fields
TaskUpdate
TaskDelete
SessionLabel
Rename a session’s display label.
SessionNote
Update a session’s short status string (corresponds to ertangle_status).
Share an artifact (file, branch, or diff).
WorktreeList
List all managed worktrees.
WorktreeDiff
Get git diff of a session’s workspace (including untracked file summary).
Fields
WorktreeDiscard
Revert (discard) a single hunk or entire file change in a session’s workspace.
WorktreeMerge
Merge a session’s worktree branch back into the main workspace.
Fields
strategy: Option<MergeStrategy>Merge strategy; falls back to daemon’s global [git] merge_strategy (default merge) if omitted.
WorktreePr
Create a Pull Request for a session’s branch (via gh).
WorktreeGc
Clean up worktrees of ended sessions (or the specified session if given).
Fields
Prune
Archive every ended session that is merged or has no worktree, removing merged worktrees safely. Live sessions and unmerged work are never touched.
Fields
ReviewComment
Leave a review comment on a session’s diff line and send it back to the agent to fix.
WebControl
Control or query Web UI support.
KeepAwake
Toggle OS-level keep-awake at runtime (applied immediately by TUI settings).
ListModels
List available models for an agent (built-in for Claude; queried from CLI for others, up to a few seconds).
Shutdown
Request the daemon to shut down.
Restart
Request the daemon to restart with the same binary (re-exec); running sessions resume automatically.