{"record":{"id":"a5967ccd6e29ea4c","repo":"jdx/mise","slug":"failed-to-discover-workspace-providers-error","errorCode":null,"errorMessage":"failed to discover workspace providers: {error}","messagePattern":"failed to discover workspace providers: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/config/mod.rs","lineNumber":755,"sourceCode":"    pub(crate) fn monorepo_lockfile_discovery_key(\n        &self,\n    ) -> Option<(PathBuf, Option<bool>, Vec<String>)> {\n        let config = find_monorepo_config(&self.config_files)?;\n        Some((\n            config.monorepo_source.get_path().to_path_buf(),\n            config.monorepo.lockfile,\n            config.monorepo.config_roots.unwrap_or_default(),\n        ))\n    }\n\n    /// Discovers the provider-neutral workspace project graph and applies the\n    /// explicit overrides from the active monorepo root.\n    pub(crate) fn workspace_project_graph(\n        &self,\n    ) -> Result<Arc<crate::task::workspace::WorkspaceProjectGraph>> {\n        let graph = self.workspace_project_graph_for_task_loading()?;\n        if let Some(error) = graph.provider_discovery_error() {\n            bail!(\"failed to discover workspace providers: {error}\");\n        }\n        Ok(graph)\n    }\n\n    /// Resolves workspace-global task inputs using the active monorepo root context.\n    pub(crate) async fn monorepo_global_task_inputs(self: &Arc<Self>) -> Result<Vec<String>> {\n        let monorepo_config = find_monorepo_config(&self.config_files)\n            .ok_or_else(|| eyre!(\"no config file in scope sets monorepo_root = true\"))?;\n        let monorepo_root = monorepo_config.root;\n        let configs = self\n            .config_files\n            .values()\n            .filter(|cf| cf.config_root() == monorepo_root)\n            .collect::<Vec<_>>();\n        let task_inputs = ResolvedTaskInputs::from_configs(&configs);\n        let mut task = Task {\n            name: \"affected\".to_string(),\n            cf: Some(monorepo_config.root_config),","sourceCodeStart":737,"sourceCodeEnd":773,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/config/mod.rs#L737-L773","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Read the embedded {error} in the message to find the root cause","Fix the provider configuration ([task] providers / remote task settings) in the monorepo root mise.toml","If a remote provider is unreachable, fix network access or cache settings (task.remote_no_cache)","Run with MISE_DEBUG=1 for the full discovery error trace"],"exampleFix":"// mise.toml\n// before\n[task.config_roots]\npackages = \"packages/*\"\n[task.providers]\nmytasks = \"bad-url\"\n// after\n[task.providers]\nmytasks = \"github:org/tasks\"","handlingStrategy":"try-catch","validationCode":"// Rust\n// Before relying on the graph, inspect provider discovery without erroring:\nlet graph = config.workspace_project_graph_for_task_loading()?;\nif let Some(err) = graph.provider_discovery_error() {\n    eprintln!(\"provider discovery problem: {err}\");\n}","typeGuard":"// Rust\nfn has_provider_error(graph: &WorkspaceProjectGraph) -> bool {\n    graph.provider_discovery_error().is_some()\n}","tryCatchPattern":"// Rust\nmatch config.workspace_project_graph() {\n    Ok(graph) => use(graph),\n    Err(e) if e.to_string().starts_with(\"failed to discover workspace providers\") => {\n        eprintln!(\"check [task] provider config in monorepo root: {e}\");\n    }\n    Err(e) => return Err(e),\n}","preventionTips":["Validate [task] provider entries (names, URLs) in the monorepo root mise.toml before committing","Run `mise tasks ls` in CI to catch provider discovery breakage early","Use MISE_DEBUG=1 locally when adding new remote task providers"],"tags":["config","monorepo","workspace","task-providers"],"backgroundTag":"unexpected-response-shape","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}