Exceptions¶
Raised exception types used by acodex for executable discovery, streaming, cancellation, and structured output errors.
When to use this page¶
You want to catch and handle specific failure modes (for example, cancellation vs exec failure).
You want to understand what errors a method can raise.
- exception acodex.exceptions.CodexCancelledError[source]¶
Raised when a turn is canceled via TurnOptions.signal.
- exception acodex.exceptions.CodexExecError(message, *, stderr=None)[source]¶
Raised when the codex executable fails to start or exits unsuccessfully.
- exception acodex.exceptions.CodexExecutableNotFoundError(message, *, executable_name='codex')[source]¶
Raised when the codex executable cannot be discovered on PATH.
- exception acodex.exceptions.CodexThreadRunError[source]¶
Raised when a thread run fails while streaming or parsing events.
- exception acodex.exceptions.CodexThreadStreamNotConsumedError[source]¶
Raised when streamed.result is accessed before streamed.events is exhausted.
- exception acodex.exceptions.CodexStructuredResponseError[source]¶
Raised when structured output cannot be created or accessed.
- exception acodex.exceptions.CodexConfigError[source]¶
Raised when Codex config overrides are invalid or cannot be serialized.