{"record":{"id":"8d87799445a961f9","repo":"jdx/mise","slug":"unsupported-task-cache-store-version-expected","errorCode":null,"errorMessage":"unsupported task cache store version {}; expected {}","messagePattern":"unsupported task cache store version (.+?); expected (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/task/task_cache.rs","lineNumber":430,"sourceCode":"                    base_url,\n                    namespace,\n                    token: settings.task.cache.remote_token.clone(),\n                    token_file: settings.task.cache.remote_token_file.clone(),\n                    oidc_audience: settings.task.cache.remote_oidc_audience.clone(),\n                    connect_timeout: settings.http_timeout(),\n                    read_timeout: settings.http_timeout(),\n                    download_timeout: settings.http_download_timeout(),\n                    retries: settings.http_retries(),\n                },\n                staging_dir: cache_dir.join(\"remote\"),\n                mode,\n            })\n        } else {\n            None\n        };\n        let store = compose_task_cache_stores(local, remote)?;\n        if store.version() != TASK_CACHE_STORE_VERSION {\n            bail!(\n                \"unsupported task cache store version {}; expected {}\",\n                store.version(),\n                TASK_CACHE_STORE_VERSION\n            );\n        }\n        Ok(TaskArtifactCache {\n            root,\n            cache_dir,\n            store,\n            key,\n            action: encoded,\n            explanation,\n            state_path,\n            limits,\n        })\n    }\n}\n","sourceCodeStart":412,"sourceCodeEnd":448,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/task/task_cache.rs#L412-L448","documentation":"When mise loads a persisted task artifact cache store it composes the local and remote cache backends and checks the resulting store's version against the currently supported TASK_CACHE_STORE_VERSION. If the on-disk (or remote) store was written by a different version of mise, the load is rejected with this error. It exists to prevent misinterpreting a cache layout produced by older or newer tooling.","triggerScenarios":"Calling into task cache restore/save (e.g. running a task with artifact caching enabled) when the cache directory at $MISE_CACHE_DIR/task-artifacts/<CACHE_DIR_VERSION> contains a store whose version() differs from the compiled-in TASK_CACHE_STORE_VERSION — typically a store written by a different mise version.","commonSituations":"After upgrading or downgrading mise while an old cache directory persists; switching between release and dev builds that bumped the store format; sharing a cache dir across machines with different mise versions (e.g. in CI caches).","solutions":["Delete the stale cache directory (default: ~/.cache/mise/task-artifacts or $MISE_CACHE_DIR/task-artifacts) and rerun the task to rebuild it.","Upgrade or downgrade mise so the binary matches the version that wrote the cache store.","Point cache artifacts_dir at a fresh location via config to bypass the incompatible store.","If it recurs across versions, report it; the store version bump may need a migration path."],"exampleFix":"// before (stale store from older mise)\n~/.cache/mise/task-artifacts/v0/...  -> error: unsupported task cache store version 0; expected 1\n// after\nrm -rf ~/.cache/mise/task-artifacts && mise run build  # store recreated at current version","handlingStrategy":"fallback","validationCode":"mise_cache_dir=\"${MISE_CACHE_DIR:-$HOME/.cache/mise}\"\n[ -d \"$mise_cache_dir/task-artifacts\" ] && mise run build || echo \"cache dir absent: safe\"","typeGuard":null,"tryCatchPattern":"// Rust: treat as cache-miss, not fatal\nmatch load_task_cache(...) {\n    Err(e) if e.to_string().contains(\"unsupported task cache store version\") => {\n        warn!(\"stale cache store, rebuilding\");\n        clear_cache_dir()?;\n        run_task_uncached()?;\n    }\n    r => r,\n}","preventionTips":["Bump/refresh cache dirs after mise upgrades in CI setup scripts","Don't share a single mise cache directory across different mise versions","Pin the mise version per project so store formats stay consistent"],"tags":["task-cache","version-mismatch","cache"],"backgroundTag":"unsupported-config-value","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}