Skip to content

fix(sandbox-adapter): stop waiting on aborted Daytona exec - #340

Merged
eersnington merged 1 commit into
fix/pi-env-abortfrom
fix/daytona-exec-abort
Oct 8, 2026
Merged

eersnington merged 1 commit into
fix/pi-env-abortfrom
fix/daytona-exec-abort

Conversation

@eersnington

@eersnington eersnington commented Oct 8, 2026 •

Copy link
Copy Markdown
Member

The Sandbox.exec contract says an abort rejects with Error("aborted"). Daytona's executeCommand takes no signal, so a Stop during bash: npm test waited for the command. An Actor sleep or upgrade waited too, up to sleepGracePeriod.

 exec: async (command, options) => {
+	if (options.signal?.aborted) throw new Error("aborted");
-	result = await sandbox.process.executeCommand(command, options.cwd, options.env, timeout);
+	result = await untilAborted(
+		sandbox.process.executeCommand(command, options.cwd, options.env, timeout),
+		options.signal,
+	);
  • untilAborted rejects with Error("aborted") when the signal fires first, and removes its listener when the call settles.
  • Daytona cannot stop the command. Deleting its session does not stop it either. So the command keeps running in the sandbox until it exits or reaches its timeout. Only the wait ends.

This is part 3 of 9 in a stack:

@eersnington eersnington changed the title fix(sandbox-adapter): reject an aborted Daytona exec without waiting for the command fix(sandbox-adapter): stop waiting on aborted Daytona exec Oct 8, 2026
@eersnington
eersnington force-pushed the fix/daytona-exec-abort branch from 23e88bb to dbdc3d0 Compare October 8, 2026 15:40
@eersnington
eersnington added this pull request to stack #347 October 8, 2026 16:05
@eersnington
eersnington merged commit 3145e9e into main Oct 8, 2026
0 of 6 checks passed
@eersnington
eersnington deleted the fix/daytona-exec-abort branch October 8, 2026 16:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant