{"record":{"id":"4ea5dbf7dd5b7b02","repo":"Hmbown/CodeWhale","slug":"ssh-fleet-workers-do-not-yet-support-nested-worksp","errorCode":null,"errorMessage":"SSH Fleet workers do not yet support nested workspace.root values; task cwd '{}' cannot be mapped safely beneath the remote working_directory","messagePattern":"SSH Fleet workers do not yet support nested workspace\\.root values; task cwd '(.+?)' cannot be mapped safely beneath the remote working_directory","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/tui/src/fleet/manager.rs","lineNumber":2501,"sourceCode":"            .lines()\n            .all(|line| line.starts_with(\"- \") && line.len() <= 512)\n}\n\nfn validate_task_cwd_for_host(\n    workspace: &Path,\n    host: &FleetHostSpec,\n    task_cwd: &Path,\n) -> Result<()> {\n    if !matches!(host, FleetHostSpec::Ssh { .. }) {\n        return Ok(());\n    }\n    let workspace_root = crate::tools::spec::resolve_strict_authority_path(\n        &crate::tools::ToolContext::new(workspace.to_path_buf()),\n        \".\",\n    )\n    .map_err(anyhow::Error::new)?;\n    if task_cwd != workspace_root {\n        bail!(\n            \"SSH Fleet workers do not yet support nested workspace.root values; task cwd '{}' cannot be mapped safely beneath the remote working_directory\",\n            task_cwd.display()\n        );\n    }\n    Ok(())\n}\n\n/// Effective wall-clock limit for a Fleet task (R5).\n///\n/// `FleetTaskSpec::timeout_seconds` and `FleetTaskBudget::max_seconds` were\n/// both dead config — nothing ever read them. The tighter of the two wins;\n/// zero/None mean unbounded.\nfn task_wall_clock_limit(task_spec: &FleetTaskSpec) -> Option<std::time::Duration> {\n    let mut seconds: Option<u64> = task_spec.timeout_seconds.filter(|s| *s > 0);\n    if let Some(budget_seconds) = task_spec\n        .budget\n        .as_ref()\n        .and_then(|budget| budget.max_seconds)","sourceCodeStart":2483,"sourceCodeEnd":2519,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/tui/src/fleet/manager.rs#L2483-L2519","documentation":"SSH Fleet workers execute tasks on a remote machine under a fixed remote working_directory. The manager only knows how to map a task cwd that exactly equals the resolved workspace root; a nested workspace.root (task cwd strictly inside the root) has no safe remote mapping, so the manager refuses rather than silently running the task in the wrong directory.","triggerScenarios":"Calling the SSH Fleet task path when `task_cwd != workspace_root` after resolving the workspace root via resolve_strict_authority_path — i.e. a task whose cwd is a subdirectory of workspace.root, or a differently-resolved root (symlinks, relative vs absolute, '..' segments) that fails exact string/path equality.","commonSituations":"Pointing workspace.root at a monorepo parent while running tasks in a package subdirectory; workspace.root resolved differently on the two sides of the equality check (trailing slash, symlink, case differences on macOS); enabling SSH Fleet workers on a workspace layout designed for local exec.","solutions":["Set the task cwd to the workspace root itself, or restructure so each task gets its own workspace whose root is the task cwd","Flatten nested workspace.root values: configure one Fleet workspace per leaf directory instead of one root with nested task cwds","Check for path normalization mismatches (symlinks, trailing separators, relative paths) that make task_cwd and workspace_root differ only textually","Wait for/upgrade to a Fleet version that supports nested workspace.root mapping over SSH"],"exampleFix":"// before\n[workspace]\nroot = \"/home/me/monorepo\"\n# task launched with cwd = /home/me/monorepo/packages/app\n\n// after\n[workspace]\nroot = \"/home/me/monorepo/packages/app\"\n# task cwd now equals workspace root and maps to the remote working_directory","handlingStrategy":"validation","validationCode":"let workspace_root = resolve_strict_authority_path(&ToolContext::new(workspace.to_path_buf()), \".\")?;\nif task_cwd != workspace_root {\n    return Err(anyhow!(\"task cwd {:?} must equal workspace root for SSH Fleet workers\", task_cwd));\n}","typeGuard":"fn is_flat_workspace(task_cwd: &Path, workspace_root: &Path) -> bool {\n    task_cwd == workspace_root\n}","tryCatchPattern":null,"preventionTips":["Keep SSH Fleet task cwds equal to the workspace root","Use one workspace entry per leaf directory instead of a shared nested root","Normalize paths (canonicalize) before comparing to avoid symlink/trailing-slash mismatches"],"tags":["ssh","fleet","workspace","path-mapping"],"backgroundTag":"unsupported-operation","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}