jdx/mise · error
no tasks defined. see {url}
Error message
no tasks defined. see {url} What it means
Raised when mise needs to prompt the user to interactively select a task (no task specified on the command line) but the loaded configuration defines zero tasks. The error points to the tasks documentation.
Source
Thrown at src/task/task_list.rs:391
}
if !similar_cmds.is_empty() {
err_msg.push_str("\n\nDid you mean the command:");
for cmd_name in &similar_cmds {
err_msg.push_str(&format!("\n mise {cmd_name}"));
}
}
append_available_tasks(&mut err_msg, &tasks_for_error, showing_all_tasks);
bail!(err_msg);
}
/// Prompt the user to select a task interactively
async fn prompt_for_task(config: &Arc<Config>, load_all: bool) -> Result<Task> {
let ctx = load_all.then(TaskLoadContext::all);
let tasks = config.tasks_with_context(ctx.as_ref()).await?;
ensure!(
!tasks.is_empty(),
"no tasks defined. see {url}",
url = style::eunderline("https://mise.jdx.dev/tasks/")
);
let theme = crate::ui::theme::get_theme();
let mut s = Select::new("Tasks")
.description("Select a task to run")
.filtering(true)
.filterable(true)
.theme(&theme);
for t in tasks.values().filter(|t| !t.hide) {
// Truncate description to first line only, like tasks ls does
let desc = t.description.lines().next().unwrap_or_default();
s = s.option(
DemandOption::new(&t.name)
.label(&t.display_name)
.description(desc),
);View on GitHub (pinned to afd2eddd3a)
Solutions
- Define a task: add [tasks.<name>] to mise.toml or create a script in .mise/tasks/
- Run `mise tasks ls` from the correct project directory
- cd to the project root so its config/tasks are loaded
- Trust the config if it was ignored (`mise trust`)
Example fix
// mise.toml (before: no tasks) [tasks.build] run = "cargo build" // after mise run build
Defensive patterns
Strategy: validation
Validate before calling
[ -n "$(mise tasks ls 2>/dev/null)" ] && mise run || echo "no tasks defined"
Try / catch
out=$(mise run 2>&1) || { echo "$out" | grep -q 'no tasks defined' && echo 'Define tasks in mise.toml'; } Prevention
- Always pass an explicit task name in scripts instead of relying on the interactive prompt
- Define at least one task in mise.toml or .mise/tasks/
- Check your cwd is inside the project before running mise run
When it happens
Trigger: Running `mise run` with no arguments in a project that has no tasks defined, triggering prompt_for_task, which ensures the task list is non-empty before showing a Select prompt.
Common situations: Running `mise run` bare in a fresh repo without mise.toml tasks or .mise/tasks directory; wrong working directory (project tasks not loaded); task files ignored/untrusted.
Understand the failure class
Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.
Related errors
- Task not found: {}, use `mise tasks ls --all --hidden` to li
- --name-only cannot be used with --json, --extended, or --usa
- task list options cannot be used with subcommands
- task list options cannot be used with task info
- No tool specified and not running interactively
AI-assisted analysis of jdx/mise@afd2eddd3a (2026-09-09).
Data as JSON: /api/errors/426ce1ab376b6f79.
Report an issue: GitHub.