jdx/mise · error
task cache store version mismatch: local version {}, remote
Error message
task cache store version mismatch: local version {}, remote version {} What it means
CompositeTaskCacheStore layers a local and a remote store; at construction it asserts both report the same store version because their on-disk formats must agree for entries to be exchanged. A mismatch means the local cache directory and the remote store were created by different format generations.
Source
Thrown at src/task/task_cache_store.rs:185
}
fn touch(&self, key: &str);
}
pub(crate) struct CompositeTaskCacheStore {
local: Arc<dyn TaskCacheStore>,
remote: Arc<dyn TaskCacheStore>,
remote_mode: CacheRemoteMode,
remote_read_locks: Mutex<HashMap<String, Weak<tokio::sync::Mutex<()>>>>,
}
impl CompositeTaskCacheStore {
pub(crate) fn new(
local: Arc<dyn TaskCacheStore>,
remote: Arc<dyn TaskCacheStore>,
remote_mode: CacheRemoteMode,
) -> Result<Self> {
if local.version() != remote.version() {
bail!(
"task cache store version mismatch: local version {}, remote version {}",
local.version(),
remote.version()
);
}
Ok(Self {
local,
remote,
remote_mode,
remote_read_locks: Mutex::new(HashMap::new()),
})
}
fn remote_read_lock(&self, key: &str) -> Arc<tokio::sync::Mutex<()>> {
let mut locks = self.remote_read_locks.lock().unwrap();
locks.retain(|_, lock| lock.strong_count() > 0);
if let Some(lock) = locks.get(key).and_then(Weak::upgrade) {
return lock;View on GitHub (pinned to 9dcfcaa0dc)
Solutions
- Upgrade (or pin) all machines and CI jobs that share the cache to the same mise version
- Clear the stale store: rm -rf ~/.cache/mise/task-artifacts and the matching remote prefix so the current version recreates it
- Set task.cache_dir explicitly if you must run parallel caches for different mise versions
Example fix
# before: CI on 2025.12, laptop on 2026.1, shared remote cache # after: pin the same version everywhere # .mise.toml [tools] mise = '2026.1.6'
Defensive patterns
Strategy: fallback
Try / catch
// rebuild stores from scratch on version mismatch
match CompositeTaskCacheStore::new(local, remote, mode) {
Ok(store) => store,
Err(e) if e.to_string().contains("task cache store version mismatch") => {
reset_task_cache_dirs();
CompositeTaskCacheStore::new(recreate_local_store()?, remote, mode)?
}
Err(e) => return Err(e),
} Prevention
- Upgrade all machines sharing a cache at the same time
- Set task.cache_dir per mise version if mixed versions are unavoidable
- Clear task-artifacts after upgrades rather than carrying old formats forward
When it happens
Trigger: CompositeTaskCacheStore::new runs with local.version() != remote.version() — typically a local task-artifacts dir (or remote store) written by a newer/older mise than the currently running one.
Common situations: mise upgraded on one machine but not another while sharing cache state; switching between stable and prerelease builds; leftover cache dirs from a previous format version.
Related errors
- unsupported remote cache client metadata version
- unsupported remote cache directory version
- remote cache metadata kind is not a task
- remote action result is missing its output root
- remote cache path escapes its output root
AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17).
Data as JSON: /api/errors/e45dd08828667d07.
Report an issue: GitHub.