openai/codex · error · CodexErr
turn aborted. Something went wrong? Hit `/feedback` to…
Error message
turn aborted. Something went wrong? Hit `/feedback` to report the issue.
What it means
Sentinel variant of CodexErrorDetails used by the analytics-facing error taxonomy. It marks a turn that ended prematurely for an unclassified internal reason (not user interruption, not a typed API failure); the session loop aborts the in-flight turn and surfaces this generic 'something went wrong' message to the user.
Solutions
- Retry the turn; transient internal failures often clear on a second attempt
- Report the issue via /feedback with session logs so the underlying cause can be classified
- Check for known issues if the abort reproduces consistently on the same input
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at codex-rs/protocol/src/error.rs:82 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of openai/codex@339751715c (2026-08-25).
Data as JSON: /api/errors/b47600090de11fbe.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/protocol/src/error.rs:82
/// Error from linux landlock
#[error("Landlock was not able to fully enforce all sandbox rules")]
LandlockRestrict,
}
pub struct CodexErr {
details: CodexErrorDetails,
retry_delay: Option<Duration>,
}
/// The semantic category and diagnostic payload for a [`CodexErr`].
#[derive(Error, Debug, EnumDiscriminants)]
#[strum_discriminants(name(CodexErrKind))]
#[strum_discriminants(derive(serde::Serialize))]
#[strum_discriminants(serde(rename_all = "snake_case"))]
#[strum_discriminants(doc = "The payload-free semantic category used for analytics.")]
pub enum CodexErrorDetails {
#[error("turn aborted. Something went wrong? Hit `/feedback` to report the issue.")]
TurnAborted,
#[error("shared rollout token budget exhausted")]
SessionBudgetExceeded,
/// 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.
#[error("stream disconnected before completion: {0}")]
Stream(String),
#[error(
"Codex ran out of room in the model's context window. Start a new thread or clear earlier history before retrying."
)]
ContextWindowExceeded,
#[error("no thread with id: {0}")]
ThreadNotFound(ThreadId),
#[error("agent thread limit reached")]View on GitHub (pinned to 339751715c)