Skip to content

Windows sandbox causes MCP startup failures for local named-pipe tools #23017

Open

Description

@2233admin

What happened?

Codex reports:

MCP startup incomplete (failed: cocoindex-code)

The failing MCP server is configured as:

[mcp_servers.cocoindex-code]
command = "ccc"
args = ["mcp"]

The underlying local tool is healthy outside the Codex sandbox:

ccc daemon status
Daemon version: 0.2.33
No projects loaded.

ccc doctor
[OK] Model Check (indexing)
Embedding dimension: 384
[OK] Model Check (query)
Embedding dimension: 384

Inside the Codex sandbox, diagnostics/startup can fail with Windows named-pipe and network-related errors. For example:

PermissionError: [WinError 5] Access is denied
... multiprocessing.connection.PipeListener / CreateNamedPipe ...

And model metadata checks can fail while requesting HuggingFace URLs with:

[WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissions

The daemon environment also includes CODEX_SANDBOX_NETWORK_DISABLED, which appears to affect local MCP tools that perform lazy network/model checks during startup.

Expected behavior

Trusted local MCP servers that use Windows named pipes should start reliably, or Codex should provide a clearer allowlist/opt-out path for local MCP servers that need named pipes and local daemon IPC.

If network is intentionally blocked, MCP startup errors should clearly identify sandbox policy as the cause instead of surfacing as a generic MCP startup failure.

Actual behavior

Codex shows a generic MCP startup failure, even though the same local tool works outside the sandbox. This makes the local dev environment look broken and requires manual daemon restarts or rerunning diagnostics outside the sandbox.

Environment

  • OS: Windows
  • Shell: PowerShell
  • Codex sandbox: workspace-write / Windows sandbox
  • MCP server: cocoindex-code via ccc mcp
  • cocoindex-code version: 0.2.33
  • Local daemon transport: Windows named pipe

Why this matters

This creates noisy false failures for local development setups that rely on MCP servers backed by local daemons, named pipes, and already-installed model caches. The underlying tool is functional, but Codex startup reports it as failed.

Activity

  1. added
    bug
    CLI
    windows-os
    mcp
    sandbox
    connectivity
    on May 16, 2026
  2. MrEvgard commented on Nov 10, 2026

    @MrEvgard

    Related Windows sandbox / named-pipe case, with a different local tool (Qt rather than an MCP daemon):

    • Environment: Windows, Codex workspace-write, Python/PySide Qt 6.11.2; the test uses the real QLocalServer with UserAccessOption.
    • A synthetic test starts a user-scoped local text IPC listener with a fresh random pipe name (\\.\pipe\<random-test-id>). The lock succeeds, and the QApplication and server are on the expected thread.
    • QLocalServer.listen() returns false; Qt reports UnknownSocketError and QLocalServerPrivate::addListener: Access is denied.
    • Read-only WaitNamedPipeW checks just before and after report ERROR_FILE_NOT_FOUND (2) for that name (not the native error code of the Qt call). No existing listener was observed at those points.
    • The normal desktop application's Qt text chat continues to work when launched normally, but we have not compared process tokens or proved which specific Windows policy causes the test failure.
    • The test runs in Codex's restricted execution context. A request to run this particular test outside the sandbox was denied by the automatic approval review under the project's security rules; we did not bypass that decision.

    Could you clarify whether the Windows workspace-write sandbox intentionally restricts creating user-scoped server named pipes via CreateNamedPipe / Qt QLocalServer, and whether there is an officially supported narrowly scoped permission or diagnostic path for this? We want to run end-to-end IPC and cancellation/revocation tests safely, not disable security restrictions or change system ACLs.

    No private project files or personal content are needed to reproduce the issue.

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

    CLIbugconnectivitymcpsandboxwindows-os

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions