Skip to content

Commit 8235072

Browse files
committed
docs(mxc): document non-TTY foreground create on Windows
Signed-off-by: Rahool Paliwal <rpaliwal@nvidia.com>
1 parent c60e2c0 commit 8235072

4 files changed

Lines changed: 22 additions & 13 deletions

File tree

‎WINDOWS.md‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@ under development and is not a production-qualified security boundary:
2626
Exclusive supervisor-mediated egress and live access revocation are unverified.
2727
- The loopback exception can expose unrelated host-local services to workloads.
2828
Treat the gateway host as trusted.
29-
- Foreground main-process attachment and ConPTY resize are unavailable. Create
30-
command workloads with `--detach`.
29+
- A foreground `sandbox create -- <command>` without a terminal streams the
30+
workload's stdout and stderr to the CLI and returns its exit code. An
31+
interactive terminal (`--tty`) and ConPTY resize are unavailable; use
32+
`--no-tty` or `--detach`.
33+
Known limit: Windows `ssh.exe` (Win32-OpenSSH 9.5) does not exit after it
34+
writes to a pipe, so redirect the CLI's stdout and stderr to files rather than
35+
pipes when scripting a foreground create.
3136
- Gateway exit ends sandbox workloads, and there is no restart recovery. When
3237
the gateway process ends (a graceful stop with Ctrl-C, a crash, or a kill), the
3338
sandbox processes it started end with it, workloads included. After the gateway
@@ -114,8 +119,8 @@ Configure `compute_driver = "mxc"` and use the matching
114119
[Windows gateway configuration](https://github.com/NVIDIA/OpenShell/blob/windows/docs/how-it-works/gateways/configuration.mdx#configure-mxc)
115120
and [example gateway TOML](https://github.com/NVIDIA/OpenShell/blob/windows/crates/openshell-driver-mxc/examples/mxc-gateway.toml).
116121
Command-based sandbox creation requires administrator opt-in with
117-
`allow_driver_config = true`, a workload command and working directory, and
118-
`--detach`. Use a sandbox policy to grant the required filesystem and network
122+
`allow_driver_config = true`, and a workload command and working directory. A
123+
foreground create needs `--no-tty`; `--tty` is rejected. Use a sandbox policy to grant the required filesystem and network
119124
access.
120125

121126
## Run additional commands and restart a sandbox

‎crates/openshell-driver-mxc/README.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ branch's `MXC agent launched` acknowledgement only after native spawn succeeds.
4545

4646
The driver resolves its gateway endpoint and TLS server-name defaults from
4747
generic gateway inputs. The host supervisor authenticates its gateway session
48-
and retains main-process I/O. MXC has no foreground attachment adapter; create
49-
command workloads with `--detach`. Preflight rejects foreground attachment
50-
before provisioning. TCP readiness remains gated by authenticated session acceptance.
48+
and retains main-process I/O. Foreground attachment without a terminal is served by the in-process SSH server
49+
of the host supervisor; MXC has no ConPTY adapter, so preflight rejects a
50+
foreground `--tty` request before provisioning. TCP readiness remains gated by authenticated session acceptance.
5151

5252
Windows boundary execution is implemented by the `openshell-mxc-boundary`
5353
library behind the dedicated `openshell-windows-sandbox.exe`. The compute driver does not

‎docs/how-it-works/gateways/configuration.mdx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,8 +1244,10 @@ for build prerequisites and runtime limitations.
12441244

12451245
The MXC driver is Windows-only and opt-in. It links into the gateway and invokes Microsoft MXC through `wxc-exec.exe`. The driver starts `openshell-supervisor --role=isolation-backend` on the host and `openshell-windows-sandbox.exe` inside each ProcessContainer. The standard authenticated Sandbox Protocol and supervisor session provide lifecycle, exec, forwarding, provider refresh, and network policy.
12461246

1247-
MXC does not support foreground attachment to the main process. Use `--detach`
1248-
when creating a command workload; foreground requests fail during preflight.
1247+
MXC supports foreground attachment to the main process without a terminal: the
1248+
CLI streams the workload's stdout and stderr and exits with its exit code. An
1249+
interactive terminal is not supported, so a foreground request with `--tty`
1250+
fails during preflight. Use `--no-tty` or `--detach`.
12491251

12501252
The dedicated `openshell-windows-sandbox.exe` uses a Windows boundary library for process operations and forwarding. It replaces the generic sandbox binary in the Windows runtime pair; the supervisor remains a separate host process, not part of the compute driver. No separate supervisor-relay executable is required. Set `wxc_exec_path` to an absolute path; configuration preflight rejects an omitted or relative path. Existing MXC configurations that explicitly select `openshell-sandbox.exe` must update `sandbox_binary_path` to the Windows executable.
12511253

‎skills/openshell-cli/SKILL.md‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,11 @@ attachment and delete its sandbox after the service exits.
9595
When supplying `--name`, use a portable DNS-1123 label: at most 63 lowercase alphanumeric or `-` characters, beginning and ending with an alphanumeric character. The Kubernetes driver rejects uppercase letters, underscores, dots, and other names that cannot become Kubernetes resource labels.
9696

9797
For native Windows MXC, supply the Windows command and absolute working
98-
directory through `--driver-config-json` and use `--detach`. The gateway
99-
administrator must enable caller driver configuration. Foreground attachment
100-
is rejected before provisioning; `--no-tty` alone does not request detachment.
98+
directory through `--driver-config-json`. The gateway administrator must enable
99+
caller driver configuration. A foreground create with a command after `--`
100+
streams the command's output to the CLI and returns its exit code; use
101+
`--no-tty`, because an interactive terminal is rejected before provisioning.
102+
Add `--detach` to run the command in the background.
101103
Use `sandbox exec <name> --no-tty -- <executable> [args...]` for an additional
102104
command. For shell builtins, pass a single command string after `cmd.exe /d /c`.
103105
Use `sandbox start <name>` to relaunch a stopped, completed, or failed-main-process sandbox with its
@@ -327,7 +329,7 @@ Key flags:
327329
- `--forward [BIND_ADDRESS:]PORT`: Forward a local port and keep the sandbox alive
328330
- `--editor vscode|cursor`: Open a remote editor after creation and keep the sandbox alive
329331

330-
If the driver rejects foreground attachment during create validation, use `--detach`.
332+
If the driver rejects an interactive terminal during create validation (MXC), use `--no-tty` or `--detach`.
331333

332334
`--detach` adds no attachment grace period. When the canonical process exits,
333335
its terminal phase is reported immediately. A foreground create declares one

0 commit comments

Comments
 (0)