zeroclaw-labs/zeroclaw · error · anyhow::Error

plugins.entries[ ].name must not be empty

Error message

plugins.entries[{index}].name must not be empty

What it means

Validation guard in validate_plugin_entries: a plugins.entries item whose name trims to an empty string. The empty name cannot serve as an instance key for plugin lookups, so the whole config is rejected at load time with the offending index in the message.

Solutions

  1. Set a non-empty name for the plugin entry in config.toml.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/zeroclaw-config/src/schema.rs:10056 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zeroclaw-labs/zeroclaw@88bb9c8533 (2026-08-23). Data as JSON: /api/errors/193439252ed7d8e8. Report an issue: GitHub.

Appendix: source

Thrown at crates/zeroclaw-config/src/schema.rs:10056

    if let Some(prefix) = selector.strip_suffix(".*") {
        return service_key.starts_with(prefix)
            && service_key
                .strip_prefix(prefix)
                .is_some_and(|suffix| suffix.starts_with('.'));
    }

    false
}

const MCP_MAX_TOOL_TIMEOUT_SECS: u64 = 600;

fn validate_plugin_entries(config: &PluginsConfig) -> Result<()> {
    let mut seen = std::collections::HashSet::new();
    for (index, entry) in config.entries.iter().enumerate() {
        let instance_key = entry.name.trim();
        if instance_key.is_empty() {
            anyhow::bail!("plugins.entries[{index}].name must not be empty");
        }
        if instance_key != entry.name {
            anyhow::bail!(
                "plugins.entries[{index}].name must not have leading or trailing whitespace"
            );
        }
        if !seen.insert(instance_key) {
            anyhow::bail!("plugins.entries contains a duplicate instance key");
        }
    }
    Ok(())
}

fn validate_mcp_config(config: &McpConfig) -> Result<()> {
    let mut seen_names = std::collections::HashSet::new();
    for (i, server) in config.servers.iter().enumerate() {
        let name = server.name.trim();
        if name.is_empty() {

View on GitHub (pinned to 88bb9c8533)