Skip to content

Conversation

@kcoopermiller
Copy link
Member

@kcoopermiller kcoopermiller commented Jan 14, 2026

# Takes 5 seconds (backgrounded process inherits pipes, blocks until exit)
prime sandbox run <sandbox_id> "nohup sh -c 'sleep 5 &'"
# Returns immediately (redirections prevent pipe inheritance)
prime sandbox run <sandbox_id> "nohup sh -c 'sleep 5 > /dev/null 2>&1 &'"

Note

Improves background execution so jobs detach from the caller and still capture output and exit status.

  • Update start_background_job (sync/async) to redirect stdout/stderr inside sh -c and write exit code to exit file; outer nohup now redirects to /dev/null to avoid inheriting pipes
  • Add test test_start_background_job_returns_immediately confirming immediate return and that the job continues running

Written by Cursor Bugbot for commit 4b77337. This will update automatically on new commits. Configure here.

@kcoopermiller kcoopermiller marked this pull request as ready for review January 14, 2026 21:25
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.

2 participants