sxyazi/yazi · error
Invalid 'out' in OutputForm
Error message
Invalid 'out' in OutputForm
What it means
OutputForm carries a completed task's id and its 'out' value (process output channel/data) back to a waiting caller. Both fields are required: 'id' is fetched with a.get("id")? (its own conversion error possible), and 'out' with a.take_any("out") — if 'out' is missing or of the wrong type, "Invalid 'out' in OutputForm" is raised. Without it the replier cannot deliver the task output.
Solutions
- Attach the task output under key 'out' when constructing the tasks.output action.
- Also ensure a valid task 'id' is present, since get("id")? runs before 'out' is checked.
- Match the out type to OutputForm in yazi-parser/src/tasks/output.rs for your yazi version.
- Reply via the task's built-in replier/callback path rather than assembling the action by hand.
Example fix
// before
let a = ActionCow::from("tasks.output").with("id", id); // missing out
// after
let a = ActionCow::from("tasks.output").with("id", id).with("out", out); Defensive patterns
Strategy: validation
Validate before calling
if action.get("id").is_err() || !action.has("out") {
anyhow::bail!("tasks.output requires both 'id' and 'out'");
}
let form = OutputForm::try_from(action)?; Type guard
fn has_out(a: &ActionCow) -> bool { a.has("out") } Try / catch
match OutputForm::try_from(action) {
Ok(form) => form.reply(),
Err(e) => tracing::error!("task reply dropped: {e:#}"),
} Prevention
- Always reply through the task's replier so id and out are attached together.
- Check 'id' first — get("id")? fails before the 'out' check.
- Keep output payload types aligned with OutputForm after upgrades.
When it happens
Trigger: Dispatching tasks.output without an 'out' entry, or with an 'out' value that cannot be taken as the expected output type; also if 'id' is missing/invalid the get("id")? error fires first.
Common situations: Custom task implementations replying without attaching the output value; version drift in the output payload representation; forwarding the reply through code that drops extra values.
Related errors
- Invalid 'opt' in ProcessOpenForm
- Invalid 'opt' in SpawnForm
- Invalid 'lock' in UpdatePeekedForm
- Invalid 'lock' in UpdateSpottedForm
- Invalid 'opt' in DisplaceDoForm
AI-assisted analysis of sxyazi/yazi@5f901b886b (2026-09-02).
Data as JSON: /api/errors/acdc9487e22bfbee.
Report an issue: GitHub.
Appendix: source
Thrown at yazi-parser/src/tasks/output.rs:18
use anyhow::anyhow;
use mlua::{ExternalError, FromLua, IntoLua, Lua, Value};
use yazi_scheduler::custom::CustomOut;
use yazi_shared::{event::ActionCow, id::Id};
#[derive(Debug)]
pub struct OutputForm {
pub id: Id,
pub out: CustomOut,
}
impl TryFrom<ActionCow> for OutputForm {
type Error = anyhow::Error;
fn try_from(mut a: ActionCow) -> Result<Self, Self::Error> {
Ok(Self {
id: a.get("id")?,
out: a.take_any("out").ok_or_else(|| anyhow!("Invalid 'out' in OutputForm"))?,
})
}
}
impl FromLua for OutputForm {
fn from_lua(_: Value, _: &Lua) -> mlua::Result<Self> { Err("unsupported".into_lua_err()) }
}
impl IntoLua for OutputForm {
fn into_lua(self, _: &Lua) -> mlua::Result<Value> { Err("unsupported".into_lua_err()) }
}
View on GitHub (pinned to 5f901b886b)