{"record":{"id":"e10cebf09ded608d","repo":"Hmbown/CodeWhale","slug":"unknown-runtime-backend-other-use-tmux-inline","errorCode":null,"errorMessage":"unknown runtime backend `{other}` (use tmux|inline|vm|ci)","messagePattern":"unknown runtime backend `(.+?)` \\(use tmux\\|inline\\|vm\\|ci\\)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/lane/src/runtime.rs","lineNumber":44,"sourceCode":"}\n\nimpl RuntimeBackendKind {\n    pub fn as_str(self) -> &'static str {\n        match self {\n            Self::Tmux => \"tmux\",\n            Self::Inline => \"inline\",\n            Self::Vm => \"vm\",\n            Self::Ci => \"ci\",\n        }\n    }\n\n    pub fn parse(raw: &str) -> Result<Self> {\n        match raw.trim().to_ascii_lowercase().as_str() {\n            \"tmux\" => Ok(Self::Tmux),\n            \"inline\" => Ok(Self::Inline),\n            \"vm\" => Ok(Self::Vm),\n            \"ci\" => Ok(Self::Ci),\n            other => bail!(\"unknown runtime backend `{other}` (use tmux|inline|vm|ci)\"),\n        }\n    }\n}\n\n/// Inputs for starting a lane under a runtime backend.\n#[derive(Clone)]\npub struct LaneStartSpec {\n    /// Command argv to run inside the backend (e.g. `codewhale exec …`).\n    pub command: Vec<String>,\n    /// Working directory for the command (defaults to worktree or cwd).\n    pub cwd: Option<PathBuf>,\n    /// Process-local runtime overrides. Values are never written into the\n    /// Lane record or command argv; tmux bridges them through a private 0600\n    /// environment file that the detached shell removes before execution.\n    pub environment: Vec<(String, String)>,\n    /// Executable that exposes Codewhale's hidden `lane-log-proxy` command.\n    /// Required by tmux so arbitrary/binary child output is framed as valid\n    /// NDJSON without trusting a shell pipeline.","sourceCodeStart":26,"sourceCodeEnd":62,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/lane/src/runtime.rs#L26-L62","documentation":"Thrown by RuntimeBackend::parse when the backend string, after trimming and lowercasing, is not one of the four supported backends: tmux, inline, vm, or ci. Parsing is case-insensitive and whitespace-tolerant, so the failure means the value is genuinely a different word (e.g. 'docker', 'ssh', 'local') or a typo.","triggerScenarios":"A runtime = \"docker\" or \"remote\" entry in lane/runtime config, a CLI flag like --runtime ssh, or a typo such as \"in line\" or \"tmux2\". Only the exact four identifiers (in any case) parse.","commonSituations":"Assuming a Docker/SSH backend exists because other agent tools have one; config copied between tool versions where backend names changed; machine-generated configs enumerating hypothetical backends.","solutions":["Use one of the four supported values: tmux, inline, vm, or ci (case-insensitive)","Check for typos and stray characters — 'in line' with a space or 'vm:' with a suffix both fail","If you need a container/remote feel today, map it onto 'vm' or 'ci' as documented, or remove the setting to use the default backend"],"exampleFix":"# before\nruntime = \"docker\"\n\n# after\nruntime = \"vm\"","handlingStrategy":"type-guard","validationCode":"fn valid_backend(raw: &str) -> bool {\n    matches!(raw.trim().to_ascii_lowercase().as_str(), \"tmux\" | \"inline\" | \"vm\" | \"ci\")\n}\n\nassert!(valid_backend(&raw), \"runtime must be one of tmux|inline|vm|ci\");","typeGuard":"fn is_supported_backend(raw: &str) -> bool {\n    matches!(raw.trim().to_ascii_lowercase().as_str(), \"tmux\" | \"inline\" | \"vm\" | \"ci\")\n}","tryCatchPattern":"let backend = match RuntimeBackend::parse(&raw) {\n    Ok(b) => b,\n    Err(err) if err.to_string().contains(\"unknown runtime backend\") => {\n        RuntimeBackend::parse(\"tmux\")? // explicit fallback to default backend\n    }\n    Err(err) => return Err(err),\n};","preventionTips":["Offer backend as a closed-choice option (CLI enum/config dropdown), never free text","Reject unknown backend strings at config load with the supported list in the message"],"tags":["rust","lane","runtime","enum","validation"],"backgroundTag":"invalid-enum-value","analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}