Repository navigation
Description
Description of the new feature / enhancement
The state-aware WSLc backend's exec path (execInSandbox) streams container stdout/stderr live, but it does not forward host stdin to the container process. Anything piped to a WSLc exec (e.g. echo data | ... exec, or exec < file) is dropped, and the container child sees immediate EOF on stdin.
The Windows Sandbox (WSB) state-aware backend already supports piped (non-TTY) stdin — the guest agent bridges the child's stdin over its IPC transport (src/backends/windows_sandbox/guest/src/executor.rs bridges TCP → child stdin via tokio::io::copy; src/backends/windows_sandbox/lifecycle/src/state_aware.rs pumps host stdin into Stdin frames). So WSLc lacking stdin forwarding is a backend parity gap, not a design choice.
This is currently blocked on the WSLc SDK. Live stdout/stderr streaming is implemented by registering the SDK's onStdOut/onStdErr process callbacks. Per the WSLc SDK header (wslcsdk.h):
Using any callbacks will consume the IO handles, preventing acquisition through
WslcGetProcessIOHandle.
Because the daemon registers output callbacks (the basis of live output streaming), WslcGetProcessIOHandle(WSLC_PROCESS_IO_HANDLE_STDIN) is unavailable — callback-mode output and handle-mode stdin are mutually exclusive in the current SDK. There is no way to forward stdin while also using callback-based output streaming.
Scope: this issue covers piped (non-TTY) stdin. Interactive TTY/ConPTY stdin is a further step on top (WSB tracks that separately as h6-pty-plumbing).
Proposed technical implementation details
Once the WSLc SDK allows acquiring the stdin handle alongside output (or provides an equivalent stdin-write API that coexists with output delivery), rearchitect the WSLc daemon exec path from callback-mode to handle-mode:
- Register no output callbacks; instead acquire all three IO handles via
WslcGetProcessIOHandle. - Spawn
ReadFilethreads for stdout/stderr feeding the existing streaming sink + capped capture buffers. - Spawn a
WriteFilethread draining clientStreamFrame::Stdinframes into the container process stdin handle; close the handle on EOF. - Client side: pump non-TTY host stdin →
StreamFrame::Stdin(mirroring WSBstate_aware.rs); warn + send EOF on TTY stdin. - Preserve the current
IoContextArc / kill-leak / exit-callback safety invariants under the new threading model (src/backends/wslc/common/src/container_steps.rs).
Blocked on: WSLc SDK callback/handle exclusivity (wslcsdk.h).
Activity
[-]WSLc state-aware exec: forward piped stdin to the container (blocked on WSLc SDK)[/-][+][WSLC] State-aware exec: forward piped stdin to the container (blocked on WSLc SDK)[/+]github-actions commentedon Aug 11, 2026
Triage complete.
OS-Windows,Area-SDK-Api(existing:Issue-Feature,Container-WSLC)@huzaifa-d(SDK API / executor schema area)This is a WSLC state-aware exec parity gap — piped stdin forwarding blocked on WSLc SDK callback/handle exclusivity. The
Area-SDK-Apilabel captures the exec streaming API surface involved.Maintainers: Comment
/investigateto check whether this issue or bug is valid against the most current code. Copilot will also produce a report with the changes that will be needed. For a small, unambiguous documentation or test fix, it may also create one draft PR.github-actions commentedon Aug 11, 2026
Triage complete.
This issue was already partially triaged with labels
Issue-Feature,OS-Windows,Area-SDK-Api,Container-WSLCand owners@huzaifa-dand Soham Das (@SohamDas2021) assigned. No additional labels or owners were needed.Needs-Triagehas been removed.Maintainers: Comment
/investigateto check whether this issue or bug is valid against the most current code. Copilot will also produce a report with the changes that will be needed. For a small, unambiguous documentation or test fix, it may also create one draft PR.[-][WSLC] State-aware exec: forward piped stdin to the container (blocked on WSLc SDK)[/-][+][WSLC] State-aware exec: forward piped stdin to the container (blocked on WSLC SDK)[/+]github-actions commentedon Aug 26, 2026
Triage summary
This issue is already appropriately labeled and assigned. No label or owner changes were needed:
OS-Windows,Container-WSLC,Area-SDK-Api— all accurate for a WSLc state-aware exec stdin-forwarding feature blocked on the WSLc SDK.Needs-Triagewas not present and was not added.Maintainers: Comment
/investigateto check whether this issue or bug is valid against the most current code. Copilot will also produce a report with the changes that will be needed. For a small, unambiguous documentation or test fix, it may also create one draft PR.SohamDas2021 commentedon Sep 2, 2026
Tracked in ADO.