{"record":{"id":"45d709c7e10ef0f3","repo":"paperclipai/paperclip","slug":"daytona-ssh-access-did-not-return-a-token-or-ssh-c","errorCode":null,"errorMessage":"Daytona SSH access did not return a token or SSH command.","messagePattern":"Daytona SSH access did not return a token or SSH command\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/plugins/sandbox-providers/daytona/src/plugin.ts","lineNumber":767,"sourceCode":"  };\n}\n\nasync function createSshConnection(\n  sandbox: Sandbox,\n  expiresInMinutes: number,\n): Promise<Pick<PluginEnvironmentInteractiveSetupSession, \"connectionSummary\" | \"connectionPayload\">> {\n  const createSshAccess = (sandbox as DaytonaInteractiveSandbox).createSshAccess;\n  if (typeof createSshAccess !== \"function\") {\n    throw new Error(\n      \"Daytona interactive setup requires @daytonaio/sdk Sandbox.createSshAccess support.\",\n    );\n  }\n\n  const fallbackExpiresAt = expiresAtForMinutes(expiresInMinutes);\n  const access = await createSshAccess.call(sandbox, expiresInMinutes);\n  const token = typeof access.token === \"string\" && access.token.trim().length > 0\n    ? access.token.trim()\n    : null;\n  const commandFromAccess =\n    typeof access.command === \"string\" && access.command.trim().length > 0\n      ? access.command.trim()\n      : typeof access.sshCommand === \"string\" && access.sshCommand.trim().length > 0\n        ? access.sshCommand.trim()\n        : null;\n  const command = commandFromAccess ?? (token ? `ssh ${token}@${DAYTONA_SSH_GATEWAY_HOST}` : null);\n  if (!command) {\n    throw new Error(\"Daytona SSH access did not return a token or SSH command.\");\n  }\n  const expiresAt = typeof access.expiresAt === \"string\" && access.expiresAt.trim().length > 0\n    ? access.expiresAt.trim()\n    : fallbackExpiresAt;\n\n  return {\n    connectionSummary: {\n      type: \"ssh\",\n      username: \"token\",","sourceCodeStart":749,"sourceCodeEnd":785,"githubUrl":"https://github.com/paperclipai/paperclip/blob/3f1d897a7c018d76563a21c6e39c3c9b03933622/packages/plugins/sandbox-providers/daytona/src/plugin.ts#L749-L785","documentation":"Response-shape guard in createSshConnection: createSshAccess succeeded but returned neither a non-empty token nor a usable SSH command (checked via access.command / access.sshCommand). Without both, the connection payload handed to the user for interactive setup would be unusable, so the session is refused rather than returned half-formed.","triggerScenarios":"Thrown at packages/plugins/sandbox-providers/daytona/src/plugin.ts:720 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry createSshAccess; verify the Daytona account/sandbox supports SSH access."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"3f1d897a7c018d76563a21c6e39c3c9b03933622","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}