Skip to content

An API to push local files into an actor sandbox #264

Closed as duplicate
Closed as duplicate

Description

@eliranw

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:

  1. Bake the files into the image. But images are digest-pinned, so rebuilding on every change is slow and throws away snapshot/warm-start.
  2. 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

Activity

  1. EItanya commented on Jun 17, 2026

    @EItanya
    Collaborator

    I've been thinking about this a lot. Another similar feature would be ssh. Is this the sort of thing we want to add directly to substrate, or leave users the ability to add their own "daemon/agent" into.

  2. eliranw commented on Jun 18, 2026

    @eliranw
    CollaboratorAuthor

    I've been thinking about this a lot. Another similar feature would be ssh. Is this the sort of thing we want to add directly to substrate, or leave users the ability to add their own "daemon/agent" into.

    I’d lean toward building it in as it’s a core feature for most other sandbox providers (Modal, AgentCore, Daytona), not something bolted on. And if it’s CRI compliant, it can work like kubectl cp/kubectl exec, so it feels familiar to anyone who’s used Kubernetes instead of every template author rolling their own.

  3. BenTheElder commented on Jun 18, 2026

    @BenTheElder
    Collaborator

    kubectl cp has a long history of issues, especially with security. I think if you proposed it in Kubernetes today as a new feature the current approach would be rejected.

    [...] And if it’s CRI compliant, it can work like kubectl cp/kubectl exec, so it feels familiar to anyone who’s used Kubernetes instead of every template author rolling their own.

    CRI doesn't actually specify anything like this. Copy is done by abusing the exec API and requiring tar to be present and trusted in the container.

    To be clear: I'm just adding some context :-)

    I think there's an open scoping question about this sort of API that needs further thought / discussion.

  4. added
    kind/feature
    on Aug 12, 2026
  5. EItanya commented on Nov 19, 2026

    @EItanya
    Collaborator

    Closing as a duplicate of #4011, which tracks bringing the agent-substrate/env process and filesystem RPCs into Substrate and covers this request. Please carry any open points over there.

    Comment left by Claude on behalf of Eitan Yarmush (@EItanya).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/storagekind/feature

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions