affaan-m/ECC · error · anyhow::Error
Configured harness runner for {runner_key} is missing a prog
Error message
Configured harness runner for {runner_key} is missing a program What it means
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.
Source
Thrown at ecc2/src/session/manager.rs:2335
session.state
);
}
if let Some(worktree) = session.worktree.as_ref() {
let _ = crate::worktree::remove(worktree);
}
db.delete_session(&session.id)?;
Ok(())
}
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)?View on GitHub (pinned to 01e15490f0)
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
Example fix
// before (config): // harness_runners: // claude-runner: // program: "" // after (config): // harness_runners: // claude-runner: // program: "/usr/local/bin/claude" // or remove the entry entirely to use PATH-based defaults
Defensive patterns
Strategy: validation
Validate before calling
fn validate_runner_config(cfg: &Config) -> Result<()> {
for (key, runner) in cfg.list_harness_runners() {
if runner.program.trim().is_empty() {
anyhow::bail!("harness runner '{key}' has empty program");
}
}
Ok(())
} Prevention
- 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
When it happens
Trigger: A harness_runner entry exists in config for the runner_key (derived from agent type) but the program field is empty or whitespace-only.
Common situations: 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.
Related errors
- Unsupported agent type: {other}
- 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/c47897b8594acac6.
Report an issue: GitHub.