Hmbown/CodeWhale · error
127
127
Error message
lane log proxy requires a command
What it means
run_lane_log_proxy in crates/lane/src/runtime.rs validates its command argument before doing any work; an empty command string cannot be spawned, so the proxy fails immediately with exit code 127 (the shell's 'command not found' code), appends the failure to the lane log, and writes the exit receipt. This turns a bad invocation into a clean, logged failure instead of a spawn panic.
Solutions
- Set a non-empty command in the lane configuration (or pass one to run_lane_log_proxy).
- Check for unexpanded variables in the command (e.g. $MY_BIN was empty in the environment) and export the variable or hardcode the binary path.
- Verify the config file section feeding the proxy actually defines the command key rather than defaulting it to empty.
- If the command is intentionally optional, guard the call site: skip launching the proxy when the command is blank instead of invoking it.
Example fix
// before (lane config) command = "" # or command = "$LANE_BIN" with LANE_BIN unset // after command = "/usr/local/bin/my-lane-worker"
Defensive patterns
Strategy: validation
Validate before calling
let command = lane_config.command.as_deref().unwrap_or("");
if command.trim().is_empty() {
// fail fast at config load, before invoking the proxy
return Err("lane command is empty; set command in lane config");
} Try / catch
let code = run_lane_log_proxy(...)?;
if code == 127 {
eprintln!("lane log proxy got an empty/missing command; check lane config command field");
} Prevention
- Always set a concrete, non-empty command in lane configuration; avoid bare variable substitutions that can expand to empty.
- Validate lane config at load time (fail loud) rather than discovering empty commands at spawn.
- In CI, skip the proxy call entirely when the command is intentionally absent instead of passing "".
When it happens
Trigger: Calling run_lane_log_proxy with command == "" — e.g. the lane configuration's command field is unset/empty, an environment substitution produced an empty string, or a caller passed a blank command programmatically.
Common situations: Lane config file has command = "" or a missing command key resolved to empty; a template variable (like $BIN) was unbound at spawn time; CI passes an optional command that is empty in that job.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- 125
- A pinned task provider requires an explicit model
- agent profile reasoning_effort must be one of: inherit…
- approval log has no parent
- --bridge is required in --non-interactive mode.
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/de79eadb865dd558.
Report an issue: GitHub.
Appendix: source
Thrown at crates/lane/src/runtime.rs:451
/// hidden CLI should propagate to tmux.
pub fn run_lane_log_proxy(spec: LaneLogProxySpec) -> Result<i32> {
let LaneLogProxySpec {
command,
log_path,
receipt_path,
receipt_tmp_path,
environment_path,
lane_id,
} = spec;
let fail = |error: anyhow::Error, exit_code: i32| -> Result<i32> {
append_proxy_failure(&log_path, &lane_id, &error)?;
write_lane_exit_receipt(&receipt_path, &receipt_tmp_path, &lane_id, exit_code)?;
Ok(exit_code)
};
if command.is_empty() {
return fail(anyhow::anyhow!("lane log proxy requires a command"), 127);
}
let environment = if let Some(path) = environment_path.as_deref() {
let loaded = read_lane_environment(path);
let removed = remove_file_if_present(path);
match (loaded, removed) {
(Ok(environment), Ok(())) => environment,
(Err(error), Ok(())) => return fail(error, LANE_PROXY_FAILURE_EXIT_CODE),
(Ok(_), Err(error)) | (Err(_), Err(error)) => return Err(error),
}
} else {
Vec::new()
};
let mut child_command = Command::new(&command[0]);
child_command.args(&command[1..]);
child_command.envs(environment);
child_command.stdout(Stdio::piped()).stderr(Stdio::piped());View on GitHub (pinned to 73e0f67d83)