Hmbown/CodeWhale · error
Refusing to import '{}': {} (enabled=false is a hard block)
Error message
Refusing to import '{}': {} (enabled=false is a hard block) What it means
Raised while importing an external MCP server candidate whose discovered source is disabled (enabled=false). Discovery collects external sources and their enablement state; a disabled source is treated as a hard block, so importing a server from it is refused with the candidate name and the blocking reason interpolated into the message.
Source
Thrown at crates/tui/src/tui/ui/provider_routes.rs:748
use std::time::{SystemTime, UNIX_EPOCH};
let home = crate::config::effective_home_dir().unwrap_or_else(|| PathBuf::from("."));
let market_path = codewhale_config::codewhale_home()
.ok()
.map(|h| h.join("mcp-marketplace.json"));
let markets: Vec<PathBuf> = market_path.into_iter().collect();
let all = discover_external_sources(&home, workspace, &markets);
let candidate = all
.iter()
.find(|c| c.name.eq_ignore_ascii_case(name))
.ok_or_else(|| {
anyhow::anyhow!(
"No external MCP candidate named '{name}'. Run /mcp import to list sources with provenance."
)
})?;
if approve && candidate.hard_blocked {
anyhow::bail!(
"Refusing to import '{}': {} (enabled=false is a hard block)",
candidate.name,
candidate.block_reason.as_deref().unwrap_or("hard blocked")
);
}
let mut decisions = HashMap::new();
decisions.insert(
candidate.name.clone(),
if approve {
ImportDecision::Approve
} else {
ImportDecision::Decline
},
);
let mut store = load_consent_store(&mcp_import_consent_path());
let now = SystemTime::now()View on GitHub (pinned to 0c42157ee5)
Solutions
- Enable the external MCP source in its configuration, then retry the import
- Import the server from a source that is not disabled
- Remove the disabled source entry if it is obsolete
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/tui/src/tui/ui/provider_routes.rs:748 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20).
Data as JSON: /api/errors/2398bf635767a3f4.
Report an issue: GitHub.