mirror of
https://github.com/openai/codex.git
synced 2026-11-17 22:10:37 +00:00
Title: Improve rollout session initialization error messages Issue: https://github.com/openai/codex/issues/7283 What: add targeted mapping for rollout/session initialization errors so users get actionable messages when Codex cannot access session files. Why: session creation previously returned a generic internal error, hiding permissions/FS issues and making support harder. How: - Added rollout::error::map_session_init_error to translate the more common io::Error kinds into user-facing hints (permission, missing dir, file blocking, corruption). Others are passed through directly with `CodexErr::Fatal`. - Reused the mapper in Codex session creation to preserve root causes instead of returning InternalAgentDied.
23 lines
662 B
Rust
23 lines
662 B
Rust
//! Rollout module: persistence and discovery of session rollout files.
|
|
|
|
use codex_protocol::protocol::SessionSource;
|
|
|
|
pub const SESSIONS_SUBDIR: &str = "sessions";
|
|
pub const ARCHIVED_SESSIONS_SUBDIR: &str = "archived_sessions";
|
|
pub const INTERACTIVE_SESSION_SOURCES: &[SessionSource] =
|
|
&[SessionSource::Cli, SessionSource::VSCode];
|
|
|
|
pub(crate) mod error;
|
|
pub mod list;
|
|
pub(crate) mod policy;
|
|
pub mod recorder;
|
|
|
|
pub use codex_protocol::protocol::SessionMeta;
|
|
pub(crate) use error::map_session_init_error;
|
|
pub use list::find_conversation_path_by_id_str;
|
|
pub use recorder::RolloutRecorder;
|
|
pub use recorder::RolloutRecorderParams;
|
|
|
|
#[cfg(test)]
|
|
pub mod tests;
|