{"record":{"id":"d94338c1f494fd8b","repo":"xai-org/grok-build","slug":"session-persistence-actor-stopped-before-flush-ack","errorCode":null,"errorMessage":"session persistence actor stopped before flush acknowledgement","messagePattern":"session persistence actor stopped before flush acknowledgement","errorType":"error_code","errorClass":"io::Error","httpStatus":null,"severity":"error","filePath":"crates/codegen/xai-grok-shell/src/session/acp_session_impl/updates.rs","lineNumber":546,"sourceCode":"        skip_all,\n        fields(session_id = %self.session_info.id.0)\n    )]\n    pub(super) async fn flush_to_disk(&self) -> std::io::Result<()> {\n        if let Err(e) = crate::session::replay_events::flush_replay_actor(&self.event_tx).await {\n            tracing::warn!(?e, \"flush_replay_actor failed\");\n        }\n        let (tx, rx) = tokio::sync::oneshot::channel();\n        if self\n            .notifications\n            .persistence_tx\n            .send(PersistenceMsg::FlushAndAck { respond_to: tx })\n            .is_err()\n        {\n            return Ok(());\n        }\n        match rx.await {\n            Ok(result) => result,\n            Err(_) => Err(std::io::Error::new(\n                std::io::ErrorKind::BrokenPipe,\n                \"session persistence actor stopped before flush acknowledgement\",\n            )),\n        }\n    }\n    /// Extracts the update type name and relevant parameters for logging\n    fn extract_update_info(\n        update: &acp::SessionUpdate,\n    ) -> (Option<String>, Option<serde_json::Value>) {\n        match update {\n            acp::SessionUpdate::UserMessageChunk(_) => (Some(\"UserMessageChunk\".to_string()), None),\n            acp::SessionUpdate::AgentMessageChunk(_) => {\n                (Some(\"AgentMessageChunk\".to_string()), None)\n            }\n            acp::SessionUpdate::AgentThoughtChunk(_) => {\n                (Some(\"AgentThoughtChunk\".to_string()), None)\n            }\n            acp::SessionUpdate::ToolCall(tool_call) => (","sourceCodeStart":528,"sourceCodeEnd":564,"githubUrl":"https://github.com/xai-org/grok-build/blob/bc7f02eddd3d84085849dc19ed216f11c23b0571/crates/codegen/xai-grok-shell/src/session/acp_session_impl/updates.rs#L528-L564","documentation":"Error \"session persistence actor stopped before flush acknowledgement\" thrown in xai-org/grok-build.","triggerScenarios":"Thrown at crates/codegen/xai-grok-shell/src/session/acp_session_impl/updates.rs:546 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bc7f02eddd3d84085849dc19ed216f11c23b0571","analyzedAt":"2026-08-31T04:59:42.031Z","schemaVersion":2},"datasetVersion":"2026-08-31T09:17:48.483Z"}