Skip to content

fix(sandbox-adapter): agentos hosted vm errors - #355

Closed
eersnington wants to merge 1 commit into
mainfrom
fix/sandbox-agentos-commands
Closed

eersnington wants to merge 1 commit into
mainfrom
fix/sandbox-agentos-commands

Conversation

@eersnington

Copy link
Copy Markdown
Member

Three fixes so agentOSProvider commands work in hosted agentOS VMs.

Problem Fix
A VM whose boot failed stays failed, so every command fails. On connect, check v1.vm.status and call v1.vm.restart when lifecycle is "failed".
A spawned process keeps stdin open, so a command that reads stdin waits forever. Run each command as sh -c "exec </dev/null\n<command>".
agentOS fails a command that starts for the first time while another command runs in the same VM. Run commands one at a time through a queue per sandbox.
// packages/sandbox-adapter/src/agentos.ts
let queue: Promise<unknown> = Promise.resolve();
return {
	exec: (command, options) => {
		const result = queue.then(() => run(command, options));
		queue = result.catch(() => {});
		return result;
	},
	// ...
};
  • AgentOSActorHandle gains v1.vm.status and v1.vm.restart.
  • A failed command does not block the queue: the queue continues after a rejection.

@railway-app

railway-app Bot commented Oct 13, 2026

Copy link
Copy Markdown

This PR was not deployed automatically as @eersnington does not have access to the Railway project.

In order to get automatic PR deploys, please add @eersnington to your workspace on Railway.

@eersnington
eersnington force-pushed the fix/sandbox-agentos-commands branch from ac0ac64 to 594c37f Compare October 14, 2026 00:57
@eersnington
eersnington marked this pull request as draft October 14, 2026 01:16
@eersnington eersnington changed the title fix(sandbox-adapter): make agentOS commands reliable in hosted VMs fix(sandbox-adapter): agentos hosted vm errors Oct 14, 2026
@eersnington

Copy link
Copy Markdown
Member Author

slopped checks

@eersnington
eersnington deleted the fix/sandbox-agentos-commands branch October 14, 2026 01:27
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