Repository navigation
Description
What issue are you seeing?
On Windows 10, a scheduled heartbeat attached to an existing local-project chat cannot start a read-only local command that succeeds in a manual turn of the same chat. The failure occurs before the command process starts:
UnsupportedOperation("windows unelevated restricted-token sandbox cannot enforce split writable root sets directly; refusing to run unsandboxed")
Reproduction conditions:
- Local desktop execution; Windows sandbox implementation:
unelevated. - Built-in Approve for me preset; recorded approval policy
on-requestand reviewerauto_review. No named/custom permission profile was selected. - The chat has a local-project working directory and additional allowed temporary/writable directories.
- The working directory is unchanged between the compared manual and scheduled turns.
- In the manual turn, the recorded detailed filesystem policy explicitly grants write access to the working directory. In the scheduled turn, that entry is absent, although additional writable directories remain. This differs from the legacy workspace-write representation, which treats cwd as an implicit writable root.
- The inspected bundled CLI reports
codex-cli 0.162.0-alpha.17.2. This is not a verified desktop About-version value.
What steps can reproduce the bug?
This is the pattern reproduced on an existing installation, not a verified clean-install minimal reproducer:
- Open a local-project chat using the conditions above.
- Run an existing local Python script's read-only status/prepare command manually. It succeeds.
- Have a heartbeat targeting that same chat run the same command.
- Observe process-startup failure with the exception above; the command itself never runs.
- Compare the recorded effective filesystem policies: the manual turn includes a write grant for cwd; the heartbeat does not.
- Re-save the existing automation and run another test through the actual scheduled-heartbeat path. The same failure recurs. Restore the original daily schedule afterwards.
What is the expected behavior?
An authorized read-only command should start within a consistent, enforceable sandbox in both paths. A scheduled heartbeat should retain the applicable workspace permissions, subject to managed restrictions. If its configuration cannot be enforced, it should provide an actionable supported recovery path rather than require unrestricted execution.
Additional information
Related reports: #50120 (named-profile loss during heartbeat scheduling) and #52252 (the same exception in a delegated Windows task). This reproduction uses the built-in preset without a selected named profile and includes an actual command-startup comparison.
The internal source of the differing policies has not been established. No sandbox bypass is requested.
This report intentionally excludes private paths, user/account/thread/automation identifiers, file contents, screenshots, full logs, and conversation transcripts.
Activity