jdx/mise · error

Task not found: , use `mise tasks ls --all --hidden` to…

Error message

Task not found: {task_spec}, use `mise tasks ls --all --hidden` to list all tasks

What it means

When mise resolves a task specification (name, path, or alias) before running it, it looks up matching tasks in the tasks-with-aliases map. If no task matches the given spec — including hidden tasks and aliases — mise fails with this message and points to `mise tasks ls --all --hidden` so the user can discover what task names actually exist.

Solutions

  1. Run `mise tasks ls --all --hidden` to list every task including hidden ones and confirm the exact name
  2. Fix typos or use a task alias that exists
  3. If the task is in a subdirectory config, add it via `[includes]` in the root mise.toml or run from the right directory
  4. Check that the task file has an executable shebang or proper [tasks] table entry so it is discovered

Example fix

// before
$ mise run buld  # Task not found
// after
$ mise tasks ls --all --hidden
$ mise run build
Defensive patterns

Strategy: validation

Validate before calling

mise tasks ls --all --hidden | grep -Fxq "$task" || { echo "task not found: $task"; exit 1; }

Try / catch

out=$(mise run "$task" 2>&1) || { echo "$out"; mise tasks ls --all --hidden; exit 1; }

Prevention

When it happens

Trigger: `mise run <name>` or `mise tasks run <name>` where the name has no matching task: a typo, the task lives in a directory not scanned (missing from config includes), the task is defined only in a monorepo subdirectory whose config isn't loaded, or referencing a task by a removed/renamed alias.

Common situations: New contributors guessing task names from a README; tasks defined in a mise.toml in a subdirectory not included via `includes`; a task renamed upstream while scripts/CI still call the old name.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/f4fb0024055ac7f1. Report an issue: GitHub.

Appendix: source

Thrown at src/cli/cache/task.rs:129

    let config = Config::get().await?;
    let task_name = crate::task::expand_colon_task_syntax(task_spec, &config)?;
    let tasks = if task_name.starts_with("//") {
        let ctx = crate::task::TaskLoadContext::from_pattern(&task_name);
        config.tasks_with_context(Some(&ctx)).await?
    } else if crate::task::is_workspace_project_task(&task_name) {
        let ctx = crate::task::TaskLoadContext::all();
        config.tasks_with_context(Some(&ctx)).await?
    } else {
        config.tasks().await?
    };
    let tasks_with_aliases = crate::task::build_task_ref_map(tasks.iter());
    let mut tasks = tasks_with_aliases
        .get_matching(&task_name)?
        .into_iter()
        .map(|task| (**task).clone())
        .collect_vec();
    if tasks.is_empty() {
        bail!("Task not found: {task_spec}, use `mise tasks ls --all --hidden` to list all tasks");
    }
    TaskFetcher::new(false)
        .fetch_tasks(&config, &mut tasks)
        .await?;
    Ok((config, tasks))
}

fn format_timestamp(timestamp: u64) -> String {
    i64::try_from(timestamp)
        .ok()
        .and_then(|timestamp| DateTime::<Utc>::from_timestamp(timestamp, 0))
        .map(|timestamp| timestamp.to_rfc3339_opts(SecondsFormat::Secs, true))
        .unwrap_or_else(|| "unknown".to_string())
}

View on GitHub (pinned to 533346cc37)