Summary
We need a way to write a client’s own files into a running actor. Other sandbox platforms have this: E2B’s Sandbox.files.write, Anthropic’s container_upload block, Fly Machines’ config.files.
Motivation
A sandboxed code runner should be able to run code on the caller’s files in a fresh isolated sandbox and hand back the result.
Today there’s no way to get the caller’s files into a running actor. An actor runs whatever workload image it was built from, reached over the workload’s own HTTP server, so the only options are:
- Bake the files into the image. But images are digest-pinned, so rebuilding on every change is slow and throws away snapshot/warm-start.
- Have the workload itself expose an upload endpoint on its HTTP server, so every template author builds and secures the same thing by hand.
Either way there’s no platform-level file ingress: CreateActorRequest is just {actor_id, template_ns, template_name}, the data plane only carries WorkloadSpec{containers}, an ActorTemplate is image + command + env, and the ategcs object store only holds runsc checkpoints today.
One option that would cover this: a files map (path to bytes) written into the actor’s filesystem. From the outside it looks like it could sit on the actor, next to the exec channel proposed in #185, so a running actor could both receive files and run commands through one handle. I don’t know the internals well enough to say where it actually belongs, so this is just a starting point, not a recommendation.
I’m mainly filing this to surface the use case and the gap. Happy to help with an implementation once there’s a direction.
Open Questions
Summary
We need a way to write a client’s own files into a running actor. Other sandbox platforms have this: E2B’s Sandbox.files.write, Anthropic’s container_upload block, Fly Machines’ config.files.
Motivation
A sandboxed code runner should be able to run code on the caller’s files in a fresh isolated sandbox and hand back the result.
Today there’s no way to get the caller’s files into a running actor. An actor runs whatever workload image it was built from, reached over the workload’s own HTTP server, so the only options are:
Either way there’s no platform-level file ingress: CreateActorRequest is just {actor_id, template_ns, template_name}, the data plane only carries WorkloadSpec{containers}, an ActorTemplate is image + command + env, and the ategcs object store only holds runsc checkpoints today.
One option that would cover this: a files map (path to bytes) written into the actor’s filesystem. From the outside it looks like it could sit on the actor, next to the exec channel proposed in #185, so a running actor could both receive files and run commands through one handle. I don’t know the internals well enough to say where it actually belongs, so this is just a starting point, not a recommendation.
I’m mainly filing this to surface the use case and the gap. Happy to help with an implementation once there’s a direction.
Open Questions