{"record":{"id":"88ca7657362ffe51","repo":"affaan-m/ECC","slug":"unsupported-agent-type-other","errorCode":null,"errorMessage":"Unsupported agent type: {other}","messagePattern":"Unsupported agent type: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"ecc2/src/session/manager.rs","lineNumber":2345,"sourceCode":"}\n\nfn agent_program(cfg: &Config, agent_type: &str) -> Result<PathBuf> {\n    let harness = HarnessKind::from_agent_type(agent_type);\n    let runner_key = SessionHarnessInfo::runner_key(agent_type);\n    if let Some(runner) = cfg.harness_runner(&runner_key) {\n        let program = runner.program.trim();\n        if program.is_empty() {\n            anyhow::bail!(\"Configured harness runner for {runner_key} is missing a program\");\n        }\n        return Ok(PathBuf::from(program));\n    }\n\n    match harness {\n        HarnessKind::Claude => Ok(PathBuf::from(\"claude\")),\n        HarnessKind::Codex => Ok(PathBuf::from(\"codex\")),\n        HarnessKind::OpenCode => Ok(PathBuf::from(\"opencode\")),\n        HarnessKind::Gemini => Ok(PathBuf::from(\"gemini\")),\n        other => anyhow::bail!(\"Unsupported agent type: {other}\"),\n    }\n}\n\nfn resolve_session(db: &StateStore, id: &str) -> Result<Session> {\n    let session = if id == \"latest\" {\n        db.get_latest_session()?\n    } else {\n        db.get_session(id)?\n    };\n\n    session.ok_or_else(|| anyhow::anyhow!(\"Session not found: {id}\"))\n}\n\nfn parse_cron_schedule(expr: &str) -> Result<CronSchedule> {\n    let trimmed = expr.trim();\n    let normalized = match trimmed.split_whitespace().count() {\n        5 => format!(\"0 {trimmed}\"),\n        6 | 7 => trimmed.to_string(),","sourceCodeStart":2327,"sourceCodeEnd":2363,"githubUrl":"https://github.com/affaan-m/ECC/blob/8321021c54d670126ce3b2969d5deb880b4b0c2a/ecc2/src/session/manager.rs#L2327-L2363","documentation":"agent_program falls back to built-in defaults only for known harness kinds (Claude, Codex, OpenCode, Gemini). Any other agent type has no default executable, so the library bails with 'Unsupported agent type'. HarnessKind::from_agent_type must have produced an unknown/other variant, meaning the agent_type string is not one of the recognized values.","triggerScenarios":"Calling a session-launch API with an agent_type string that HarnessKind::from_agent_type does not map to Claude/Codex/OpenCode/Gemini, so agent_program reaches the match's `other` arm. (The DECLARED AS references to `other` in harness_eval.rs canonicalize are unrelated wildcard bindings, not this error's source.)","commonSituations":"Typo in agent type name (e.g., 'claude-code' vs 'claude'); a newly added agent type not yet supported by this build; passing an arbitrary runner key instead of an agent type; plugin registering a custom agent without a configured harness_runner.","solutions":["Use one of the supported agent types: claude, codex, opencode, gemini","Fix the typo in the agent type string","If you need a custom agent, configure a harness_runner entry for its runner_key so the early return branch is used instead of the match","Upgrade the library if the agent type was added in a newer version"],"exampleFix":"// before\nlaunch_session(db, cfg, agent_type = \"claude-code\")?;\n// after\nlaunch_session(db, cfg, agent_type = \"claude\")?; // supported: claude | codex | opencode | gemini","handlingStrategy":"validation","validationCode":"const SUPPORTED: &[&str] = &[\"claude\", \"codex\", \"opencode\", \"gemini\"];\nif !SUPPORTED.contains(&agent_type) {\n    return Err(format!(\"unsupported agent type '{agent_type}'; expected one of {SUPPORTED:?}\"));\n}","typeGuard":"fn is_supported_agent(t: &str) -> bool { matches!(t, \"claude\" | \"codex\" | \"opencode\" | \"gemini\") }","tryCatchPattern":"match launch(...) {\n    Err(e) if e.to_string().starts_with(\"Unsupported agent type\") => {\n        eprintln!(\"use claude, codex, opencode, or gemini; or configure a harness_runner\");\n        Err(e)\n    }\n    other => other,\n}","preventionTips":["Use a closed enum / constant list for agent types instead of free strings","Configure harness_runner entries for custom agents before launching them","Keep agent-type strings centralized to avoid typos"],"tags":["harness","agent-type","enum","unsupported"],"backgroundTag":"invalid-enum-value","analyzedSha":"8321021c54d670126ce3b2969d5deb880b4b0c2a","analyzedAt":"2026-09-16T10:08:13.343Z","contentChangedAt":"2026-09-16T10:08:13.343Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}