pub enum EventMsg {
Show 28 variants
Error(ErrorEvent),
TaskStarted,
TaskComplete(TaskCompleteEvent),
TokenCount(TokenUsage),
AgentMessage(AgentMessageEvent),
AgentMessageDelta(AgentMessageDeltaEvent),
AgentReasoning(AgentReasoningEvent),
AgentReasoningDelta(AgentReasoningDeltaEvent),
AgentReasoningRawContent(AgentReasoningRawContentEvent),
AgentReasoningRawContentDelta(AgentReasoningRawContentDeltaEvent),
AgentReasoningSectionBreak(AgentReasoningSectionBreakEvent),
SessionConfigured(SessionConfiguredEvent),
McpToolCallBegin(McpToolCallBeginEvent),
McpToolCallEnd(McpToolCallEndEvent),
ExecCommandBegin(ExecCommandBeginEvent),
ExecCommandOutputDelta(ExecCommandOutputDeltaEvent),
ExecCommandEnd(ExecCommandEndEvent),
ExecApprovalRequest(ExecApprovalRequestEvent),
ApplyPatchApprovalRequest(ApplyPatchApprovalRequestEvent),
BackgroundEvent(BackgroundEventEvent),
PatchApplyBegin(PatchApplyBeginEvent),
PatchApplyEnd(PatchApplyEndEvent),
TurnDiff(TurnDiffEvent),
GetHistoryEntryResponse(GetHistoryEntryResponseEvent),
McpListToolsResponse(McpListToolsResponseEvent),
PlanUpdate(UpdatePlanArgs),
TurnAborted(TurnAbortedEvent),
ShutdownComplete,
}
Expand description
Response event from the agent
Variants§
Error(ErrorEvent)
Error while executing a submission
TaskStarted
Agent has started a task
TaskComplete(TaskCompleteEvent)
Agent has completed all actions
TokenCount(TokenUsage)
Token count event, sent periodically to report the number of tokens used in the current session.
AgentMessage(AgentMessageEvent)
Agent text output message
AgentMessageDelta(AgentMessageDeltaEvent)
Agent text output delta message
AgentReasoning(AgentReasoningEvent)
Reasoning event from agent.
AgentReasoningDelta(AgentReasoningDeltaEvent)
Agent reasoning delta event from agent.
AgentReasoningRawContent(AgentReasoningRawContentEvent)
Raw chain-of-thought from agent.
AgentReasoningRawContentDelta(AgentReasoningRawContentDeltaEvent)
Agent reasoning content delta event from agent.
AgentReasoningSectionBreak(AgentReasoningSectionBreakEvent)
Signaled when the model begins a new reasoning summary section (e.g., a new titled block).
SessionConfigured(SessionConfiguredEvent)
Ack the client’s configure message.
McpToolCallBegin(McpToolCallBeginEvent)
McpToolCallEnd(McpToolCallEndEvent)
ExecCommandBegin(ExecCommandBeginEvent)
Notification that the server is about to execute a command.
ExecCommandOutputDelta(ExecCommandOutputDeltaEvent)
Incremental chunk of output from a running command.
ExecCommandEnd(ExecCommandEndEvent)
ExecApprovalRequest(ExecApprovalRequestEvent)
ApplyPatchApprovalRequest(ApplyPatchApprovalRequestEvent)
BackgroundEvent(BackgroundEventEvent)
PatchApplyBegin(PatchApplyBeginEvent)
Notification that the agent is about to apply a code patch. Mirrors
ExecCommandBegin
so front‑ends can show progress indicators.
PatchApplyEnd(PatchApplyEndEvent)
Notification that a patch application has finished.
TurnDiff(TurnDiffEvent)
GetHistoryEntryResponse(GetHistoryEntryResponseEvent)
Response to GetHistoryEntryRequest.
McpListToolsResponse(McpListToolsResponseEvent)
List of MCP tools available to the agent.
PlanUpdate(UpdatePlanArgs)
TurnAborted(TurnAbortedEvent)
ShutdownComplete
Notification that the agent is shutting down.