Skip to content

Commit 39b13d1

Browse files
authored
docs(cli): document sandbox create size limits (#4447)
Signed-off-by: Eric Curtin <eric.curtin@docker.com>
1 parent 58fdb40 commit 39b13d1

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

‎crates/openshell-cli/src/main.rs‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,6 +1593,7 @@ enum SandboxCommands {
15931593
/// Set a non-secret environment variable in the sandbox.
15941594
/// Do not use this option for API keys, tokens, or other secrets; create
15951595
/// a provider and attach it with `--provider` instead. Repeatable.
1596+
/// Each value is limited to 8 KiB and cannot contain a newline.
15961597
#[arg(long = "env", value_name = "KEY=VALUE")]
15971598
envs: Vec<String>,
15981599

@@ -1617,6 +1618,7 @@ enum SandboxCommands {
16171618
output: OutputFormat,
16181619

16191620
/// Command to run after "--" (defaults to an interactive shell).
1621+
/// Each argument is limited to 32 KiB.
16201622
#[arg(last = true, allow_hyphen_values = true)]
16211623
command: Vec<String>,
16221624
},

‎docs/how-it-works/sandboxes/overview.mdx‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ finish after the canonical process starts. Create a scratch sandbox, upload the
7676
files, then launch the workload with `sandbox exec`, or build the files into the
7777
sandbox image.
7878

79+
The trailing command takes at most 256 arguments. Each argument is limited to
80+
32 KiB and all arguments together to 256 KiB. Send a larger input, such as a
81+
long system prompt, with `sandbox upload` and read it inside the sandbox.
82+
7983
For automation, use `--output json` or `--output yaml` to get machine-readable sandbox metadata after creation:
8084

8185
```shell
@@ -401,6 +405,10 @@ Per-command variables override the sandbox-level environment for that command on
401405
402406
Environment variable names starting with `OPENSHELL_` are reserved. Keys must match `[A-Za-z_][A-Za-z0-9_]*`.
403407
408+
`sandbox create` accepts at most 128 variables. Each value is limited to 8 KiB
409+
and cannot contain a newline, and all names and values together are limited to
410+
256 KiB. Send larger or multi-line values with `sandbox upload`.
411+
404412
## Label a Sandbox
405413
406414
Attach labels when you create a sandbox to track ownership, environment, or workflow grouping:

0 commit comments

Comments
 (0)