{"record":{"id":"9b0b55578c50a329","repo":"tinyhumansai/openhuman","slug":"tui-feature-disabled-at-compile-time-rebuild-with","errorCode":null,"errorMessage":"tui feature disabled at compile time; rebuild with `--features tui` (or use a default-feature build) to enable `openhuman tui`","messagePattern":"tui feature disabled at compile time; rebuild with `--features tui` \\(or use a default-feature build\\) to enable `openhuman tui`","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/cli.rs","lineNumber":192,"sourceCode":"            Some(\"model\") => parsed.model = Some(value.to_string()),\n            Some(\"provider\") => parsed.provider = Some(value.to_string()),\n            _ => unreachable!(\"launch option target is fixed above\"),\n        }\n        i += 1;\n    }\n\n    parsed.args = args[i..].to_vec();\n    Ok(parsed)\n}\n\n#[cfg(feature = \"tui\")]\nfn run_tui_from_cli(args: &[String]) -> Result<()> {\n    crate::tui::run_from_cli(args)\n}\n\n#[cfg(not(feature = \"tui\"))]\nfn run_tui_from_cli(_args: &[String]) -> Result<()> {\n    anyhow::bail!(\n        \"tui feature disabled at compile time; rebuild with `--features tui` \\\n         (or use a default-feature build) to enable `openhuman tui`\"\n    )\n}\n\n/// Pure launch policy for the bare `openhuman` command. Explicit subcommands\n/// are never rewritten. Docker and redirected/CI sessions keep the headless\n/// CLI behavior; `openhuman tui` remains an explicit override everywhere.\nfn should_auto_launch_tui(\n    args: &[String],\n    stdin_is_terminal: bool,\n    stdout_is_terminal: bool,\n    host: crate::core::types::HostKind,\n    tui_compiled: bool,\n) -> bool {\n    args.is_empty()\n        && stdin_is_terminal\n        && stdout_is_terminal","sourceCodeStart":174,"sourceCodeEnd":210,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/core/cli.rs#L174-L210","documentation":"The `openhuman tui` (alias `chat`) subcommand resolved to the compile-time stub because the binary was built without the `tui` Cargo feature - it is not in the default feature set and is intentionally not forwarded to the desktop shell. The stub reports the build fact instead of falling through to 'unknown namespace' so the message reads as a build configuration issue rather than a typo, matching the mcp precedent.","triggerScenarios":"Running `openhuman tui` or `openhuman chat` on a slim build made with --no-default-features or any explicit feature list that omitted tui; running a product or desktop-shell binary where tui is deliberately excluded via INTENTIONALLY_NOT_FORWARDED.","commonSituations":"A user installs a release binary built from product-features.txt and tries the TUI; a contributor's minimal kernel-profile build for floor work; custom embeddings that never enabled tui.","solutions":["Rebuild with the feature: `cargo build --features tui` or a default-feature build.","If you do not need the TUI, use the headless CLI path or `openhuman-core serve` instead.","Distributors: document which published builds include the tui feature."],"exampleFix":"# before\ncargo build --no-default-features --features flows\n\n# after\ncargo build --no-default-features --features \"flows,tui\"","handlingStrategy":"validation","validationCode":"# refuse to script against a TUI-less build\nif openhuman tui </dev/null 2>&1 | grep -q 'tui feature disabled at compile time'; then\n  echo 'this build has no TUI; rebuild with --features tui' >&2\n  exit 1\nfi","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Build with `--features tui` when the terminal UI is part of your workflow.","Script against exit status and the disabled-build message, not against the TUI appearing.","Remember tui is deliberately absent from desktop-shell builds - do not forward it."],"tags":["build-config","feature-gate","tui","cli"],"backgroundTag":"compile-time-feature-disabled","analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}