Hmbown/CodeWhale · error

SSH Fleet workers do not yet support nested workspace.root…

Error message

SSH Fleet workers do not yet support nested workspace.root values; task cwd '{}' cannot be mapped safely beneath the remote working_directory

What it means

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.

Solutions

  1. Set the task cwd to the workspace root itself, or restructure so each task gets its own workspace whose root is the task cwd
  2. Flatten nested workspace.root values: configure one Fleet workspace per leaf directory instead of one root with nested task cwds
  3. Check for path normalization mismatches (symlinks, trailing separators, relative paths) that make task_cwd and workspace_root differ only textually
  4. Wait for/upgrade to a Fleet version that supports nested workspace.root mapping over SSH

Example fix

// before
[workspace]
root = "/home/me/monorepo"
# task launched with cwd = /home/me/monorepo/packages/app

// after
[workspace]
root = "/home/me/monorepo/packages/app"
# task cwd now equals workspace root and maps to the remote working_directory
Defensive patterns

Strategy: validation

Validate before calling

let workspace_root = resolve_strict_authority_path(&ToolContext::new(workspace.to_path_buf()), ".")?;
if task_cwd != workspace_root {
    return Err(anyhow!("task cwd {:?} must equal workspace root for SSH Fleet workers", task_cwd));
}

Type guard

fn is_flat_workspace(task_cwd: &Path, workspace_root: &Path) -> bool {
    task_cwd == workspace_root
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22). Data as JSON: /api/errors/4ea5dbf7dd5b7b02. Report an issue: GitHub.

Appendix: source

Thrown at crates/tui/src/fleet/manager.rs:2501

            .lines()
            .all(|line| line.starts_with("- ") && line.len() <= 512)
}

fn validate_task_cwd_for_host(
    workspace: &Path,
    host: &FleetHostSpec,
    task_cwd: &Path,
) -> Result<()> {
    if !matches!(host, FleetHostSpec::Ssh { .. }) {
        return Ok(());
    }
    let workspace_root = crate::tools::spec::resolve_strict_authority_path(
        &crate::tools::ToolContext::new(workspace.to_path_buf()),
        ".",
    )
    .map_err(anyhow::Error::new)?;
    if task_cwd != workspace_root {
        bail!(
            "SSH Fleet workers do not yet support nested workspace.root values; task cwd '{}' cannot be mapped safely beneath the remote working_directory",
            task_cwd.display()
        );
    }
    Ok(())
}

/// Effective wall-clock limit for a Fleet task (R5).
///
/// `FleetTaskSpec::timeout_seconds` and `FleetTaskBudget::max_seconds` were
/// both dead config — nothing ever read them. The tighter of the two wins;
/// zero/None mean unbounded.
fn task_wall_clock_limit(task_spec: &FleetTaskSpec) -> Option<std::time::Duration> {
    let mut seconds: Option<u64> = task_spec.timeout_seconds.filter(|s| *s > 0);
    if let Some(budget_seconds) = task_spec
        .budget
        .as_ref()
        .and_then(|budget| budget.max_seconds)

View on GitHub (pinned to 73e0f67d83)