{"record":{"id":"cf3f756a3d2aa303","repo":"tinyhumansai/openhuman","slug":"shell-not-set","errorCode":null,"errorMessage":"$SHELL not set","messagePattern":"\\$SHELL not set","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/platform/doctor/core.rs","lineNumber":719,"sourceCode":"                cat,\n                format!(\"{channel_count} channels, {stale} stale\"),\n            ));\n        }\n    }\n}\n\n// ── Environment checks ───────────────────────────────────────────\n\nfn check_environment(items: &mut Vec<DiagnosticItem>) {\n    let cat = \"environment\";\n\n    // git\n    check_command_available(\"git\", &[\"--version\"], cat, items);\n\n    // Shell\n    let shell = std::env::var(\"SHELL\").unwrap_or_default();\n    if shell.is_empty() {\n        items.push(DiagnosticItem::warn(cat, \"$SHELL not set\"));\n    } else {\n        items.push(DiagnosticItem::ok(cat, format!(\"shell: {shell}\")));\n    }\n\n    // HOME\n    if std::env::var(\"HOME\").is_ok() || std::env::var(\"USERPROFILE\").is_ok() {\n        items.push(DiagnosticItem::ok(cat, \"home directory env set\"));\n    } else {\n        items.push(DiagnosticItem::error(\n            cat,\n            \"neither $HOME nor $USERPROFILE is set\",\n        ));\n    }\n\n    // Optional tools\n    check_command_available(\"curl\", &[\"--version\"], cat, items);\n}\n","sourceCodeStart":701,"sourceCodeEnd":737,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/platform/doctor/core.rs#L701-L737","documentation":"Doctor environment check: the SHELL environment variable is empty or unset. The agent's shell tool uses $SHELL to pick the interactive shell for command execution; with it missing, shell fallbacks degrade to a default (typically sh), which can change globbing, profile loading and script behaviour inside agent commands. Common in services/launchers that scrub the environment.","triggerScenarios":"Thrown at src/openhuman/platform/doctor/core.rs:719 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Launch the app from a normal login shell or set SHELL in the service unit / launch environment (e.g. SHELL=/bin/bash)","On macOS launched-from-Finder contexts, export SHELL in the wrapper script","Accept the default-shell fallback if sh semantics are fine"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}