Hmbown/CodeWhale · error
SSH Fleet workers do not yet support nested workspace.root v
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
For SSH fleet hosts, the worker's remote cwd is mapped directly onto the configured remote working_directory; only a task cwd equal to the resolved workspace root can be mapped safely. If task_cwd differs from resolve_strict_authority_path(workspace, "."), the run is refused rather than guessing a remote path.
Source
Thrown at crates/tui/src/fleet/manager.rs:2376
.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(())
}
fn task_receipt_outcome(
payload: &FleetWorkerEventPayload,
exit_code: Option<i32>,
) -> (FleetTaskResult, Option<FleetTaskFailureKind>, Option<i32>) {
match payload {
FleetWorkerEventPayload::Completed {
exit_code: payload_exit_code,
..
} => (
FleetTaskResult::Pass,
None,View on GitHub (pinned to 0c42157ee5)
Solutions
- Set the task cwd to the workspace root ("." / omit cwd) for SSH hosts
- Flatten workspace.root so the task cwd equals the root
- Use a local (non-SSH) host if nested cwds are a hard requirement
- Track the feature request rather than symlinking around it on the remote
Example fix
# before (task.toml, SSH host) [[tasks]] objective = "fix tests" cwd = "crates/tui" # after [[tasks]] objective = "fix tests" cwd = "."
Defensive patterns
Strategy: validation
Validate before calling
fn task_cwd_ok_for_ssh(task_cwd: &std::path::Path, workspace_root: &std::path::Path) -> bool {
task_cwd == workspace_root
}
// before starting an SSH-hosted run:
assert!(task_cwd_ok_for_ssh(&task.cwd, &workspace_root),
"SSH fleet tasks must run at the workspace root"); Try / catch
match fleet_manager.start_run(&spec) {
Ok(run) => Ok(run),
Err(err) if err.to_string().contains("nested workspace.root") => {
eprintln!("set task cwd to the workspace root or use a local host");
Err(err)
}
Err(err) => Err(err),
} Prevention
- Default SSH fleet task specs to cwd = "." at the workspace root
- Validate task specs against the host type before submission, not at launch time
- Track nested-root support rather than working around it with remote symlinks
When it happens
Trigger: Starting an SSH fleet run whose task spec sets cwd to a subdirectory (or any path other than the workspace root), e.g. cwd = "crates/tui" with an SSH host.
Common situations: Copying a local fleet task spec that used a nested cwd to an SSH host config; setting workspace.root to a nested value while tasks default cwd elsewhere.
Related errors
- fleet run {} is already terminal ({lifecycle:?})
- fleet manager for run {} exited with open work; wait for sta
- worker {worker_id} no longer has that running fleet task
- worker {worker_id} has no fleet task to restart
- Fleet worker {worker_id} coordination state is busy; retry r
AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20).
Data as JSON: /api/errors/4ea5dbf7dd5b7b02.
Report an issue: GitHub.