Hmbown/CodeWhale · error
Workflow dispatch requires sub-agents for provider
Error message
Workflow dispatch requires sub-agents for provider {} ({}) What it means
Workflow dispatch spawns sub-agents, so the active provider must have sub-agents enabled. Before dispatching, the code checks config.subagents_enabled_for_provider(api_provider()) and bails with the provider name and its configured disable reason when sub-agents are turned off for that provider.
Solutions
- Enable sub-agents for the active provider in your Codewhale config
- Switch to a provider whose sub-agent configuration is enabled (check config.api_provider())
- Read the disable reason in the error message and remove the matching provider-specific override
- Confirm the config file the CLI loads is the one you edited (workspace vs user config merge)
Example fix
// before (config) subagents = "disabled" // after (config) subagents = "enabled" # for the provider you dispatch workflows on
Defensive patterns
Strategy: validation
Validate before calling
if (!config.subagents_enabled_for_provider(config.api_provider())) {
throw new Error(`enable sub-agents for provider ${config.api_provider().as_str()} before dispatching workflows`);
} Try / catch
try {
dispatchWorkflow(cfg);
} catch (e) {
if (String(e).includes("requires sub-agents")) {
// surface subagents_disabled_reason() to the user, do not retry
}
throw e;
} Prevention
- Check subagents_enabled_for_provider() in preflight before any workflow run
- Keep provider-specific sub-agent flags consistent when switching providers
- Log subagents_disabled_reason() alongside provider at session start
When it happens
Trigger: Running a workflow (dispatch) while the resolved provider has sub-agents disabled in config — either globally via sub-agents settings or by a provider-specific override; the reason string comes from subagents_disabled_reason() or defaults to 'provider-specific sub-agent configuration disabled it'.
Common situations: User switched to a provider (e.g. one without sub-agent support configured) and tried to run a workflow; fresh config on a new machine missing the sub-agent enablement for the chosen provider; a provider-specific disable flag left over from earlier tuning.
Related errors
- Antigravity is a retired, non-runnable legacy provider…
- Antigravity is a retired, non-runnable legacy provider…
- Cannot resume agent on its saved provider
- Choose a model for the destination provider before…
- custom provider ' ' must set [providers. ].kind =…
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/9d0f3d3ec3b35b0e.
Report an issue: GitHub.
Appendix: source
Thrown at crates/tui/src/lib.rs:12475
plugin_registry: std::sync::Arc<crate::plugins::PluginRegistry>,
) -> Result<(
crate::tools::workflow::WorkflowTool,
crate::tools::ToolContext,
)> {
use std::sync::Arc;
use crate::client::CodewhaleClient;
use crate::core::authority::shell_policy_for_mode;
use crate::tools::AgentToolSurfaceOptions;
use crate::tools::goal::new_shared_goal_state;
use crate::tools::subagent::{SubAgentRuntime, new_shared_subagent_manager_with_timeout};
use crate::tools::todo::new_shared_todo_list;
use codewhale_config::AppMode;
use codewhale_execpolicy::ApprovalMode;
let provider = config.api_provider();
if !config.subagents_enabled_for_provider(provider) {
bail!(
"Workflow dispatch requires sub-agents for provider {} ({})",
provider.as_str(),
config
.subagents_disabled_reason()
.unwrap_or("provider-specific sub-agent configuration disabled it")
);
}
let yolo = config.yolo.unwrap_or(false);
let mode = AppMode::Operate;
let allow_shell = yolo || config.allow_shell();
let shell_policy = shell_policy_for_mode(mode, allow_shell);
let trusted = crate::workspace_trust::WorkspaceTrust::load_for(workspace);
let mut context = crate::tools::ToolContext::with_auto_approve(
workspace.to_path_buf(),
yolo,
config.notes_path(),
config.mcp_config_path(),View on GitHub (pinned to 73e0f67d83)