BloopAI/vibe-kanban · error · ContainerError

MsgStore missing for execution

Error message

MsgStore missing for execution {} during normalization setup

What it means

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.

Solutions

  1. Retry the execution — if it was a transient race, a new attempt registers a fresh MsgStore.
  2. Check whether another task removes entries from msg_stores and ensure it doesn't target just-created processes.
  3. Ensure single-flight per workspace so concurrent start_execution calls don't clean each other's stores.
  4. If reproducible, capture logs around process creation and file a bug: the store registration path is skipping insertion.
Defensive patterns

Strategy: retry

Try / catch

match start_execution(...).await {
    Err(e) if e.to_string().contains("MsgStore missing") => {
        tokio::time::sleep(Duration::from_millis(500)).await;
        start_execution(...).await
    }
    other => other,
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of BloopAI/vibe-kanban@4deb7eca8f (2026-08-29). Data as JSON: /api/errors/8d16c718d396e27b. Report an issue: GitHub.

Appendix: source

Thrown at crates/services/src/services/container.rs:1323

            )),
            ExecutorActionType::CodingAgentFollowUpRequest(request) => Some((
                request.executor_config.profile_id(),
                request.effective_dir(&workspace_root),
            )),
            ExecutorActionType::ReviewRequest(request) => Some((
                request.executor_config.profile_id(),
                request.effective_dir(&workspace_root),
            )),
            _ => None,
        } {
            let msg_store = match self.get_msg_store_by_id(&execution_process.id).await {
                Some(store) => store,
                None => {
                    self.msg_stores()
                        .write()
                        .await
                        .remove(&execution_process.id);
                    return Err(ContainerError::Other(anyhow!(
                        "MsgStore missing for execution {} during normalization setup",
                        execution_process.id
                    )));
                }
            };
            #[cfg(feature = "qa-mode")]
            {
                let executor = QaMockExecutor;
                let _ = executor.normalize_logs(msg_store, &working_dir);
            }
            #[cfg(not(feature = "qa-mode"))]
            {
                if let Some(executor) =
                    ExecutorConfigs::get_cached().get_coding_agent(&executor_profile_id)
                {
                    let _ = executor.normalize_logs(msg_store, &working_dir);
                } else {
                    tracing::error!(

View on GitHub (pinned to 4deb7eca8f)