jdx/mise · error

failed to discover workspace providers

Error message

failed to discover workspace providers: {error}

What it means

mise failed to discover task providers (e.g. remote task file providers) while building the workspace project graph for the active monorepo. The underlying provider error is embedded in the message. workspace_project_graph is used for workspace-aware task loading and provider lookup, so any provider discovery failure aborts the whole graph request.

Solutions

  1. Read the embedded {error} in the message to find the root cause
  2. Fix the provider configuration ([task] providers / remote task settings) in the monorepo root mise.toml
  3. If a remote provider is unreachable, fix network access or cache settings (task.remote_no_cache)
  4. Run with MISE_DEBUG=1 for the full discovery error trace

Example fix

// mise.toml
// before
[task.config_roots]
packages = "packages/*"
[task.providers]
mytasks = "bad-url"
// after
[task.providers]
mytasks = "github:org/tasks"
Defensive patterns

Strategy: try-catch

Validate before calling

// Rust
// Before relying on the graph, inspect provider discovery without erroring:
let graph = config.workspace_project_graph_for_task_loading()?;
if let Some(err) = graph.provider_discovery_error() {
    eprintln!("provider discovery problem: {err}");
}

Type guard

// Rust
fn has_provider_error(graph: &WorkspaceProjectGraph) -> bool {
    graph.provider_discovery_error().is_some()
}

Try / catch

// Rust
match config.workspace_project_graph() {
    Ok(graph) => use(graph),
    Err(e) if e.to_string().starts_with("failed to discover workspace providers") => {
        eprintln!("check [task] provider config in monorepo root: {e}");
    }
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: Calling Config::workspace_project_graph() when WorkspaceProjectGraph::provider_discovery_error() returns Some — i.e. provider discovery (scanning [task] remote/providers config) failed during graph construction.

Common situations: Misconfigured task providers in monorepo root config (bad provider keys/URLs), unreachable remote sources during task loading, or a workspace with tasks configured to use providers that cannot be initialized.

Related errors


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

Appendix: source

Thrown at src/config/mod.rs:755

    pub(crate) fn monorepo_lockfile_discovery_key(
        &self,
    ) -> Option<(PathBuf, Option<bool>, Vec<String>)> {
        let config = find_monorepo_config(&self.config_files)?;
        Some((
            config.monorepo_source.get_path().to_path_buf(),
            config.monorepo.lockfile,
            config.monorepo.config_roots.unwrap_or_default(),
        ))
    }

    /// Discovers the provider-neutral workspace project graph and applies the
    /// explicit overrides from the active monorepo root.
    pub(crate) fn workspace_project_graph(
        &self,
    ) -> Result<Arc<crate::task::workspace::WorkspaceProjectGraph>> {
        let graph = self.workspace_project_graph_for_task_loading()?;
        if let Some(error) = graph.provider_discovery_error() {
            bail!("failed to discover workspace providers: {error}");
        }
        Ok(graph)
    }

    /// Resolves workspace-global task inputs using the active monorepo root context.
    pub(crate) async fn monorepo_global_task_inputs(self: &Arc<Self>) -> Result<Vec<String>> {
        let monorepo_config = find_monorepo_config(&self.config_files)
            .ok_or_else(|| eyre!("no config file in scope sets monorepo_root = true"))?;
        let monorepo_root = monorepo_config.root;
        let configs = self
            .config_files
            .values()
            .filter(|cf| cf.config_root() == monorepo_root)
            .collect::<Vec<_>>();
        let task_inputs = ResolvedTaskInputs::from_configs(&configs);
        let mut task = Task {
            name: "affected".to_string(),
            cf: Some(monorepo_config.root_config),

View on GitHub (pinned to 533346cc37)