Skip to content

[Windows] Junction-based CODEX_HOME: Registered Core home mismatch, then recurring helper_sandbox_lock_failed on .sandbox #59391

Open

Description

@IvanXu6

Summary

On a native Windows installation whose existing Codex home was moved to another local drive and retained behind an NTFS junction, the afternoon transition to the app-package / Registered Core runtime blocked Windows setup and switching to automatic approval.

The investigation exposed two related failure layers:

  1. The service's installed home record used the C: alias while app-server initialization returned the physical D: home. Aligning that record removed "registered Core setup belongs to another Codex home".
  2. Provisioning then failed opening .sandbox with helper_sandbox_lock_failed. A scoped SYSTEM ACL repair restored normal sandboxed execution and workspace writes, but the error later recurred. SYSTEM entries on .sandbox and .sandbox-secrets had returned to Modify; .sandbox-bin still had Full Control.

Related reports exist, particularly #50520 and #49025. The additional observations here are the junction/canonical-home admission mismatch, the Registered Core service transition, and recurrence on the persistent metadata directories rather than only .sandbox-bin.

What version of the Codex App are you using?

  • Desktop version reported in app logs: 26.1029.61003.
  • Installed Store package during repair: OpenAI.Codex_26.1029.7803.0_x64.
  • Bundled CLI/app-server: 0.166.0-alpha.6.
  • Workspace dependency bundle shown in settings: 26.1103.10131.

These identifiers come from logs, package inspection, and settings respectively; they are not all the same version field.

What subscription do you have?

Not collected for this report. The observed failure occurs during local sandbox provisioning before a shell command starts.

What platform is your computer?

Windows 11 Home, build 10.0.26200, x64; native Windows / PowerShell; workspace-write; elevated Windows sandbox.

MXC was already disabled in the existing configuration and was not enabled as a workaround.

Migration background

All paths below are sanitized illustrative equivalents:

C:\Users\<user>\.codex
  -- NTFS directory junction -->
D:\<data-root>\<storage-root>\.codex

%LOCALAPPDATA%\OpenAI\Codex
  -- NTFS directory junction -->
D:\<data-root>\<runtime-root>

This was an existing installation with retained config, conversations, plugins, and sandbox metadata, not an empty home. The alias and physical home were verified to identify the same directory. The actual destination contained non-ASCII characters; Unicode has not been isolated as a cause.

The migration predates this investigation. Its exact date/procedure was not captured, and no additional move between morning and afternoon was established.

What issue are you seeing?

The user reported normal operation in the morning of 2026-11-04 and failure in the afternoon. The UI displayed "Windows setup incomplete" / "Setup stopped". Retrying setup did not restore operation. Even a trivial command failed before execution.

Sanitized errors encountered at different stages:

registered Core setup belongs to another Codex home

registered runtime ownership is missing

app runtime provisioning service is unavailable; refusing helper fallback

registered sandbox provisioning failed:
provision registered sandbox accounts and permissions:
helper_sandbox_lock_failed:
lock sandbox dir \\?\D:\<data-root>\<storage-root>\.codex\.sandbox failed:
open directory \\?\D:\<data-root>\<storage-root>\.codex\.sandbox

Observed timeline

All times below are local UTC+08:00 on 2026-11-04.

  • Around 11:07: startup logs showed copied runtime selection and the Core startup gate disabled.
  • Around 14:06: a later startup selected app-package with the Core startup gate enabled.
  • During troubleshooting: the service installation record retained the C: home alias. Changing user CODEX_HOME to that alias and restarting did not solve it: app-server initialization still reported the physical D: path.
  • After backing up and aligning the existing service home record to the same physical directory: the "another Codex home" error disappeared.
  • Restarting the verified Codex sandbox service made the Registered Core provisioning request advance to the detailed ACL failure.
  • After an administrator restored SYSTEM Full Control on .sandbox, .sandbox-secrets, and .sandbox-bin: ordinary sandboxed execution and a workspace write/read/delete test passed.
  • Later, while preparing this report: ordinary tool execution failed again with helper_sandbox_lock_failed. A read-only ACL check showed SYSTEM back at Modify/Synchronize on .sandbox and .sandbox-secrets, while .sandbox-bin remained Full Control.

The runtime transition is observed; its rollout/update trigger was not isolated.

Why setup "success" was insufficient

A diagnostic attempt reported setup success through the legacy path but did not establish Registered Core readiness. An ordinary process also hit the package-identity requirement. A subsequent request used the installed package identity and the same Registered Core selection as the desktop runtime; identity checks were preserved.

The service reported Running even while a request received the service-unavailable error. Restarting it changed that result. I am not claiming the original process was proven hung.

Actual verification

After the scoped ACL repair, normal tool execution returned:

SANDBOX_EXEC_CHECK_OK
SANDBOX_WRITE_CHECK_OK

The write check created, read back, verified, and deleted one temporary file inside the permitted workspace. The execution identity was a sandbox account. These checks passed before the later recurrence.

What steps can reproduce the bug?

This is an observed sequence on an existing installation, not a clean-machine reproduction:

  1. Use a native Windows desktop installation with an existing Codex home redirected through a C:-to-D: NTFS junction.
  2. Enter the app-package / Registered Core runtime path. This changed between recorded morning and afternoon starts on this machine.
  3. Attempt Windows setup / automatic approval, or execute a trivial workspace command.
  4. If service registration retains the alias but the caller presents the canonical home, observe the home mismatch.
  5. Once that mismatch is resolved and registered provisioning runs, inspect whether .sandbox can be opened for its ACL operation.
  6. On this machine, restoring SYSTEM Full Control temporarily allowed execution.
  7. At a later invocation, observe the failure again and compare the SYSTEM ACEs on all three sandbox-specific directories.

The exact operation that rewrote the ACL was not captured. Please do not interpret this as a universally reproducible migration recipe or a recommended registry-editing procedure.

What is the expected behavior?

  • A supported home-directory migration should use consistent path identity without bypassing owner/package validation.
  • Re-provisioning should be repeatable with the ACLs left by a previous successful setup.
  • The UI should expose the actionable setup failure rather than only "Setup stopped".
  • Switching to automatic approval should succeed once the required sandbox is healthy.
  • Success should persist across later refreshes/restarts, not just one command.

Additional information

An obsolete computer_use.windows.always_allowed_app_ids table was separately removed after backup because the installed version explicitly ignored it. Current config passed strict validation. That cleanup did not resolve the provisioning failure.

The intended settings are:

approval_policy = "on-request"
approvals_reviewer = "auto_review"
sandbox_mode = "workspace-write"

[windows]
sandbox = "elevated"

No sandbox bypass or unrestricted approval mode was used as the fix. The ACL workaround changed SYSTEM entries only; other account rules, including the sandbox-group deny entry on the secrets directory, were retained. Configuration, registration, and ACL backups were kept locally.

Source context and related reports

The source references were inspected on 2026-11-04 and do not establish an exact source-to-binary mapping for this packaged build. The current evidence supports a temporary workaround and a confirmed recurrence, not a permanent fix or a confirmed ACL-writer attribution.

Raw logs/configuration, account SIDs, usernames, device names, session IDs, and actual private paths are intentionally not attached.

Activity

  1. added
    bug
    app
    windows-os
    sandbox
    on Nov 4, 2026
  2. github-actions commented on Nov 4, 2026

    @github-actions
    Contributor

    Potential duplicates detected. Please review them and close your issue if it is a duplicate.

    Powered by Codex Action

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

    appbugsandboxwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions