paperclipai/paperclip · error

Daytona interactive setup requires @daytonaio/sdk Sandbox.cr

Error message

Daytona interactive setup requires @daytonaio/sdk Sandbox.createSshAccess support.

What it means

Thrown by createSshConnection when the Daytona SDK Sandbox object does not expose a createSshAccess function. Interactive setup SSH sessions depend on @daytonaio/sdk's Sandbox.createSshAccess support; if the installed SDK version lacks it, the feature cannot proceed.

Source

Thrown at packages/plugins/sandbox-providers/daytona/src/plugin.ts:604

    };
  }
  if (sourceKind !== "snapshot") {
    throw new Error(`Daytona interactive setup can start from image or snapshot templates only, not ${sourceKind}.`);
  }
  return {
    ...config,
    snapshot: params.sourceTemplateRef,
    image: null,
  };
}

async function createSshConnection(
  sandbox: Sandbox,
  expiresInMinutes: number,
): Promise<Pick<PluginEnvironmentInteractiveSetupSession, "connectionSummary" | "connectionPayload">> {
  const createSshAccess = (sandbox as DaytonaInteractiveSandbox).createSshAccess;
  if (typeof createSshAccess !== "function") {
    throw new Error(
      "Daytona interactive setup requires @daytonaio/sdk Sandbox.createSshAccess support.",
    );
  }

  const fallbackExpiresAt = expiresAtForMinutes(expiresInMinutes);
  const access = await createSshAccess.call(sandbox, expiresInMinutes);
  const token = typeof access.token === "string" && access.token.trim().length > 0
    ? access.token.trim()
    : null;
  const commandFromAccess =
    typeof access.command === "string" && access.command.trim().length > 0
      ? access.command.trim()
      : typeof access.sshCommand === "string" && access.sshCommand.trim().length > 0
        ? access.sshCommand.trim()
        : null;
  const command = commandFromAccess ?? (token ? `ssh ${token}@${DAYTONA_SSH_GATEWAY_HOST}` : null);
  if (!command) {
    throw new Error("Daytona SSH access did not return a token or SSH command.");

View on GitHub (pinned to 67001ec6eb)

Solutions

  1. Upgrade @daytonaio/sdk to a version that exposes Sandbox.createSshAccess (check the SDK changelog).
  2. Run `pnpm update @daytonaio/sdk` (or the workspace-specific install) and restart.
  3. Confirm the resolved SDK version in package-lock/pnpm-lock and that no override pins an older one.
  4. If upgrade is blocked, avoid the interactive SSH setup flow until the SDK is updated.

Example fix

// before: @daytonaio/sdk pinned to old version
"@daytonaio/sdk": "^0.20.0"
// after: version with createSshAccess
"@daytonaio/sdk": "^0.40.0"
Defensive patterns

Strategy: type-guard

Validate before calling

import type { Sandbox } from '@daytonaio/sdk';
function supportsCreateSshAccess(s: Sandbox): boolean {
  return typeof (s as unknown as { createSshAccess?: unknown }).createSshAccess === 'function';
}

Type guard

function hasCreateSshAccess(s: unknown): s is { createSshAccess: (mins: number) => Promise<{ token?: string; command?: string; sshCommand?: string; expiresAt?: string }> } {
  return typeof (s as { createSshAccess?: unknown }).createSshAccess === 'function';
}

Prevention

When it happens

Trigger: onEnvironmentStartInteractiveSetup reaches createSshConnection and (sandbox as DaytonaInteractiveSandbox).createSshAccess is not a function — typically because the installed @daytonaio/sdk version predates the SSH access API.

Common situations: Upgraded the Paperclip plugin but @daytonaio/sdk dependency is pinned to an older version; SDK major version change removed/renamed createSshAccess; using a forked/custom SDK build without the SSH method.

Related errors


AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12). Data as JSON: /api/errors/eb2b94acf6d583de. Report an issue: GitHub.