pub enum CodexErr {
Show 35 variants
Stream(String, Option<Duration>),
ConversationNotFound(Uuid),
SessionConfiguredNotFirstEvent,
Timeout,
Spawn,
Interrupted,
UnexpectedStatus(StatusCode, String),
UsageLimitReached(UsageLimitReachedError),
UsageNotIncluded,
InternalServerError,
RetryLimit(StatusCode),
InternalAgentDied,
Sandbox(SandboxErr),
LandlockSandboxExecutableNotProvided,
Io(Error),
Reqwest(Error),
Json(Error),
LandlockRuleset(RulesetError),
LandlockPathFd(PathFdError),
TokioJoin(JoinError),
EnvVar(EnvVarError),
McpServer(String),
McpClientStart {
server: String,
error: String,
},
McpToolNotFound(String),
InvalidConfig(String),
InvalidWorkingDirectory(String),
ModeRestriction(String),
NoBranchPointAvailable,
NoCurrentStateForCheckpoint,
SnapshotNotFound(Uuid),
BranchNotFound(Uuid),
UndoStackEmpty,
RedoStackEmpty,
MemoryLimitExceeded {
current: usize,
limit: usize,
},
General(String),
}Variants§
Stream(String, Option<Duration>)
Returned by ResponsesClient when the SSE stream disconnects or errors out after the HTTP
handshake has succeeded but before it finished emitting response.completed.
The Session loop treats this as a transient error and will automatically retry the turn.
Optionally includes the requested delay before retrying the turn.
ConversationNotFound(Uuid)
SessionConfiguredNotFirstEvent
Timeout
Returned by run_command_stream when the spawned child process timed out (10s).
Spawn
Returned by run_command_stream when the child could not be spawned (its stdout/stderr pipes
could not be captured). Analogous to the previous CodexError::Spawn variant.
Interrupted
Returned by run_command_stream when the user pressed Ctrl‑C (SIGINT). Session uses this to surface a polite FunctionCallOutput back to the model instead of crashing the CLI.
UnexpectedStatus(StatusCode, String)
Unexpected HTTP status code.
UsageLimitReached(UsageLimitReachedError)
UsageNotIncluded
InternalServerError
RetryLimit(StatusCode)
Retry limit exceeded.
InternalAgentDied
Agent loop died unexpectedly
Sandbox(SandboxErr)
Sandbox error
LandlockSandboxExecutableNotProvided
Io(Error)
Reqwest(Error)
Json(Error)
LandlockRuleset(RulesetError)
LandlockPathFd(PathFdError)
TokioJoin(JoinError)
EnvVar(EnvVarError)
McpServer(String)
McpClientStart
McpToolNotFound(String)
InvalidConfig(String)
InvalidWorkingDirectory(String)
ModeRestriction(String)
NoBranchPointAvailable
NoCurrentStateForCheckpoint
SnapshotNotFound(Uuid)
BranchNotFound(Uuid)
UndoStackEmpty
RedoStackEmpty
MemoryLimitExceeded
General(String)
Implementations§
Source§impl CodexErr
impl CodexErr
Sourcepub fn downcast_ref<T: Any>(&self) -> Option<&T>
pub fn downcast_ref<T: Any>(&self) -> Option<&T>
Minimal shim so that existing e.downcast_ref::<CodexErr>() checks continue to compile
after replacing anyhow::Error in the return signature. This mirrors the behavior of
anyhow::Error::downcast_ref but works directly on our concrete enum.
Trait Implementations§
Source§impl Error for CodexErr
impl Error for CodexErr
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<PathFdError> for CodexErr
impl From<PathFdError> for CodexErr
Source§fn from(source: PathFdError) -> Self
fn from(source: PathFdError) -> Self
Source§impl From<RulesetError> for CodexErr
impl From<RulesetError> for CodexErr
Source§fn from(source: RulesetError) -> Self
fn from(source: RulesetError) -> Self
Source§impl From<SandboxErr> for CodexErr
impl From<SandboxErr> for CodexErr
Source§fn from(source: SandboxErr) -> Self
fn from(source: SandboxErr) -> Self
Auto Trait Implementations§
impl Freeze for CodexErr
impl !RefUnwindSafe for CodexErr
impl Send for CodexErr
impl Sync for CodexErr
impl Unpin for CodexErr
impl !UnwindSafe for CodexErr
Blanket Implementations§
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
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.