{"record":{"id":"6e9040b1e81df4b8","repo":"LGUG2Z/komorebi","slug":"powershell-session-not-started","errorCode":null,"errorMessage":"PowerShell session not started","messagePattern":"PowerShell session not started","errorType":"exception","errorClass":"ErrorKind::NotFound","httpStatus":null,"severity":"error","filePath":"komorebi-bar/src/bar.rs","lineNumber":145,"sourceCode":"    Ok(())\n}\n\npub fn exec_powershell(cmd: &str) -> eyre::Result<()> {\n    if let Some(session_stdin) = SESSION_STDIN.lock().as_mut() {\n        if let Err(e) = writeln!(session_stdin, \"{cmd}\") {\n            tracing::error!(error = %e, cmd = cmd, \"failed to write command to PowerShell stdin\");\n            return Err(e.into());\n        }\n\n        if let Err(e) = session_stdin.flush() {\n            tracing::error!(error = %e, \"failed to flush PowerShell stdin\");\n            return Err(e.into());\n        }\n\n        return Ok(());\n    }\n\n    Err(Error::new(ErrorKind::NotFound, \"PowerShell session not started\").into())\n}\n\npub struct Komobar {\n    pub hwnd: Option<isize>,\n    pub monitor_index: Option<usize>,\n    pub disabled: bool,\n    pub config: KomobarConfig,\n    pub render_config: Rc<RefCell<RenderConfig>>,\n    pub monitor_info: Option<Rc<RefCell<MonitorInfo>>>,\n    pub left_widgets: Vec<Box<dyn BarWidget>>,\n    pub center_widgets: Vec<Box<dyn BarWidget>>,\n    pub right_widgets: Vec<Box<dyn BarWidget>>,\n    pub rx_gui: Receiver<KomorebiEvent>,\n    pub rx_config: Receiver<KomobarConfig>,\n    pub bg_color: Rc<RefCell<Color32>>,\n    pub bg_color_with_alpha: Rc<RefCell<Color32>>,\n    pub scale_factor: f32,\n    pub size_rect: komorebi_client::Rect,","sourceCodeStart":127,"sourceCodeEnd":163,"githubUrl":"https://github.com/LGUG2Z/komorebi/blob/e0709f02bfae4e503bf4640f58ee75ecbbfdbb97/komorebi-bar/src/bar.rs#L127-L163","documentation":"Sentinel error from komorebi-bar's exec_powershell: the persistent PowerShell session (whose stdin is stored in SESSION_STDIN) was never started, so commands cannot be written to it. Fires when the bar's PowerShell child process failed to spawn or was not initialized before execute() attempted to send it a command.","triggerScenarios":"Thrown at komorebi-bar/src/bar.rs:145 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check komorebi-bar startup logs for why the PowerShell session failed to spawn (e.g. powershell.exe not on PATH)","Restart komorebi-bar so the session is initialized before commands are issued","Ensure the PowerShell executable is available and not blocked by security policy"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e0709f02bfae4e503bf4640f58ee75ecbbfdbb97","analyzedAt":"2026-09-06T07:08:05.107Z","contentChangedAt":"2026-09-06T07:08:05.107Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}