{"record":{"id":"8d16c718d396e27b","repo":"BloopAI/vibe-kanban","slug":"msgstore-missing-for-execution-during-normaliza","errorCode":null,"errorMessage":"MsgStore missing for execution {} during normalization setup","messagePattern":"MsgStore missing for execution (.+?) during normalization setup","errorType":"exception","errorClass":"ContainerError","httpStatus":null,"severity":"error","filePath":"crates/services/src/services/container.rs","lineNumber":1323,"sourceCode":"            )),\n            ExecutorActionType::CodingAgentFollowUpRequest(request) => Some((\n                request.executor_config.profile_id(),\n                request.effective_dir(&workspace_root),\n            )),\n            ExecutorActionType::ReviewRequest(request) => Some((\n                request.executor_config.profile_id(),\n                request.effective_dir(&workspace_root),\n            )),\n            _ => None,\n        } {\n            let msg_store = match self.get_msg_store_by_id(&execution_process.id).await {\n                Some(store) => store,\n                None => {\n                    self.msg_stores()\n                        .write()\n                        .await\n                        .remove(&execution_process.id);\n                    return Err(ContainerError::Other(anyhow!(\n                        \"MsgStore missing for execution {} during normalization setup\",\n                        execution_process.id\n                    )));\n                }\n            };\n            #[cfg(feature = \"qa-mode\")]\n            {\n                let executor = QaMockExecutor;\n                let _ = executor.normalize_logs(msg_store, &working_dir);\n            }\n            #[cfg(not(feature = \"qa-mode\"))]\n            {\n                if let Some(executor) =\n                    ExecutorConfigs::get_cached().get_coding_agent(&executor_profile_id)\n                {\n                    let _ = executor.normalize_logs(msg_store, &working_dir);\n                } else {\n                    tracing::error!(","sourceCodeStart":1305,"sourceCodeEnd":1341,"githubUrl":"https://github.com/BloopAI/vibe-kanban/blob/4deb7eca8f381f7cbc1f9d15515a9ab8f8009053/crates/services/src/services/container.rs#L1305-L1341","documentation":"After creating the execution process record, start_execution looks up an in-memory MsgStore for the new process; it must have been registered by a prior setup step. If it is absent the process record is removed from the map and this error is returned, aborting the execution during normalization setup.","triggerScenarios":"start_execution reaching the msg_stores() lookup when the store for execution_process.id was never inserted or was evicted — e.g. internal race, prior cleanup removed it, or a bug skipping store registration.","commonSituations":"Concurrent cancellation/cleanup deleting the store between process creation and lookup; restarting parts of the service losing in-memory state while DB rows persist; rapid follow-up calls racing with process teardown.","solutions":["Retry the execution — if it was a transient race, a new attempt registers a fresh MsgStore.","Check whether another task removes entries from msg_stores and ensure it doesn't target just-created processes.","Ensure single-flight per workspace so concurrent start_execution calls don't clean each other's stores.","If reproducible, capture logs around process creation and file a bug: the store registration path is skipping insertion."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"match start_execution(...).await {\n    Err(e) if e.to_string().contains(\"MsgStore missing\") => {\n        tokio::time::sleep(Duration::from_millis(500)).await;\n        start_execution(...).await\n    }\n    other => other,\n}","preventionTips":["Avoid concurrent operations on the same execution process (single-flight per process id).","Don't cancel/cleanup a process between creation and its first execution.","Report persistent occurrences — in-memory state should not diverge from the DB."],"tags":["internal-state","race-condition","in-memory-store"],"backgroundTag":"internal-state-missing","analyzedSha":"4deb7eca8f381f7cbc1f9d15515a9ab8f8009053","analyzedAt":"2026-08-29T09:24:13.446Z","schemaVersion":2},"datasetVersion":"2026-08-29T12:17:43.993Z"}