Hmbown/CodeWhale · error
unknown runtime backend
Error message
unknown runtime backend `{other}` (use tmux|inline|vm|ci) What it means
RuntimeBackend::parse validates a user-supplied backend name against the four supported backends: tmux, inline, vm, and ci. Any other (case-insensitively trimmed) string is rejected with this error so configuration typos fail fast instead of silently defaulting.
Solutions
- Set the backend to one of: tmux, inline, vm, ci (case-insensitive).
- Fix the typo in the config file, CLI flag, or env var feeding the value into parse().
- If you need a backend not in the list, that backend is unsupported by this library; use tmux or inline as a substitute.
Example fix
// before
let backend = RuntimeBackend::parse("docker")?;
// after
let backend = RuntimeBackend::parse("tmux")?; Defensive patterns
Strategy: validation
Validate before calling
const BACKENDS: [&str; 4] = ["tmux", "inline", "vm", "ci"];
if !BACKENDS.contains(&raw.trim().to_ascii_lowercase().as_str()) { return Err(format!("backend {raw:?} not in tmux|inline|vm|ci")); } Try / catch
match RuntimeBackend::parse(raw) { Err(e) => { eprintln!("bad backend in config: {e}; falling back to inline"); RuntimeBackend::Inline } Ok(b) => b } Prevention
- Validate the backend string at config-load time, before constructing lanes.
- Keep the backend value in one shared constant, not scattered literals.
- Surface the allowed values in CLI help/config docs.
When it happens
Trigger: Calling RuntimeBackend::parse with a string that is not tmux/inline/vm/ci, e.g. from a config file value, CLI flag, or environment variable selecting the lane runtime backend.
Common situations: Typos in config such as "tmuxx", "TMUX " with unusual whitespace handled elsewhere, "docker" or "process" backends that this library does not support; stale config written for an older/other tool version.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- a CNB access token is not configured in the Codewhale…
- account_agent_model_unconfigured
- active profile is missing or malformed
- advisor model ` ` resolved only to a custom provider kind…
- agent profile path is not a directory
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/e10cebf09ded608d.
Report an issue: GitHub.
Appendix: source
Thrown at crates/lane/src/runtime.rs:44
}
impl RuntimeBackendKind {
pub fn as_str(self) -> &'static str {
match self {
Self::Tmux => "tmux",
Self::Inline => "inline",
Self::Vm => "vm",
Self::Ci => "ci",
}
}
pub fn parse(raw: &str) -> Result<Self> {
match raw.trim().to_ascii_lowercase().as_str() {
"tmux" => Ok(Self::Tmux),
"inline" => Ok(Self::Inline),
"vm" => Ok(Self::Vm),
"ci" => Ok(Self::Ci),
other => bail!("unknown runtime backend `{other}` (use tmux|inline|vm|ci)"),
}
}
}
/// Inputs for starting a lane under a runtime backend.
#[derive(Clone)]
pub struct LaneStartSpec {
/// Command argv to run inside the backend (e.g. `codewhale exec …`).
pub command: Vec<String>,
/// Working directory for the command (defaults to worktree or cwd).
pub cwd: Option<PathBuf>,
/// Process-local runtime overrides. Values are never written into the
/// Lane record or command argv; tmux bridges them through a private 0600
/// environment file that the detached shell removes before execution.
pub environment: Vec<(String, String)>,
/// Executable that exposes Codewhale's hidden `lane-log-proxy` command.
/// Required by tmux so arbitrary/binary child output is framed as valid
/// NDJSON without trusting a shell pipeline.View on GitHub (pinned to 73e0f67d83)