paperclipai/paperclip · error
Daytona file sync requires a workspace remote dir on the…
Error message
Daytona file sync requires a workspace remote dir on the lease metadata.
What it means
Confinement precondition in resolveSyncRemoteDir: the lease metadata carries no non-empty remoteCwd, so there is no workspace remote dir to confine every sandbox sync path against. The dir is recorded at acquire/resume time; if it is missing the sync refuses to run rather than operating without a confinement root.
Solutions
- Ensure the lease metadata includes workspaceRemoteDir before file sync.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at packages/plugins/sandbox-providers/daytona/src/plugin.ts:867 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of paperclipai/paperclip@3f1d897a7c (2026-08-18).
Data as JSON: /api/errors/38d300ff565fc393.
Report an issue: GitHub.
Appendix: source
Thrown at packages/plugins/sandbox-providers/daytona/src/plugin.ts:914
// surface the right exit code.
const finalLine = envArgs.length > 0
? `env ${envArgs.join(" ")} ${redirectedCommand}`
: redirectedCommand;
const lines = [
'if [ -f /etc/profile ]; then . /etc/profile >/dev/null 2>&1 || true; fi',
'if [ -f "$HOME/.profile" ]; then . "$HOME/.profile" >/dev/null 2>&1 || true; fi',
// .bash_profile typically sources .bashrc itself; only source .bashrc
// directly when no .bash_profile exists to avoid double-running setup.
'if [ -f "$HOME/.bash_profile" ]; then . "$HOME/.bash_profile" >/dev/null 2>&1 || true; elif [ -f "$HOME/.bashrc" ]; then . "$HOME/.bashrc" >/dev/null 2>&1 || true; fi',
'if [ -f "$HOME/.zprofile" ]; then . "$HOME/.zprofile" >/dev/null 2>&1 || true; fi',
];
if (input.cwd) {
lines.push(`cd ${shellQuote(input.cwd)}`);
}
lines.push(finalLine);
return lines.join(" && ");
}
// The workspace remote dir is the confinement root for native file sync. It is
// recorded on the lease metadata at acquire/resume time; require it so a sync can
// never run without a concrete root to confine every sandbox path against.
function resolveSyncRemoteDir(lease: { metadata?: Record<string, unknown> | null }): string {
const remoteCwd = lease.metadata?.remoteCwd;
if (typeof remoteCwd === "string" && remoteCwd.trim().length > 0) {
return remoteCwd.trim();
}
throw new Error("Daytona file sync requires a workspace remote dir on the lease metadata.");
}
async function createSandbox(
params: PluginEnvironmentAcquireLeaseParams | PluginEnvironmentProbeParams | PluginEnvironmentStartInteractiveSetupParams,
config: DaytonaDriverConfig,
options: { purpose?: string } = {},
): Promise<Sandbox> {
const resourceRequestError = validateRuntimeResourceRequest(config);
if (resourceRequestError) {View on GitHub (pinned to 3f1d897a7c)