{"record":{"id":"5d5ffb8428e0f571","repo":"BoundaryML/baml","slug":"baml-toml-toolchain-selects-channel-but-no-active-concrete","errorCode":null,"errorMessage":"baml.toml [toolchain] selects channel {}, but no active concrete version is recorded locally.\nRun: baml toolchain use {}","messagePattern":"baml\\.toml \\[toolchain\\] selects channel (.+?), but no active concrete version is recorded locally\\.\nRun: baml toolchain use (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"baml_language/crates/baml/src/main.rs","lineNumber":622,"sourceCode":"    }\n    if is_channel(&selector.selector) {\n        let state = read_state();\n        if let Some(channel) = state.channels.get(&selector.selector) {\n            if channel\n                .manifest_base_url\n                .as_deref()\n                .is_some_and(|base| base.trim_end_matches('/') != current_base)\n            {\n                return Err(anyhow!(\n                    \"channel {} was selected from a different manifest source.\\nRun: baml toolchain use {} under the current manifest source.\",\n                    selector.selector,\n                    selector.selector\n                ));\n            }\n            return Ok(channel.active_version.clone());\n        }\n        return match &selector.source {\n            SelectorSource::Project(path) => Err(anyhow!(\n                \"baml.toml [toolchain] selects channel {}, but no active concrete version is recorded locally.\\nRun: baml toolchain use {}\",\n                selector.selector,\n                selector.selector\n            )\n            .context(format!(\"project config: {}\", path.display()))),\n            _ => Err(anyhow!(\n                \"error: no BAML toolchain is installed.\\nRun: baml toolchain use canary\\nOr:  baml toolchain use nightly\"\n            )),\n        };\n    }\n    Ok(selector.selector.clone())\n}\n\nfn missing_toolchain_error(selector: &ResolvedSelector, version: &str) -> anyhow::Error {\n    let installed = installed_toolchains().join(\", \");\n    match &selector.source {\n        SelectorSource::Project(path) => anyhow!(\n            \"{} [toolchain] pins version {version}, but it isn't installed.\\nInstalled toolchains: {}\\nRun: baml toolchain install {version}\",","sourceCodeStart":604,"sourceCodeEnd":640,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/baml/src/main.rs#L604-L640","documentation":"Fires during version resolution when the project's baml.toml [toolchain] names a channel (canary or nightly), but the local state file has no recorded concrete version for that channel. Channels are mutable aliases; the wrapper only stores the concrete version that was last resolved by `baml toolchain use`, so a fresh machine or a state file that never recorded the channel cannot resolve it.","triggerScenarios":"Thrown at baml_language/crates/baml/src/main.rs:622 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Run `baml toolchain use <channel>` once to install and record a concrete version for the channel","Verify the channel name in baml.toml [toolchain] is spelled exactly 'canary' or 'nightly'"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}