Expand description
Defines the protocol for a Codex session between a client and an agent.
Uses a SQ (Submission Queue) / EQ (Event Queue) pattern to asynchronously communicate between user and agent.
Structs§
- Agent
Message Delta Event - Agent
Message Event - Agent
Reasoning Delta Event - Agent
Reasoning Event - Agent
Reasoning RawContent Delta Event - Agent
Reasoning RawContent Event - Agent
Reasoning Section Break Event - Apply
Patch Approval Request Event - Background
Event Event - Chunk
- Error
Event - Event
- Event Queue Entry - events from agent
- Exec
Approval Request Event - Exec
Command Begin Event - Exec
Command EndEvent - Exec
Command Output Delta Event - Final
Output - GetHistory
Entry Response Event - McpInvocation
- McpList
Tools Response Event - Response payload for
Op::ListMcpTools
. - McpTool
Call Begin Event - McpTool
Call EndEvent - Patch
Apply Begin Event - Patch
Apply EndEvent - Session
Configured Event - Submission
- Submission Queue Entry - requests from user
- Task
Complete Event - Token
Usage - Turn
Aborted Event - Turn
Diff Event - Writable
Root - A writable root path accompanied by a list of subpaths that should remain
read‑only even when the root is writable. This is primarily used to ensure
top‑level VCS metadata directories (e.g.
.git
) under a writable root are not modified by the agent.
Enums§
- AskFor
Approval - Determines the conditions under which the user is consulted to approve running the command proposed by Codex.
- Event
Msg - Response event from the agent
- Exec
Output Stream - File
Change - Input
Item - User input
- Op
- Submission operation
- Review
Decision - User’s decision in response to an ExecApprovalRequest.
- Sandbox
Policy - Determines execution restrictions for model shell commands.
- Turn
Abort Reason