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§
- Agent
Message Item - An agent message item containing text output.
- Command
Execution Item - A command execution item — a shell command the agent ran.
- Error
Item - An error item.
- File
Change Item - A file change item representing one or more file modifications.
- File
Update Change - A single file update within a file change item.
- McpTool
Call Error - Error from an MCP tool call.
- McpTool
Call Item - An MCP tool call item.
- McpTool
Call Result - Result of an MCP tool call.
- Reasoning
Item - A reasoning item containing the model’s chain-of-thought.
- Todo
Item - A single todo entry within a todo list.
- Todo
List Item - A todo list item.
- User
Message Content - A single content block within a
UserMessageItem. - User
Message Item - A user message item — the prompt the user sent for the current turn.
- WebSearch
Item - A web search item.
Enums§
- Command
Execution Status - Status of a command execution within a
CommandExecutionItem. - McpTool
Call Status - Status of an MCP tool call.
- Patch
Apply Status - Status of a patch apply operation.
- Patch
Change Kind - Kind of patch change applied to a file.
- Thread
Item - All possible thread item types emitted by the Codex CLI.