affaan-m/ECC · error · anyhow::Error
Unsupported agent type: {other}
Error message
Unsupported agent type: {other} What it means
The agent_program function maps the agent type to a HarnessKind via HarnessKind::from_agent_type. If the resulting kind does not match Claude, Codex, OpenCode, or Gemini, it bails. There is no default fallback — unknown agent types cannot be launched.
Source
Thrown at ecc2/src/session/manager.rs:2345
}
fn agent_program(cfg: &Config, agent_type: &str) -> Result<PathBuf> {
let harness = HarnessKind::from_agent_type(agent_type);
let runner_key = SessionHarnessInfo::runner_key(agent_type);
if let Some(runner) = cfg.harness_runner(&runner_key) {
let program = runner.program.trim();
if program.is_empty() {
anyhow::bail!("Configured harness runner for {runner_key} is missing a program");
}
return Ok(PathBuf::from(program));
}
match harness {
HarnessKind::Claude => Ok(PathBuf::from("claude")),
HarnessKind::Codex => Ok(PathBuf::from("codex")),
HarnessKind::OpenCode => Ok(PathBuf::from("opencode")),
HarnessKind::Gemini => Ok(PathBuf::from("gemini")),
other => anyhow::bail!("Unsupported agent type: {other}"),
}
}
fn resolve_session(db: &StateStore, id: &str) -> Result<Session> {
let session = if id == "latest" {
db.get_latest_session()?
} else {
db.get_session(id)?
};
session.ok_or_else(|| anyhow::anyhow!("Session not found: {id}"))
}
fn parse_cron_schedule(expr: &str) -> Result<CronSchedule> {
let trimmed = expr.trim();
let normalized = match trimmed.split_whitespace().count() {
5 => format!("0 {trimmed}"),
6 | 7 => trimmed.to_string(),View on GitHub (pinned to 01e15490f0)
Solutions
- Use one of the supported agent types: claude, codex, opencode, or gemini
- If you need a custom agent, configure a harness_runner entry for its runner_key to bypass the default mapping
- Check that HarnessKind::from_agent_type returns the expected variant for your agent type string
- Update ECC to a version that supports the new harness
Example fix
// before let agent_type = "aider"; session.run(agent_type).await?; // after (option 1: use supported type) let agent_type = "claude"; session.run(agent_type).await?; // after (option 2: configure harness_runner in config) // harness_runners: // aider-runner: // program: "/usr/local/bin/aider"
Defensive patterns
Strategy: type-guard
Validate before calling
fn is_supported_agent_type(agent_type: &str) -> bool {
matches!(
HarnessKind::from_agent_type(agent_type),
HarnessKind::Claude | HarnessKind::Codex | HarnessKind::OpenCode | HarnessKind::Gemini
)
} Type guard
fn is_supported_agent_type(agent_type: &str) -> bool {
matches!(
HarnessKind::from_agent_type(agent_type),
HarnessKind::Claude | HarnessKind::Codex | HarnessKind::OpenCode | HarnessKind::Gemini
)
} Prevention
- Maintain a list of supported agent types and validate user input against it
- Configure a harness_runner entry for any custom agent type to bypass the default mapping
- Check agent type support at config-load time if agent types come from config
When it happens
Trigger: Passing an agent_type string whose HarnessKind::from_agent_type mapping does not yield Claude, Codex, OpenCode, or Gemini, and no harness_runner config overrides the program.
Common situations: Using a custom agent type not registered in the harness mapping. Typo in agent type name. New harness not yet supported by this version of ECC.
Related errors
- Configured harness runner for {runner_key} is missing a prog
- Invalid ECC repo root: unreadable package.json at ${packageJ
- Unknown argument: ${arg}
- The canonical ito-compute-cli is unpublished and ECC will no
- Invalid mode "${mode}". Allowed modes: ${allowedModes.join('
AI-assisted analysis of affaan-m/ECC@01e15490f0 (2026-08-13).
Data as JSON: /api/errors/88ca7657362ffe51.
Report an issue: GitHub.