jdx/mise · error
task action manifest has an invalid identity
Error message
task action manifest has an invalid identity
What it means
Thrown by validate_task_manifest (crates/mise-cache-core/src/agent.rs:1822) when a TaskActionManifest's identity check fails: manifest.version != TASK_ACTION_MANIFEST_VERSION (currently 1) OR manifest.task != the task name the caller passed in. The manifest must declare both the schema version it was written for and the exact task it belongs to; a mismatch means the file is stale, corrupted, or was moved to a different task.
Source
Thrown at crates/mise-cache-core/src/agent.rs:1822
prediction.action.validate()?;
if prediction.adapter.is_empty()
|| !prediction
.adapter
.bytes()
.all(|byte| byte.is_ascii_alphanumeric() || matches!(byte, b'-' | b'_'))
{
bail!("invalid action prediction adapter");
}
if prediction.payload.len() > MAX_ACTION_PREDICTION_PAYLOAD {
bail!("action prediction payload is too large");
}
serde_json::from_str::<serde_json::Value>(&prediction.payload)?;
Ok(())
}
fn validate_task_manifest(manifest: &TaskActionManifest, task: &str) -> Result<()> {
if manifest.version != TASK_ACTION_MANIFEST_VERSION || manifest.task != task {
bail!("task action manifest has an invalid identity");
}
if manifest.predictions.len() > MAX_TASK_ACTION_PREDICTIONS {
bail!("task action manifest contains too many predictions");
}
let mut invocations = BTreeMap::new();
for prediction in &manifest.predictions {
validate_action_prediction(prediction)?;
if invocations.insert(&prediction.invocation, ()).is_some() {
bail!("task action manifest contains duplicate predictions");
}
}
Ok(())
}
fn merge_task_manifests(
task: &str,
base: Option<TaskActionManifest>,
update: TaskActionManifest,View on GitHub (pinned to 6f52dcdf99)
Solutions
- If the task was renamed, delete/regenerate the cached manifest for the old task name so it is rebuilt with the new identity
- If version mismatched after upgrading mise, clear the task action manifest cache once — manifests are re-created under the new version
- Verify the manifest JSON actually declares the same task string (exact match, no path prefixes or whitespace differences) that the caller passes
- If you write manifests programmatically, always set version: TASK_ACTION_MANIFEST_VERSION (1) and the canonical task name
Example fix
// before
let manifest = TaskActionManifest { version: 2, task: "build".into(), predictions }; // version 2 rejected by client on v1
// after
let manifest = TaskActionManifest { version: TASK_ACTION_MANIFEST_VERSION, task: task.to_string(), predictions }; Defensive patterns
Strategy: validation
Validate before calling
fn manifest_identity_ok(manifest: &TaskActionManifest, task: &str) -> bool {
manifest.version == 1 && manifest.task == task
}
// gate before merge/load:
if !manifest_identity_ok(&manifest, task) {
// stale or foreign manifest: discard and regenerate
} Type guard
fn is_current_manifest(m: &TaskActionManifest, task: &str) -> bool {
m.version == TASK_ACTION_MANIFEST_VERSION && m.task == task
} Try / catch
match load_manifest(task) {
Err(e) if e.to_string().contains("invalid identity") => regenerate_manifest(task), // treat as cache miss
other => other,
} Prevention
- Treat identity mismatches as cache misses: drop the manifest and rebuild rather than surfacing the error
- Use the canonical task name from the same source both when writing and validating manifests
- Bump-and-clear cached manifests whenever TASK_ACTION_MANIFEST_VERSION changes in your fork
When it happens
Trigger: Calling merge_task_manifests(task, base, update) (agent.rs:1836) or any load path that validates a manifest against a task name, where update.version != 1 or update.task != task. Typical: renaming a mise task without invalidating its manifest file, or a manifest written by an older/newer mise-cache-core with a different TASK_ACTION_MANIFEST_VERSION.
Common situations: Task rename in mise.toml while the on-disk or remote manifest still carries the old task string; mise upgrade changing the manifest schema version; manifests copied between projects; hand-edited manifest JSON with a typo'd task field.
Related errors
- action prediction payload is too large
- task action manifest contains duplicate predictions
- unsupported remote cache digest algorithm
- invalid remote cache digest
- remote cache action keys must use blake3
AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22).
Data as JSON: /api/errors/74c6b5e05a97895b.
Report an issue: GitHub.