affaan-m/ECC · error · anyhow::Error

Unknown memory connector: {name}

Error message

Unknown memory connector: {name}

What it means

Thrown by `sync_memory_connector` (and reached via the single-connector sync path) when `cfg.memory_connectors.get(name)` returns `None`. The configured connectors map does not contain an entry with the supplied name, so the dispatch `match` on connector type cannot proceed. The error fires before any filesystem access, making it a pure configuration lookup failure.

Source

Thrown at ecc2/src/main.rs:2942

) -> Result<()> {
    db.refresh_session_durations()?;
    db.sync_cost_tracker_metrics(&cfg.cost_metrics_path())?;
    db.sync_tool_activity_metrics(&cfg.tool_activity_metrics_path())?;
    let _ = session::manager::enforce_session_heartbeats(db, cfg)?;
    let _ = session::manager::enforce_budget_hard_limits(db, cfg)?;
    Ok(())
}

fn sync_memory_connector(
    db: &session::store::StateStore,
    cfg: &config::Config,
    name: &str,
    limit: usize,
) -> Result<GraphConnectorSyncStats> {
    let connector = cfg
        .memory_connectors
        .get(name)
        .ok_or_else(|| anyhow::anyhow!("Unknown memory connector: {name}"))?;

    match connector {
        config::MemoryConnectorConfig::JsonlFile(settings) => {
            sync_jsonl_memory_connector(db, name, settings, limit)
        }
        config::MemoryConnectorConfig::JsonlDirectory(settings) => {
            sync_jsonl_directory_memory_connector(db, name, settings, limit)
        }
        config::MemoryConnectorConfig::MarkdownFile(settings) => {
            sync_markdown_memory_connector(db, name, settings, limit)
        }
        config::MemoryConnectorConfig::MarkdownDirectory(settings) => {
            sync_markdown_directory_memory_connector(db, name, settings, limit)
        }
        config::MemoryConnectorConfig::DotenvFile(settings) => {
            sync_dotenv_memory_connector(db, name, settings, limit)
        }
    }

View on GitHub (pinned to 01e15490f0)

Solutions

  1. List configured connectors with `ecc graph connectors` to see valid names.
  2. Verify the `[memory_connectors.<name>]` section exists in the active config file.
  3. Check for typos and case mismatch against the key exactly as written in config.

Example fix

// before (config has [memory_connectors.notes] but call uses 'journal')
ecc graph connectors sync journal

// after
ecc graph connectors sync notes
Defensive patterns

Strategy: validation

Validate before calling

// Check connector is configured before sync
if !cfg.memory_connectors.contains_key(name) {
    eprintln!("unknown connector '{name}'. configured: {:?}", cfg.memory_connectors.keys().collect::<Vec<_>>());
    return Ok(());
}

Try / catch

let connector = cfg.memory_connectors.get(name)
    .ok_or_else(|| anyhow!("Unknown memory connector: {name}; run `ecc graph connectors` to list"));

Prevention

When it happens

Trigger: Running `ecc graph connectors sync <name>` where `<name>` is not a key in the `memory_connectors` table of the loaded config. Renaming a connector in config but not in the calling script. Case-sensitivity mismatches in the connector key.

Common situations: Config file not reloaded after editing. Typo in the connector name. Multiple config sources (global vs project) where the key only exists in one. Using a connector name from documentation that differs from the actual config key.

Related errors


AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13). Data as JSON: /api/errors/8e2f03d7793a9169. Report an issue: GitHub.