{"record":{"id":"dd55350f4874bcd9","repo":"Hmbown/CodeWhale","slug":"lane-log-proxy-requires-a-command","errorCode":null,"errorMessage":"lane log proxy requires a command","messagePattern":"lane log proxy requires a command","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/lane/src/runtime.rs","lineNumber":451,"sourceCode":"/// hidden CLI should propagate to tmux.\npub fn run_lane_log_proxy(spec: LaneLogProxySpec) -> Result<i32> {\n    let LaneLogProxySpec {\n        command,\n        log_path,\n        receipt_path,\n        receipt_tmp_path,\n        environment_path,\n        lane_id,\n    } = spec;\n\n    let fail = |error: anyhow::Error, exit_code: i32| -> Result<i32> {\n        append_proxy_failure(&log_path, &lane_id, &error)?;\n        write_lane_exit_receipt(&receipt_path, &receipt_tmp_path, &lane_id, exit_code)?;\n        Ok(exit_code)\n    };\n\n    if command.is_empty() {\n        return fail(anyhow::anyhow!(\"lane log proxy requires a command\"), 127);\n    }\n\n    let environment = if let Some(path) = environment_path.as_deref() {\n        let loaded = read_lane_environment(path);\n        let removed = remove_file_if_present(path);\n        match (loaded, removed) {\n            (Ok(environment), Ok(())) => environment,\n            (Err(error), Ok(())) => return fail(error, LANE_PROXY_FAILURE_EXIT_CODE),\n            (Ok(_), Err(error)) | (Err(_), Err(error)) => return Err(error),\n        }\n    } else {\n        Vec::new()\n    };\n\n    let mut child_command = Command::new(&command[0]);\n    child_command.args(&command[1..]);\n    child_command.envs(environment);\n    child_command.stdout(Stdio::piped()).stderr(Stdio::piped());","sourceCodeStart":433,"sourceCodeEnd":469,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/433685b2024e7bc4c99e1e2e326bcad39b4d9d65/crates/lane/src/runtime.rs#L433-L469","documentation":"run_lane_log_proxy wraps a child command in a lane log-proxy that captures frames, appends failures to a log, and writes an exit receipt. It requires a non-empty command; an empty argv has nothing to spawn, so it fails fast with exit code 127 (command not found convention) after writing the failure record and receipt.","triggerScenarios":"Invoking the lane log proxy (CLI/runtime) without providing the command argument, or with an empty vector/string argv.","commonSituations":"Missing CLI argument when wiring the proxy in scripts or CI, a config/environment file lost the command field, or shell quoting collapsed the command to nothing.","solutions":["Pass the command to run as the proxy argument, e.g. lane log proxy -- <cmd> <args...>","Fix the calling script/config so the command variable is not empty","Check the written exit receipt and proxy failure log to confirm the empty-command cause"],"exampleFix":"// before\nlane log proxy --            # no command\n// after\nlane log proxy -- cargo test --workspace","handlingStrategy":"validation","validationCode":"if command.is_empty() {\n    anyhow::bail!(\"lane log proxy requires a command\");\n}","typeGuard":"fn has_command(args: &[String]) -> bool { !args.is_empty() && !args[0].trim().is_empty() }","tryCatchPattern":"let code = run_lane_log_proxy(args).unwrap_or_else(|e| { eprintln!(\"lane log proxy: {e}\"); 127 });","preventionTips":["Validate the command argument is non-empty before invoking the proxy","Quote commands properly in scripts so argv is not collapsed to empty","Check exit receipt 127 means the command was missing, not that it failed"],"tags":["cli","lane","missing-argument"],"backgroundTag":"missing-required-argument","analyzedSha":"433685b2024e7bc4c99e1e2e326bcad39b4d9d65","analyzedAt":"2026-09-15T12:24:24.634Z","contentChangedAt":"2026-09-15T12:24:24.634Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}