affaan-m/ECC · error · anyhow::Error
connector name required unless --all is set
Error message
connector name required unless --all is set
What it means
This error comes from the memory connector sync command when neither a connector `name` nor the `--all` flag was supplied. The CLI supports syncing one named connector or all configured connectors; calling it in sync mode with no name falls through to the `else` branch, which requires a name via `ok_or_else`. It is pure argument validation before any sync work happens.
Solutions
- Pass the connector name: `... sync --connector <name>`.
- Or sync every configured connector with the `--all` flag.
- Check `config.toml` `[memory_connectors]` to see valid connector names.
- If you intended the report mode, supply the flag that selects report output instead of the sync path.
Example fix
// before $ ecc memory sync error: connector name required unless --all is set // after $ ecc memory sync --all # or $ ecc memory sync --connector notes-jsonl
Defensive patterns
Strategy: validation
Validate before calling
# Shell guard before invoking if [ -z "$CONNECTOR" ] && [ "$ALL" != "1" ]; then echo "usage: ecc memory sync --connector <name> | --all" >&2; exit 2 fi
Prevention
- Remember the command has two modes: one connector (`--connector <name>`) or everything (`--all`) — one is mandatory in sync mode.
- Validate connector names against `config.toml` `[memory_connectors]` keys before scripting.
- Keep shell wrappers that always pass either --all or a name.
When it happens
Trigger: Invoking the graph/memory connector sync subcommand without `--connector <name>` and without `--all`, e.g. `ecc memory sync` with no arguments while the command's `--report` mode (which prints sync reports) was not selected.
Common situations: Users forget that the subcommand has multiple modes and omit the connector name; scripting the command after reading only the report-mode docs; shell alias drops the argument.
Understand the failure class
Background: "--flag is required" and "must specify" CLI errors: how missing-required-flag validation works and how to fix it — this error's family across 20 libraries.
Related errors
- Conflict messages require at least one --file
- --all-harnesses and --harness are mutually exclusive.
- Choose exactly one memory body source: --stdin or…
- explicit --consent-to-openai is required
- graph sync does not accept a session ID when --all is set
AI-assisted analysis of affaan-m/ECC@8321021c54 (2026-09-16).
Data as JSON: /api/errors/bb347ffacb70ce97.
Report an issue: GitHub.
Appendix: source
Thrown at ecc2/src/main.rs:2493
);
}
}
GraphCommands::ConnectorSync {
name,
all,
limit,
json,
} => {
if all {
let report = sync_all_memory_connectors(&db, &cfg, limit)?;
if json {
println!("{}", serde_json::to_string_pretty(&report)?);
} else {
println!("{}", format_graph_connector_sync_report_human(&report));
}
} else {
let name = name.as_deref().ok_or_else(|| {
anyhow::anyhow!("connector name required unless --all is set")
})?;
let stats = sync_memory_connector(&db, &cfg, name, limit)?;
if json {
println!("{}", serde_json::to_string_pretty(&stats)?);
} else {
println!("{}", format_graph_connector_sync_stats_human(&stats));
}
}
}
GraphCommands::Connectors { json } => {
let report = memory_connector_status_report(&db, &cfg)?;
if json {
println!("{}", serde_json::to_string_pretty(&report)?);
} else {
println!("{}", format_graph_connector_status_report_human(&report));
}
}
GraphCommands::Recall {View on GitHub (pinned to 8321021c54)