{"record":{"id":"cba46bbc1b3db580","repo":"openai/codex","slug":"session-persistence-is-disabled-cannot-operation","errorCode":null,"errorMessage":"Session persistence is disabled; cannot {operation}.","messagePattern":"Session persistence is disabled; cannot (.+?)\\.","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"codex-rs/core/src/session/mod.rs","lineNumber":1191,"sourceCode":"\n    pub(crate) fn is_interrupted(&self) -> bool {\n        matches!(*self.agent_status.borrow(), AgentStatus::Interrupted)\n    }\n\n    pub(crate) fn get_tx_event(&self) -> Sender<Event> {\n        self.tx_event.clone()\n    }\n\n    pub(crate) fn state_db(&self) -> Option<state_db::StateDbHandle> {\n        self.services.state_db.clone()\n    }\n\n    pub(crate) fn live_thread_for_persistence(\n        &self,\n        operation: &str,\n    ) -> anyhow::Result<&LiveThread> {\n        self.live_thread()\n            .ok_or_else(|| anyhow::anyhow!(\"Session persistence is disabled; cannot {operation}.\"))\n    }\n\n    pub(crate) fn live_thread(&self) -> Option<&LiveThread> {\n        self.services.live_thread.as_ref()\n    }\n\n    pub(crate) async fn set_thread_memory_mode(\n        self: &Arc<Self>,\n        mode: ThreadMemoryMode,\n    ) -> anyhow::Result<()> {\n        handlers::persist_thread_memory_mode_update(self, mode).await\n    }\n\n    /// Flush rollout writes and return the final durability-barrier result.\n    #[instrument(name = \"session.flush_rollout\", level = \"trace\", skip_all)]\n    pub(crate) async fn flush_rollout(&self) -> std::io::Result<()> {\n        if let Some(live_thread) = self.live_thread() {\n            live_thread.flush().await.map_err(std::io::Error::other)","sourceCodeStart":1173,"sourceCodeEnd":1209,"githubUrl":"https://github.com/openai/codex/blob/339751715c64496cb86246bfb3935f40e309dd3d/codex-rs/core/src/session/mod.rs#L1173-L1209","documentation":"Error \"Session persistence is disabled; cannot {operation}.\" thrown in openai/codex.","triggerScenarios":"Thrown at codex-rs/core/src/session/mod.rs:1191 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable session persistence, or avoid the operation that requires it."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"339751715c64496cb86246bfb3935f40e309dd3d","analyzedAt":"2026-08-25T05:35:09.876Z","schemaVersion":2},"datasetVersion":"2026-08-25T06:17:31.827Z"}