harbor 0.20.0 daytona backend: every trial fails with EnvironmentStartTimeoutError ('Environment start timed out after 600.0 seconds') even though the sandbox starts. Traceback hangs in _poll_response via ensure_dirs -> _sandbox_exec. Docker backend runs the same task fine.
Root cause: a non-root USER directive in the task's environment/Dockerfile. Daytona execs as the image USER and harbor emulates per-command users with su <user> -s /bin/bash -c ...; harbor's root-level infra commands (ensure_dirs runs with user='root') then hang forever at su's password prompt, and the env-start timeout fires. Docker never hits this because docker exec -u switches users natively.
Fix: keep the image USER root (drop the USER agent line), still create the unprivileged user and give it the workdir:
RUN useradd -m agent && chown -R agent:agent /app
# deliberately NO `USER agent` hereand run the agent as it via task.toml:
[agent]
user = "agent"su agent from root is passwordless, so infra commands work and the agent still runs unprivileged. Also pass --ek auto_snapshot=true on daytona so the env image builds remotely once (content-hash snapshot) instead of an uncached declarative build per sandbox.