{"record":{"id":"f75c0624b12bb8d6","repo":"Hmbown/CodeWhale","slug":"workspace-must-not-be-empty","errorCode":null,"errorMessage":"workspace must not be empty","messagePattern":"workspace must not be empty","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/tui/src/runtime_threads.rs","lineNumber":4660,"sourceCode":"        if let Some(model) = req.model.as_ref()\n            && model.trim().is_empty()\n        {\n            bail!(\"model must not be empty\");\n        }\n        if let Some(mode) = req.mode.as_ref()\n            && mode.trim().is_empty()\n        {\n            bail!(\"mode must not be empty\");\n        }\n        if let Some(permission_posture) = req.permission_posture.as_ref()\n            && permission_posture.trim().is_empty()\n        {\n            bail!(\"permission_posture must not be empty\");\n        }\n        if let Some(workspace) = req.workspace.as_ref()\n            && workspace.as_os_str().is_empty()\n        {\n            bail!(\"workspace must not be empty\");\n        }\n\n        let configured_sandbox_mode = self.read_config().sandbox_mode.clone();\n        let (thread, changes, evicted_engine, posture_engine) = {\n            // Take the active guard first so a workspace mutation can check\n            // and evict the cached engine atomically with the durable update.\n            // Using the same order as start/compact avoids lock inversion.\n            let mut active = self.active.lock().await;\n            let _thread_mutation = self.store.thread_mutation.lock();\n            let mut thread = self\n                .store\n                .load_thread(id)\n                .with_context(|| format!(\"Thread not found: {id}\"))?;\n            let mut changes = serde_json::Map::new();\n            let policy_patch = if req.mode.is_some()\n                || req.permission_posture.is_some()\n                || req.auto_approve.is_some()\n            {","sourceCodeStart":4642,"sourceCodeEnd":4678,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/0c42157ee52f9d55af2b506d71b46249910f77d3/crates/tui/src/runtime_threads.rs#L4642-L4678","documentation":"Thread-update validation: the `workspace` field was supplied with an empty OS string. Workspace changes have downstream engine effects (see the active-turn guard), so a blank path is rejected up front.","triggerScenarios":"Thrown at crates/tui/src/runtime_threads.rs:4660 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Omit the workspace field if unchanged","Or pass a valid workspace path"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0c42157ee52f9d55af2b506d71b46249910f77d3","analyzedAt":"2026-08-20T21:50:45.477Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}