paperclipai/paperclip · error
Daytona interactive setup can start from image or snapshot t
Error message
Daytona interactive setup can start from image or snapshot templates only, not ${sourceKind}. What it means
Thrown by applyInteractiveSetupSourceTemplate when sourceTemplateKind is neither 'image' nor 'snapshot' (defaults to 'snapshot' when omitted). Daytona interactive setup can only start from an image reference or a snapshot reference.
Source
Thrown at packages/plugins/sandbox-providers/daytona/src/plugin.ts:589
.slice(0, 96);
return cleaned || fallback;
}
function withSetupSourceTemplate(
config: DaytonaDriverConfig,
params: Pick<PluginEnvironmentStartInteractiveSetupParams, "sourceTemplateRef" | "sourceTemplateKind">,
): DaytonaDriverConfig {
if (!params.sourceTemplateRef) return config;
const sourceKind = params.sourceTemplateKind ?? "snapshot";
if (sourceKind === "image") {
return {
...config,
image: params.sourceTemplateRef,
snapshot: null,
};
}
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.",
);
}View on GitHub (pinned to 67001ec6eb)
Solutions
- Set sourceTemplateKind to either 'image' (to use an image ref) or 'snapshot' (the default, to use a snapshot ref).
- If using an image, provide sourceTemplateRef as the image identifier; for snapshot, provide the snapshot identifier.
- Omit sourceTemplateKind entirely if you mean 'snapshot' (the default).
Example fix
// before: unsupported kind params.sourceTemplateKind = 'container' // after: valid kind params.sourceTemplateKind = 'image' // or 'snapshot'
Defensive patterns
Strategy: validation
Validate before calling
const ALLOWED_TEMPLATE_KINDS = new Set(['image', 'snapshot']);
function isValidTemplateKind(kind: string | undefined): boolean {
return kind === undefined || ALLOWED_TEMPLATE_KINDS.has(kind);
} Type guard
function isDaytonaTemplateKind(v: string): v is 'image' | 'snapshot' {
return v === 'image' || v === 'snapshot';
} Prevention
- Only pass sourceTemplateKind values 'image' or 'snapshot' (or omit it for the default 'snapshot').
- Validate template kind at the caller boundary before invoking interactive setup.
When it happens
Trigger: onEnvironmentStartInteractiveSetup is called with sourceTemplateRef set and sourceTemplateKind being some value other than 'image' or 'snapshot' (e.g. a typo, an unsupported kind, or an empty string).
Common situations: Caller passes a template kind the Daytona driver does not support; upstream code passes a generic kind like 'docker' or 'container'; sourceTemplateKind defaulted unexpectedly because the caller omitted it but supplied a ref of a different kind.
Related errors
- Daytona SSH access did not return a token or SSH command.
- Cannot capture a Daytona template without a setup sandbox le
- template path must be one of ${TEMPLATE_FILES.join(", ")}
- Daytona sync ${label} path is not a confined absolute path:
- Daytona sync ${label} path escapes the workspace remote dir:
AI-assisted analysis of paperclipai/paperclip@67001ec6eb (2026-08-12).
Data as JSON: /api/errors/2aacc64731f3bc67.
Report an issue: GitHub.