createMemorySandboxProvider
Purpose and behavior
Section titled “Purpose and behavior”Create a provider that simulates sandbox commands without starting an agent CLI or arbitrary subprocess. Scripted agent turns bypass the command queue; other invocations consume commands in order across all acquired leases, matching executable and arguments exactly. Unexpected commands throw code provider without consuming an entry. Git workspaces and scripted commits use the real host filesystem and Git. File transfers, terminals, live input and elevation are refused. Invocation honors cancellation, deadlines and output retention. Release cancels active work and is idempotent; no container or network isolation is provided.
Complete example and detailed rules.
Parameters and properties
Section titled “Parameters and properties”optionsOptionalMemorySandboxOptions | undefinedOptional predefined command results. A fresh provider starts with an unconsumed command queue.options.commandsOptionalreadonly MemoryCommand[] | undefinedOrdered queue of exact executable/argument matches and their simulated results, shared across leases of this provider. Defaults to empty; scripted agent requests do not consume it.

