Hmbown/CodeWhale · error · anyhow::Error

inline runtime requires a non-empty command

Error message

inline runtime requires a non-empty command

What it means

InlineRuntime::start rejects a LaneStartSpec with an empty command vector before creating a worktree or appending the lane_started event. The inline backend execs spec.command[0] directly as a child process, so an empty vector has no program to run and is refused at the boundary — no state is mutated.

Source

Thrown at crates/lane/src/runtime.rs:956

}

/// In-process / local command runtime (no tmux). Used for tests and headless.
#[derive(Debug, Default)]
pub struct InlineRuntime;

impl RuntimeBackend for InlineRuntime {
    fn kind(&self) -> RuntimeBackendKind {
        RuntimeBackendKind::Inline
    }

    fn start(
        &self,
        registry: &LaneRegistry,
        record: &mut LaneRecord,
        spec: &LaneStartSpec,
    ) -> Result<()> {
        if spec.command.is_empty() {
            bail!("inline runtime requires a non-empty command");
        }
        let cwd = apply_worktree(record, spec)?;
        append_log_event(
            &record.log_path,
            serde_json::json!({
                "type": "lane_started",
                "lane_id": record.id,
                "runtime": "inline",
                "command": spec.command,
            }),
        )?;
        if !registry.mark_running_if_pending(record)? {
            bail!(
                "lane `{}` was stopped before inline start completed",
                record.id
            );
        }

View on GitHub (pinned to 0c42157ee5)

Solutions

  1. Supply a concrete program (e.g. ["bash", "-c", script] or ["make", "test"]) in the spec
  2. Validate command non-emptiness in your own layer before building the spec
  3. Fix the config entry that produced the blank command

Example fix

// before
let spec = LaneStartSpec { command: cmd_line.split(' ').map(String::from).collect(), .. }; // "" -> []

// after
let command: Vec<String> = cmd_line
    .split_whitespace()
    .map(String::from)
    .collect::<Vec<_>>();
anyhow::ensure!(!command.is_empty(), "lane command must not be empty");
let spec = LaneStartSpec { command, .. };
Defensive patterns

Strategy: validation

Validate before calling

anyhow::ensure!(!spec.command.is_empty(), "lane command must not be empty");

Prevention

When it happens

Trigger: Calling lane start with backend "inline" and spec.command = [] — e.g. a blank command string split into words, or a defaulted empty vec from an options parser.

Common situations: Config files with empty command entries; CLI arguments consumed without values; commands derived from filtered/conditional lists that collapse to nothing.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20). Data as JSON: /api/errors/80fa1cbe0ef17a76. Report an issue: GitHub.