Skip to content

Support atomic Sandbox identity preconditions for ExecSandbox #5872

Open

Description

@stevenlee-oai

A controller may prepare Sandbox A and later execute a short activation command. ExecSandbox and ExecSandboxInteractive currently select by Workspace and Sandbox name. If A is deleted or replaced under that name before execution, the command can run in replacement B. A request UUID prevents duplicate launch but does not assert that the named Sandbox is the instance or process generation previously prepared by the controller.

Please support an optional expected immutable Sandbox ID and supervisor/main-process instance or generation in both Exec APIs. Validate them atomically during admission and bind the relay to that exact instance; reject mismatches before starting the command or delivering stdin. Preserve durable request-ID semantics. Include a regression in which Sandbox A is prepared, replaced by B at the same name, and the activation request for A fails without executing in B; also cover a process generation change within one Sandbox.

Related Provider attachment issue: #5794
Pinned API: https://github.com/ai-openshell/openshell/blob/v0.1.8/proto/openshell.proto#L1996-L2038

Activity

  1. grs commented on Nov 23, 2026

    @grs
    Contributor

    Repeating my comment from #5794 as it applies here also:

    A workspace is, by design, a namespace. Users and processes sharing that workspace need to coordinate resource naming and lifecycle, including when names can be reused.

    In the example given, the underlying problem is B deleting and recreating a sandbox under a name A is still using. The proposed change would detect one consequence of uncoordinated name reuse, but it would not address the underlying problem.

    Reliable concurrent use of the API requires workspace users to coordinate resource naming and reuse.

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

    state:triage-neededOpened without agent diagnostics and needs triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions