{"record":{"id":"3c17018a33e33c88","repo":"aaif-goose/goose","slug":"working-dir-is-not-a-directory","errorCode":null,"errorMessage":"working_dir '{}' is not a directory","messagePattern":"working_dir '(.+?)' is not a directory","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/goose/src/agents/platform_extensions/summon.rs","lineNumber":2099,"sourceCode":"    let resolved = if requested_path.is_absolute() {\n        requested_path\n    } else {\n        parent_dir.join(&requested_path)\n    };\n    let canonical = resolved\n        .canonicalize()\n        .map_err(|e| anyhow::anyhow!(\"working_dir '{}' could not be resolved: {}\", requested, e))?;\n    let parent_canonical = parent_dir\n        .canonicalize()\n        .unwrap_or_else(|_| parent_dir.to_path_buf());\n    if !canonical.starts_with(&parent_canonical) {\n        anyhow::bail!(\n            \"working_dir '{}' is outside the parent session directory\",\n            requested\n        );\n    }\n    if !canonical.is_dir() {\n        anyhow::bail!(\"working_dir '{}' is not a directory\", requested);\n    }\n    Ok(canonical)\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n    use serial_test::serial;\n    use std::collections::{HashMap, HashSet};\n    use std::fs;\n    use std::sync::Arc;\n    use tempfile::TempDir;\n\n    fn create_test_context() -> PlatformExtensionContext {\n        PlatformExtensionContext {\n            extension_manager: None,\n            session_manager: Arc::new(crate::session::SessionManager::instance()),\n            scheduler: None,","sourceCodeStart":2081,"sourceCodeEnd":2117,"githubUrl":"https://github.com/aaif-goose/goose/blob/3810898a7447ec3299be72e223d3570a7aabf0ab/crates/goose/src/agents/platform_extensions/summon.rs#L2081-L2117","documentation":"Error \"working_dir '{}' is not a directory\" thrown in aaif-goose/goose.","triggerScenarios":"Thrown at crates/goose/src/agents/platform_extensions/summon.rs:2099 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3810898a7447ec3299be72e223d3570a7aabf0ab","analyzedAt":"2026-08-16T10:14:26.282Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}