jdx/mise · error · eyre::Report
task action manifest baseline was not loaded
Error message
task action manifest baseline was not loaded
What it means
Agent::commit_task(run) publishes the manifest collected during a task run. The run token must have been minted by begin_task on the SAME Agent instance, which inserts a TaskActionState with baseline_loaded=true keyed by the run digest; commit fails when no state exists for that run (the eyre branch) or the baseline flag was never set.
Source
Thrown at crates/mise-cache-core/src/agent.rs:501
for task in tasks {
if let Err(error) = task.await {
warn!("remote action prefetch task failed: {error}");
}
}
}
/// Atomically publish the candidate manifest collected by a successful task.
pub async fn commit_task(&self, run: &str) -> Result<()> {
validate_task_identity(run)?;
let state = self
.task_actions
.lock()
.unwrap()
.get(run)
.cloned()
.ok_or_else(|| eyre::eyre!("task action manifest baseline was not loaded"))?;
if !state.baseline_loaded {
bail!("task action manifest baseline was not loaded");
}
let task = state.manifest;
validate_task_identity(&task)?;
let manifest = {
let _write_guard = self.manifest_write_lock.lock().unwrap();
let _file_guard = self.lock_task_manifest(&task)?;
let mut predictions = self
.load_task_manifest(&task)?
.map(|manifest| {
manifest
.predictions
.into_iter()
.map(|prediction| (prediction.invocation.clone(), prediction))
.collect::<BTreeMap<_, _>>()
})
.unwrap_or_default();
predictions.extend(state.predictions);
let manifest = TaskActionManifest {View on GitHub (pinned to 6f52dcdf99)
Solutions
- Call begin_task(task) first and pass the exact run string it returned to commit_task
- Keep begin/commit inside one process lifetime; after a restart, call begin_task again to mint a fresh run token
- Sanity-check the token shape: run ids are 64-char lowercase hex (blake3 digests); anything else was never issued by this agent
Example fix
// before
agent.commit_task("run-1").await?;
// after
let run = agent.begin_task(&task_id).await?;
// ... run task, record predictions ...
agent.commit_task(&run).await?; Defensive patterns
Strategy: validation
Validate before calling
// Treat begin_task as the mandatory prologue; never fabricate or persist run tokens let run = agent.begin_task(&task_id).await?; // mints and registers the baseline assert_eq!(run.len(), 64); // run tokens are blake3 hex digests
Prevention
- Pass the begin_task return value opaquely to commit_task — never construct or mutate it
- Scope begin/commit to one process lifetime; re-run begin_task after any restart
- In tests, always pair commit_task with a prior begin_task
When it happens
Trigger: Calling commit_task with a run string that was never returned by begin_task (fabricated, truncated, from a previous process, or from a different Agent instance); agent restart between begin_task and commit; calling commit twice after the entry was removed.
Common situations: Persisting run tokens to disk and replaying them after a daemon restart; multiplexing several clients over one agent and swapping run tokens; unit tests calling commit_task without a begin_task prologue.
Related errors
- task action manifest contains too many predictions
- task action manifest is not canonical JSON
- remote task action manifest changed too frequently
- remote rustc action metadata is invalid
- remote action output directory is invalid
AI-assisted analysis of jdx/mise@6f52dcdf99 (2026-08-22).
Data as JSON: /api/errors/b8b85c918b0dc2ff.
Report an issue: GitHub.