Skip to main content

Module items

Module items 

Source
Expand description

Thread item types shared between the exec and app-server protocols.

A ThreadItem represents a single unit of work within a turn — an agent message, a command execution, a file change, etc. Items are emitted via item/started and item/completed notifications and included in the final Turn when a turn completes.

Both snake_case (exec protocol) and camelCase (app-server protocol) type tags are accepted via serde aliases.

Structs§

AgentMessageItem
An agent message item containing text output.
CommandExecutionItem
A command execution item — a shell command the agent ran.
ErrorItem
An error item.
FileChangeItem
A file change item representing one or more file modifications.
FileUpdateChange
A single file update within a file change item.
McpToolCallError
Error from an MCP tool call.
McpToolCallItem
An MCP tool call item.
McpToolCallResult
Result of an MCP tool call.
ReasoningItem
A reasoning item containing the model’s chain-of-thought.
TodoItem
A single todo entry within a todo list.
TodoListItem
A todo list item.
UserMessageContent
A single content block within a UserMessageItem.
UserMessageItem
A user message item — the prompt the user sent for the current turn.
WebSearchItem
A web search item.

Enums§

CommandExecutionStatus
Status of a command execution within a CommandExecutionItem.
McpToolCallStatus
Status of an MCP tool call.
PatchApplyStatus
Status of a patch apply operation.
PatchChangeKind
Kind of patch change applied to a file.
ThreadItem
All possible thread item types emitted by the Codex CLI.