jdx/mise · error
action prediction payload is too large
Error message
action prediction payload is too large
What it means
Thrown by validate_action_prediction in the task-action-manifest pipeline (crates/mise-cache-core/src/agent.rs:1814) when a prediction's payload string exceeds MAX_ACTION_PREDICTION_PAYLOAD (256 KiB, defined at agent.rs:23). Each ActionPrediction carries its prediction as a JSON string; the size cap bounds memory/CPU when manifests are merged or persisted. The check runs before the payload is parsed with serde_json, so oversized payloads are rejected without any JSON work.
Source
Thrown at crates/mise-cache-core/src/agent.rs:1814
{
bail!("invalid task action identity");
}
Ok(())
}
fn validate_action_prediction(prediction: &ActionPrediction) -> Result<()> {
prediction.invocation.validate()?;
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");
}View on GitHub (pinned to 6f52dcdf99)
Solutions
- Shrink the prediction payload to under 256 KiB: store large content as a cache blob (CacheDigest reference) and keep only a pointer/metadata in payload
- Check what the payload actually contains — if it duplicates file contents, replace it with the digest of the uploaded blob
- If you control the manifest producer, gzip/compact the JSON or split one huge prediction into several smaller ones (still under the per-prediction cap)
- If a genuinely larger cap is required, raise MAX_ACTION_PREDICTION_PAYLOAD in a fork and rebuild — there is no runtime knob
Example fix
// before
let prediction = ActionPrediction {
invocation,
action,
adapter: "cargo".into(),
payload: serde_json::to_string(&entire_tool_output)?, // may exceed 256 KiB
};
// after
let digest = cache.put_blob_bytes(&entire_tool_output_bytes).await?; // store as blob
let prediction = ActionPrediction {
invocation,
action,
adapter: "cargo".into(),
payload: serde_json::to_string(&serde_json::json!({ "blob": digest }))?,
}; Defensive patterns
Strategy: validation
Validate before calling
const MAX_ACTION_PREDICTION_PAYLOAD: usize = 256 * 1024;
fn check_payload_size(prediction: &ActionPrediction) -> Result<(), String> {
if prediction.payload.len() > MAX_ACTION_PREDICTION_PAYLOAD {
Err(format!("payload is {} bytes, cap is {}", prediction.payload.len(), MAX_ACTION_PREDICTION_PAYLOAD))
} else {
Ok(())
}
}
// run before persist/merge:
for p in &manifest.predictions { check_payload_size(p)?; } Type guard
fn is_payload_within_cap(p: &ActionPrediction) -> bool {
p.payload.len() <= 256 * 1024
} Try / catch
match merge_task_manifests(task, base, update) {
Err(e) if e.to_string().contains("payload is too large") => {
// move oversized content to a blob and rebuild the prediction
rebuild_prediction_with_blob_reference(update)?;
}
other => other?,
} Prevention
- Never inline file contents or tool output into prediction.payload; store blobs by digest and reference them
- Enforce the 256 KiB cap at the producer with a unit test so oversized payloads fail in CI, not in the cache layer
- Log payload sizes when generating manifests to catch growth early
When it happens
Trigger: Calling any API that persists or merges task action manifests (e.g. merge_task_manifests at agent.rs:1836, which calls validate_task_manifest -> validate_action_prediction) with a manifest whose predictions[i].payload.len() > 262144. Also hit when an external producer of the manifest file writes a large inline payload blob.
Common situations: A task embeds base64-encoded file contents, full environment dumps, or a whole tool output snapshot into prediction.payload instead of referencing blobs by digest; manifests generated by a newer/different tool without the size cap; hand-edited manifest files in the cache directory.
Related errors
- task action manifest has an invalid identity
- 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/e57a04fa1a9e5e7c.
Report an issue: GitHub.