Skip to content

Windows scheduled heartbeat omits cwd write permission and fails before command startup with split writable root sets #53863

Open

Description

@lkj-droid

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-request and reviewer auto_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:

  1. Open a local-project chat using the conditions above.
  2. Run an existing local Python script's read-only status/prepare command manually. It succeeds.
  3. Have a heartbeat targeting that same chat run the same command.
  4. Observe process-startup failure with the exception above; the command itself never runs.
  5. Compare the recorded effective filesystem policies: the manual turn includes a write grant for cwd; the heartbeat does not.
  6. 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

  1. added
    bug
    app
    windows-os
    sandbox
    on Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    appautomationsbugsandboxwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions