Skip to content

windows: contain restricted-token unified exec sessions#29981

Draft
anp-oai wants to merge 1 commit into
codex/pr3-02-local-conptyfrom
codex/pr3-03-restricted-sessions
Draft

windows: contain restricted-token unified exec sessions#29981
anp-oai wants to merge 1 commit into
codex/pr3-02-local-conptyfrom
codex/pr3-03-restricted-sessions

Conversation

@anp-oai

@anp-oai anp-oai commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Intent

Restricted-token unified-exec pipe and ConPTY sessions need the same pre-execution containment guarantee as local ConPTY, while legacy capture behavior remains unchanged.

Implementation

  • Add job-aware CreateProcessAsUserW pipe and ConPTY helpers that spawn suspended, assign, and resume.
  • Keep the standalone capture entry points on their existing creation flags.
  • Make the live restricted backend own JobProcess and use its borrowed process handle for wait and exit status.
  • Terminate the job on timeout or explicit session termination, and close it on root exit before ConPTY teardown or output-reader joins.
  • Add restricted pipe/TTY descendant tests for termination and natural root exit.

Manual validation

  • Built codex-windows-sandbox for Windows gnullvm with Bazel.
  • Ran just test -p codex-windows-sandbox on Linux to catch cfg regressions.

Stack

1. job primitives2. local ConPTY3. restricted sessions4. elevated runner5. command preparation6. raw pipe launcher7. command parity

@anp-oai anp-oai force-pushed the codex/pr3-03-restricted-sessions branch from 581ceb2 to ebc2180 Compare June 25, 2026 04:26
@anp-oai anp-oai force-pushed the codex/pr3-02-local-conpty branch from 654eafd to 440352e Compare June 25, 2026 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant