#[non_exhaustive]pub enum Op {
Show 26 variants
Interrupt,
CleanBackgroundTerminals,
RealtimeConversationStart(ConversationStartParams),
RealtimeConversationAudio(ConversationAudioParams),
RealtimeConversationText(ConversationTextParams),
RealtimeConversationSpeech(ConversationSpeechParams),
RealtimeConversationClose,
RealtimeConversationListVoices,
UserInput {
items: Vec<UserInput>,
final_output_json_schema: Option<Value>,
responsesapi_client_metadata: Option<HashMap<String, String>>,
additional_context: BTreeMap<String, AdditionalContextEntry>,
thread_settings: ThreadSettingsOverrides,
},
ThreadSettings {
thread_settings: ThreadSettingsOverrides,
},
InterAgentCommunication {
communication: InterAgentCommunication,
},
ExecApproval {
id: String,
turn_id: Option<String>,
decision: ReviewDecision,
},
PatchApproval {
id: String,
decision: ReviewDecision,
},
ResolveElicitation {
server_name: String,
request_id: RequestId,
decision: ElicitationAction,
content: Option<Value>,
meta: Option<Value>,
},
UserInputAnswer {
id: String,
response: RequestUserInputResponse,
},
RequestPermissionsResponse {
id: String,
response: RequestPermissionsResponse,
},
DynamicToolResponse {
id: String,
response: DynamicToolResponse,
},
RefreshMcpServers {
config: McpServerRefreshConfig,
},
ReloadUserConfig,
Compact,
SetThreadMemoryMode {
mode: ThreadMemoryMode,
},
ThreadRollback {
num_turns: u32,
},
Review {
review_request: ReviewRequest,
},
ApproveGuardianDeniedAction {
event: GuardianAssessmentEvent,
},
Shutdown,
RunUserShellCommand {
command: String,
},
}Expand description
Submission operation
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Interrupt
Abort current task without terminating background terminal processes.
This server sends EventMsg::TurnAborted in response.
CleanBackgroundTerminals
Terminate all running background terminal processes for this thread. Use this when callers intentionally want to stop long-lived background shells.
RealtimeConversationStart(ConversationStartParams)
Start a realtime conversation stream.
RealtimeConversationAudio(ConversationAudioParams)
Send audio input to the running realtime conversation stream.
RealtimeConversationText(ConversationTextParams)
Send text input to the running realtime conversation stream.
RealtimeConversationSpeech(ConversationSpeechParams)
Append speakable text to the running realtime conversation stream.
RealtimeConversationClose
Close the running realtime conversation stream.
RealtimeConversationListVoices
Request the list of voices supported by realtime conversation streams.
UserInput
User input, optionally with thread-settings overrides applied first.
Fields
final_output_json_schema: Option<Value>Optional JSON Schema used to constrain the final assistant message for this turn.
responsesapi_client_metadata: Option<HashMap<String, String>>Optional turn-scoped Responses API client_metadata.
additional_context: BTreeMap<String, AdditionalContextEntry>Client-supplied context fragments keyed by an opaque source identifier.
thread_settings: ThreadSettingsOverridesPersistent thread-settings overrides to apply before the input.
ThreadSettings
Apply persistent thread-settings overrides without starting a turn.
This uses the same submission queue as turn starts so app-server can preserve caller order between both kinds of mutation.
Fields
thread_settings: ThreadSettingsOverridesPersistent thread-settings overrides to apply.
InterAgentCommunication
Inter-agent communication that should be recorded as agent-message history while still using the normal thread submission lifecycle.
Fields
communication: InterAgentCommunicationExecApproval
Approve a command execution
Fields
decision: ReviewDecisionThe user’s decision in response to the request.
PatchApproval
Approve a code patch
Fields
decision: ReviewDecisionThe user’s decision in response to the request.
ResolveElicitation
Resolve an MCP elicitation request.
Fields
decision: ElicitationActionUser’s decision for the request.
UserInputAnswer
Resolve a request_user_input tool call.
Fields
response: RequestUserInputResponseUser-provided answers.
RequestPermissionsResponse
Resolve a request_permissions tool call.
Fields
response: RequestPermissionsResponseUser-granted permissions.
DynamicToolResponse
Resolve a dynamic tool call request.
Fields
response: DynamicToolResponseTool output payload.
RefreshMcpServers
Request MCP servers to reinitialize and refresh cached tool lists.
Fields
config: McpServerRefreshConfigReloadUserConfig
Reload user config layer overrides for the active session.
This updates runtime config-derived behavior (for example app enable/disable state) without restarting the thread.
Compact
Request the agent to summarize the current conversation context. The agent will use its existing context (either conversation history or previous response id) to generate a summary which will be returned as an AgentMessage event.
SetThreadMemoryMode
Set whether the thread remains eligible for memory generation.
This persists thread-level memory mode metadata without involving the model.
Fields
mode: ThreadMemoryModeThreadRollback
Request Codex to drop the last N user turns from in-memory context.
This does not attempt to revert local filesystem changes. Clients are responsible for undoing any edits on disk.
Review
Request a code review from the agent.
Fields
review_request: ReviewRequestApproveGuardianDeniedAction
Record that the user approved one retry of a concrete Guardian-denied action.
Fields
event: GuardianAssessmentEventShutdown
Request to shut down codex instance.
RunUserShellCommand
Execute a user-initiated one-off shell command (triggered by “!cmd”).
The command string is executed using the user’s default shell and may
include shell syntax (pipes, redirects, etc.). Output is streamed via
ExecCommand* events and the UI regains control upon TurnComplete.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Op
Auto Trait Implementations§
impl Freeze for Op
impl RefUnwindSafe for Op
impl Send for Op
impl Sync for Op
impl Unpin for Op
impl UnsafeUnpin for Op
impl UnwindSafe for Op
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more