Hmbown/CodeWhale · error
fleet task metadata key is reserved for the durable Runtime…
Error message
fleet task {} metadata key {} is reserved for the durable Runtime selection receipt What it means
The metadata key FROZEN_FLEET_MEMBER_METADATA_KEY (from fleet::worker_runtime) is reserved: it stores the durable Runtime selection receipt written by the system. validate_task_spec_document (crates/tui/src/fleet/task_spec.rs:181) rejects task specs that set it themselves, since author-supplied values would collide with or forge the Runtime receipt.
Solutions
- Remove the reserved metadata key from the task spec's metadata map
- Let the Runtime write the selection receipt itself during the run
- When reusing exported specs, strip system-generated metadata keys
Example fix
# before [[tasks]] id = "build" instructions = "Run build" [tasks.metadata] "codewhale.frozen_fleet_member" = "..." # after [[tasks]] id = "build" instructions = "Run build" # (receipt is written by Runtime, not the spec)
Defensive patterns
Strategy: validation
Validate before calling
use fleet::worker_runtime::FROZEN_FLEET_MEMBER_METADATA_KEY;
if task.metadata.contains_key(FROZEN_FLEET_MEMBER_METADATA_KEY) {
return Err("strip reserved frozen-member metadata from the spec".into());
} Try / catch
match load_task_spec_document(path) {
Ok(doc) => doc,
Err(e) if e.to_string().contains("reserved for the durable Runtime selection receipt") => {
eprintln!("{}: remove system-written metadata key", path.display());
return;
}
Err(e) => return Err(e),
} Prevention
- When round-tripping exported run artifacts, strip system metadata keys
- Treat FROZEN_FLEET_MEMBER_METADATA_KEY as Runtime-write-only
- Allow only an explicit allowlist of metadata keys in hand-written specs
When it happens
Trigger: A task spec includes the reserved key in a task's `metadata` map; detected during validate_task_spec_document via load_task_spec_document or create_queued_run_with_descriptor.
Common situations: Hand-copying metadata from a previously generated run artifact (which contains the frozen receipt) back into a new spec; snapshot/export tooling round-tripping internal metadata.
Related errors
- agent profile provider cannot be empty
- agent profile provider must be a simple provider id
- duplicate fleet task id
- duplicate fleet worker id
- fleet cannot be empty
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/034979f5f1b3d13a.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/fleet/task_spec.rs:181
validate_fleet_identity("task id", &task.id)?;
if !ids.insert(task.id.clone()) {
bail!("duplicate fleet task id {}", task.id);
}
validate_fleet_name(&format!("task {} name", task.id), &task.name)?;
if task.instructions.trim().is_empty() {
bail!("fleet task {} instructions cannot be empty", task.id);
}
if let Some(objective) = &task.objective
&& objective.trim().is_empty()
{
bail!("fleet task {} objective cannot be empty", task.id);
}
validate_worker_profile(&task.id, task.worker.as_ref())?;
if task
.metadata
.contains_key(super::worker_runtime::FROZEN_FLEET_MEMBER_METADATA_KEY)
{
bail!(
"fleet task {} metadata key {} is reserved for the durable Runtime selection receipt",
task.id,
super::worker_runtime::FROZEN_FLEET_MEMBER_METADATA_KEY
);
}
validate_tags(&task.id, &task.tags)?;
validate_workspace_requirements(task)?;
}
let mut worker_ids = BTreeSet::new();
for worker in &doc.workers {
validate_fleet_identity("worker id", &worker.id)?;
if !worker_ids.insert(worker.id.clone()) {
bail!("duplicate fleet worker id {}", worker.id);
}
validate_fleet_name(&format!("worker {} name", worker.id), &worker.name)?;
if worker.trust_level.is_some() {
bail!(
"fleet worker {} trust_level is a legacy compatibility field, not Fleet identity; configure execution authority through Runtime policy",View on GitHub (pinned to 73e0f67d83)