{"record":{"id":"c47897b8594acac6","repo":"affaan-m/ECC","slug":"configured-harness-runner-for-runner-key-is-miss","errorCode":null,"errorMessage":"Configured harness runner for {runner_key} is missing a program","messagePattern":"Configured harness runner for (.+?) is missing a program","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"ecc2/src/session/manager.rs","lineNumber":2335,"sourceCode":"            session.state\n        );\n    }\n\n    if let Some(worktree) = session.worktree.as_ref() {\n        let _ = crate::worktree::remove(worktree);\n    }\n\n    db.delete_session(&session.id)?;\n    Ok(())\n}\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)?","sourceCodeStart":2317,"sourceCodeEnd":2353,"githubUrl":"https://github.com/affaan-m/ECC/blob/01e15490f04e29cfefe3896951f43db46994d8ee/ecc2/src/session/manager.rs#L2317-L2353","documentation":"The agent_program function resolves the executable path for a given agent type. If a harness runner is configured for the runner_key but its program field is empty after trimming, the configuration is incomplete and the system cannot spawn the agent. This catches misconfigured runner entries before attempting to spawn.","triggerScenarios":"A harness_runner entry exists in config for the runner_key (derived from agent type) but the program field is empty or whitespace-only.","commonSituations":"Config file has a runner entry with a missing or blank 'program' key. Environment variable interpolation for the program path resolved to empty. Copy-paste config error where the program value was accidentally deleted.","solutions":["Set the program field in the harness runner config to the full path of the agent executable (e.g., '/usr/local/bin/claude')","Verify the agent binary is installed and accessible at the configured path","Remove the runner entry if you want to use the default program resolution (claude, codex, opencode, gemini from PATH)","Validate config on startup — check that every configured runner has a non-empty program"],"exampleFix":"// before (config):\n// harness_runners:\n//   claude-runner:\n//     program: \"\"\n\n// after (config):\n// harness_runners:\n//   claude-runner:\n//     program: \"/usr/local/bin/claude\"\n// or remove the entry entirely to use PATH-based defaults","handlingStrategy":"validation","validationCode":"fn validate_runner_config(cfg: &Config) -> Result<()> {\n    for (key, runner) in cfg.list_harness_runners() {\n        if runner.program.trim().is_empty() {\n            anyhow::bail!(\"harness runner '{key}' has empty program\");\n        }\n    }\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate all harness runner configs on startup before any session is launched","Use config schema validation to reject empty program fields at load time","Test agent_program resolution during health checks"],"tags":["configuration","harness","runner","agent-program"],"backgroundTag":null,"analyzedSha":"01e15490f04e29cfefe3896951f43db46994d8ee","analyzedAt":"2026-08-13T00:31:08.655Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}