feat(sandbox): start mounted sandboxes lazily and stop them when idle
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 4.6k
- Forks
- 251
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 34
Description
Problem
Configuring sandbox: { provider } starts the external sandbox as soon as the AgentOS VM boots, even when the agent never reads the mount or calls a sandbox binding.
Desired behavior
- Do not call
provider.start()during VM creation. - Start the provider on the first operation against the sandbox filesystem mount or any
agentos-sandboxbinding. - Share one single-flight initializer between filesystem and binding calls so concurrent first use creates exactly one sandbox.
- Add a configurable inactivity timeout that shuts down or suspends the sandbox after no filesystem, binding, or in-flight process-control activity.
- Transparently restart or resume it on the next operation.
- Always shut it down when the AgentOS VM stops, regardless of the inactivity timeout.
- Clean up partially started resources when initialization fails.
Define and document persistence semantics for providers that can suspend/resume versus providers that must destroy/recreate the sandbox. Add native integration coverage for first-use startup, concurrent first use, idle shutdown, restart, and VM disposal.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace VM creation, the sandbox filesystem mount, agentos-sandbox bindings, provider.start(), and VM shutdown to map the lifecycle entry points. Define the shared first-use initialization, inactivity handling, persistence semantics, failure cleanup, and disposal behavior, then add native integration coverage for startup, concurrency, idle shutdown, restart, and VM disposal.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100