{"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":622,"sourceCode":"    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\",\n      hostRedacted: true,\n      portRedacted: true,\n      commandRedacted: true,\n      expiresAt,\n      metadata: {\n        provider: \"daytona\",\n        expiresInMinutes,\n      },\n    },","sourceCodeStart":604,"sourceCodeEnd":640,"githubUrl":"https://github.com/paperclipai/paperclip/blob/67001ec6eb96ae601aa27bc91d9b2415d665334a/packages/plugins/sandbox-providers/daytona/src/plugin.ts#L604-L640","documentation":"Thrown by createSshConnection when Daytona SDK's createSshAccess returns neither a usable token nor a command/sshCommand string. The connection command is derived from access.command, access.sshCommand, or constructed from token; if none yield a non-empty command, the SSH session cannot be established.","triggerScenarios":"createSshAccess.call succeeds but access.token is not a non-empty string AND neither access.command nor access.sshCommand is a non-empty string. The fallback `ssh <token>@<gateway>` also cannot be built without a token.","commonSituations":"Daytona SDK version returns a different response shape (renamed fields); the SDK returned an empty/null token due to an account/permission issue; transient Daytona API issue returning an incomplete SSH access object; incompatible SDK response contract.","solutions":["Upgrade or align @daytonaio/sdk to the version whose createSshAccess returns token/command fields the plugin expects.","Verify the Daytona account has SSH access permissions and the gateway is configured.","Retry the interactive setup in case of a transient incomplete response.","Inspect the access object shape returned by the SDK to detect a renamed field."],"exampleFix":null,"handlingStrategy":"type-guard","validationCode":"function sshAccessHasUsableResponse(access: { token?: unknown; command?: unknown; sshCommand?: unknown }): boolean {\n  const tok = typeof access.token === 'string' && access.token.trim().length > 0;\n  const cmd = typeof access.command === 'string' && access.command.trim().length > 0\n    || typeof access.sshCommand === 'string' && access.sshCommand.trim().length > 0;\n  return tok || cmd;\n}","typeGuard":null,"tryCatchPattern":"try {\n  const session = await createSshConnection(sandbox, expiresInMinutes);\n} catch (e) {\n  if (e instanceof Error && e.message.includes('did not return a token or SSH command')) {\n    // SDK returned no token/command — align SDK version or check permissions\n  }\n  throw e;\n}","preventionTips":["Pin @daytonaio/sdk to a version whose createSshAccess response shape matches the plugin's expectations.","Verify the Daytona account has SSH gateway permissions.","Inspect the raw access object during integration to confirm field names."],"tags":["daytona","interactive-setup","ssh","sdk-version","validation"],"backgroundTag":null,"analyzedSha":"67001ec6eb96ae601aa27bc91d9b2415d665334a","analyzedAt":"2026-08-12T12:05:45.408Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}