Codex CLI 0.143.0 duplicates tool namespace/name: shell_command becomes shell_commandshell_command on Windows

Open 💬 2 comments Opened Jul 9, 2026 by sh4gen

What version of Codex CLI is running?

codex-cli 0.143.0

What subscription do you have?

ChatGPT Plus

Which model were you using?

gpt-5.5-codex

What platform is your computer?

Microsoft Windows NT 10.0.26200.0 x64

What terminal emulator and version are you using (if applicable)?

Windows Terminal with Windows PowerShell 5.1 No multiplexer.

Codex doctor report

{
  "schemaVersion": 1,
  "generatedAt": "1783581475s since unix epoch",
  "overallStatus": "ok",
  "codexVersion": "0.142.5",
  "checks": {
    "app_server.status": {
      "id": "app_server.status",
      "category": "app-server",
      "status": "ok",
      "summary": "background server is not running",
      "details": {
        "control socket": "C:\\Users\\askin\\.codex\\app-server-control\\app-server-control.sock",
        "daemon state dir": "C:\\Users\\askin\\.codex\\app-server-daemon",
        "mode": "ephemeral",
        "pid file": "C:\\Users\\askin\\.codex\\app-server-daemon\\app-server.pid (missing)",
        "settings": "C:\\Users\\askin\\.codex\\app-server-daemon\\settings.json (missing)",
        "status": "not running",
        "update-loop pid file": "C:\\Users\\askin\\.codex\\app-server-daemon\\app-server-updater.pid (missing)"
      },
      "remediation": null,
      "durationMs": 0
    },
    "auth.credentials": {
      "id": "auth.credentials",
      "category": "auth",
      "status": "ok",
      "summary": "auth is configured",
      "details": {
        "auth file": "C:\\Users\\askin\\.codex\\auth.json",
        "auth storage mode": "File",
        "stored API key": "false",
        "stored ChatGPT tokens": "true",
        "stored agent identity": "false",
        "stored auth mode": "chatgpt"
      },
      "remediation": null,
      "durationMs": 0
    },
    "config.load": {
      "id": "config.load",
      "category": "config",
      "status": "ok",
      "summary": "config loaded",
      "details": {
        "CODEX_HOME": "C:\\Users\\askin\\.codex",
        "config.toml": "C:\\Users\\askin\\.codex\\config.toml",
        "config.toml parse": "ok",
        "cwd": "C:\\Users\\askin",
        "enabled feature flags": "<redacted>",
        "feature flag overrides": "shell_snapshot=false",
        "feature flags enabled": "32",
        "log dir": "C:\\Users\\askin\\.codex\\log",
        "mcp servers": "0",
        "model": "gpt-5.5",
        "model provider": "openai",
        "sqlite home": "C:\\Users\\askin\\.codex"
      },
      "remediation": null,
      "durationMs": 0
    },
    "git.environment": {
      "id": "git.environment",
      "category": "git",
      "status": "ok",
      "summary": "git version 2.50.1.windows.1",
      "details": {
        "PATH git #1": "C:\\Program Files\\Git\\cmd\\git.exe",
        "PATH git entries": "1",
        "git build options": "git version 2.50.1.windows.1; cpu: x86_64; built from commit: 4d32d83913170b86f9753fca10e75cdb2223d1cc; sizeof-long: 4; sizeof-size_t: 8; shell-path: D:/git-sdk-64/usr/bin/sh; feature: fsmonitor--daemon; libcurl: 8.14.1; OpenSSL: OpenSSL 3.2.4 11 Feb 2025; zlib: 1.3.1; SHA-1: SHA1_DC; SHA-256: SHA256_BLK",
        "git exec path": "C:/Program Files/Git/mingw64/libexec/git-core",
        "git version": "git version 2.50.1.windows.1",
        "repo detected": "false",
        "selected git": "C:\\Program Files\\Git\\cmd\\git.exe"
      },
      "remediation": null,
      "durationMs": 136
    },
    "installation": {
      "id": "installation",
      "category": "install",
      "status": "ok",
      "summary": "installation looks consistent",
      "details": {
        "PATH codex #1": "C:\\Users\\askin\\AppData\\Roaming\\npm\\codex",
        "PATH codex #2": "C:\\Users\\askin\\AppData\\Roaming\\npm\\codex.cmd",
        "PATH codex entries": "2",
        "current executable": "C:\\Users\\askin\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin\\codex.exe",
        "install context": "npm (package C:\\Users\\askin\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc, bin C:\\Users\\askin\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin, resources C:\\Users\\askin\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\askin\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path)",
        "managed by bun": "false",
        "managed by npm": "true",
        "managed package root": "C:\\Users\\askin\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex",
        "npm update target": "C:\\Users\\askin\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex"
      },
      "remediation": null,
      "durationMs": 484
    },
    "mcp.config": {
      "id": "mcp.config",
      "category": "mcp",
      "status": "ok",
      "summary": "no MCP servers configured",
      "details": {},
      "remediation": null,
      "durationMs": 0
    },
    "network.env": {
      "id": "network.env",
      "category": "network",
      "status": "ok",
      "summary": "network-related environment looks readable",
      "details": {
        "proxy env vars": "none"
      },
      "remediation": null,
      "durationMs": 0
    },
    "network.provider_reachability": {
      "id": "network.provider_reachability",
      "category": "reachability",
      "status": "ok",
      "summary": "active provider endpoints are reachable over HTTP",
      "details": {
        "ChatGPT base URL": "https://chatgpt.com/backend-api/ reachable (HTTP 403)",
        "reachability mode": "ChatGPT auth"
      },
      "remediation": null,
      "durationMs": 168
    },
    "network.websocket_reachability": {
      "id": "network.websocket_reachability",
      "category": "websocket",
      "status": "ok",
      "summary": "Responses WebSocket handshake succeeded",
      "details": {
        "DNS": "2 IPv4, 0 IPv6, first IPv4",
        "auth mode": "chatgpt",
        "connect timeout": "15000 ms",
        "endpoint": "wss://chatgpt.com/backend-api/<redacted>",
        "handshake result": "HTTP 101 Switching Protocols",
        "model provider": "openai",
        "models etag present": "true",
        "provider name": "OpenAI",
        "proxy env vars": "none",
        "reasoning header": "false",
        "server model present": "false",
        "supports websockets": "true",
        "wire API": "responses"
      },
      "remediation": null,
      "durationMs": 1517
    },
    "runtime.provenance": {
      "id": "runtime.provenance",
      "category": "runtime",
      "status": "ok",
      "summary": "running npm on windows-x86_64",
      "details": {
        "commit": "unknown",
        "current executable": "C:\\Users\\askin\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin\\codex.exe",
        "install method": "npm (package C:\\Users\\askin\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc, bin C:\\Users\\askin\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\bin, resources C:\\Users\\askin\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-resources, path C:\\Users\\askin\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path)",
        "platform": "windows-x86_64",
        "version": "0.142.5"
      },
      "remediation": null,
      "durationMs": 0
    },
    "runtime.search": {
      "id": "runtime.search",
      "category": "search",
      "status": "ok",
      "summary": "search is OK (bundled)",
      "details": {
        "search command": "C:\\Users\\askin\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex\\node_modules\\@openai\\codex-win32-x64\\vendor\\x86_64-pc-windows-msvc\\codex-path\\rg.exe",
        "search command readiness": "file exists",
        "search provider": "bundled"
      },
      "remediation": null,
      "durationMs": 0
    },
    "sandbox.helpers": {
      "id": "sandbox.helpers",
      "category": "sandbox",
      "status": "ok",
      "summary": "sandbox configuration is readable",
      "details": {
        "approval policy": "OnRequest",
        "codex-linux-sandbox helper": "none",
        "execve wrapper helper": "none",
        "filesystem sandbox": "restricted",
        "network sandbox": "restricted"
      },
      "remediation": null,
      "durationMs": 0
    },
    "state.paths": {
      "id": "state.paths",
      "category": "state",
      "status": "ok",
      "summary": "state paths and databases are inspectable",
      "details": {
        "CODEX_HOME": "C:\\Users\\askin\\.codex (dir)",
        "active rollout files": "6 files, 256782 total bytes, 42797 average bytes",
        "archived rollout files": "0 files, 0 total bytes, 0 average bytes",
        "goals DB": "C:\\Users\\askin\\.codex\\goals_1.sqlite (file)",
        "goals DB integrity": "ok",
        "log DB": "C:\\Users\\askin\\.codex\\logs_2.sqlite (file)",
        "log DB integrity": "ok",
        "log dir": "C:\\Users\\askin\\.codex\\log (missing)",
        "memories DB": "C:\\Users\\askin\\.codex\\memories_1.sqlite (file)",
        "memories DB integrity": "ok",
        "sqlite home": "C:\\Users\\askin\\.codex (dir)",
        "state DB": "C:\\Users\\askin\\.codex\\state_5.sqlite (file)",
        "state DB integrity": "ok"
      },
      "remediation": null,
      "durationMs": 127
    },
    "state.rollout_db_parity": {
      "id": "state.rollout_db_parity",
      "category": "threads",
      "status": "ok",
      "summary": "rollout files and state DB thread inventory agree",
      "details": {
        "default model provider": "openai",
        "rollout DB active files": "6",
        "rollout DB active rows": "6",
        "rollout DB archive mismatches": "0",
        "rollout DB archived files": "0",
        "rollout DB archived rows": "0",
        "rollout DB duplicate DB paths": "0",
        "rollout DB duplicate rollout thread ids": "0",
        "rollout DB malformed file names": "0",
        "rollout DB missing active rows": "0",
        "rollout DB missing archived rows": "0",
        "rollout DB model providers": "openai=6",
        "rollout DB rows": "6",
        "rollout DB scan cap reached": "false",
        "rollout DB scan errors": "0",
        "rollout DB sources": "cli=6",
        "rollout DB stale rows": "0"
      },
      "remediation": null,
      "durationMs": 114
    },
    "system.environment": {
      "id": "system.environment",
      "category": "system",
      "status": "ok",
      "summary": "OS language en-US",
      "details": {
        "EDITOR": "not set",
        "VISUAL": "not set",
        "os": "Windows 10.0.26200 (Windows 11 Professional) [64-bit]",
        "os language": "en-US",
        "os type": "Windows",
        "os version": "10.0.26200"
      },
      "remediation": null,
      "durationMs": 0
    },
    "terminal.env": {
      "id": "terminal.env",
      "category": "terminal",
      "status": "ok",
      "summary": "terminal metadata was detected",
      "details": {
        "WT_SESSION": "present",
        "color output": "enabled",
        "console input code page": "857",
        "console output code page": "857",
        "stderr console mode": "0x00000007 (VT processing: true)",
        "stderr is terminal": "true",
        "stdin is terminal": "true",
        "stdout console mode": "0x00000007 (VT processing: true)",
        "stdout is terminal": "true",
        "terminal": "Windows Terminal",
        "terminal size": "120x30"
      },
      "remediation": null,
      "durationMs": 0
    },
    "terminal.title": {
      "id": "terminal.title",
      "category": "title",
      "status": "ok",
      "summary": "terminal title default",
      "details": {
        "terminal title activity": "true",
        "terminal title items": "activity, project-name",
        "terminal title project source": "cwd",
        "terminal title project value": "askin",
        "terminal title source": "default"
      },
      "remediation": null,
      "durationMs": 0
    },
    "updates.status": {
      "id": "updates.status",
      "category": "updates",
      "status": "ok",
      "summary": "update configuration is locally consistent",
      "details": {
        "cached latest version": "0.143.0",
        "check for update on startup": "true",
        "dismissed version": "0.143.0",
        "last checked at": "2026-07-09T06:48:13.046189500Z",
        "latest version": "0.143.0",
        "latest version status": "newer version is available",
        "npm update target": "C:\\Users\\askin\\AppData\\Roaming\\npm\\node_modules\\@openai\\codex",
        "update action": "npm install -g @openai/codex",
        "version cache": "C:\\Users\\askin\\.codex\\version.json"
      },
      "remediation": null,
      "durationMs": 1039
    }
  }
}

What issue are you seeing?

Codex CLI v0.143.0 fails to execute shell/file operations on Windows because the shell tool call appears to be routed/serialized incorrectly.

When I ask Codex to create a simple empty file, it fails before the command is executed.

Prompt used:

Create an empty file named asd23.txt in the current directory. Use shell only.

User-facing error:

Unable to create the file because the shell tool rejected the command invocation.

The debug log shows that the model emits:

FunctionCall {
  name: "shell_command",
  namespace: Some("shell_command"),
  ...
}

But the actual tool dispatch becomes:

ToolCall: shell_commandshell_command {
  "command": "New-Item -ItemType File -Path .\\asd23.txt -Force | Select-Object FullName, Length",
  "workdir": "C:\\codex-test"
}

Then the router rejects it:

unsupported call: shell_commandshell_command

So it looks like the namespace and function name are being concatenated without a separator, or the router is receiving the wrong tool identifier.

This does not appear to be a Windows permission, PowerShell, OneDrive/Desktop path, or sandbox helper issue. Manual sandbox execution works and can write files successfully.

Downgrading from Codex CLI 0.143.0 to 0.142.5 fixed the issue.

What steps can reproduce the bug?

  1. Install or update to Codex CLI 0.143.0.
  1. Open Windows PowerShell 5.1.
  1. Create and enter a simple ASCII-only test directory:
mkdir C:\codex-test -Force
cd C:\codex-test
  1. Start Codex:
codex --sandbox workspace-write --ask-for-approval on-request
  1. Ask Codex:
Create an empty file named asd23.txt in the current directory. Use shell only.
  1. Codex fails to create the file.

The debug log shows:

FunctionCall {
  name: "shell_command",
  namespace: Some("shell_command"),
  ...
}

ToolCall: shell_commandshell_command {
  "command": "New-Item -ItemType File -Path .\\asd23.txt -Force | Select-Object FullName, Length",
  "workdir": "C:\\codex-test"
}

unsupported call: shell_commandshell_command

Important diagnostic detail: manual sandbox execution works outside the Codex TUI.

This command succeeds:

codex sandbox --permissions-profile :workspace --cd C:\codex-test -- powershell.exe -NoProfile -NonInteractive -Command "[System.IO.File]::WriteAllBytes('C:\codex-test\manual-sandbox.txt', [byte[]]@())"

Test-Path C:\codex-test\manual-sandbox.txt

Output:

True

So Windows sandbox itself can write files. The failure seems to happen inside the Codex TUI tool routing layer.

What is the expected behavior?

Codex should execute the shell command and create the requested file in the current workspace.

After this prompt:

Create an empty file named asd23.txt in the current directory. Use shell only.

the file should exist:

Test-Path C:\codex-test\asd23.txt

Expected output:

True

The shell tool should be routed correctly instead of being dispatched as:

shell_commandshell_command

Additional information

I tried the following before identifying the issue:

  • Reinstalled Codex CLI.
  • Cleared C:\Users\<user>\.codex.
  • Tested workspace-write.
  • Tested Windows sandbox manually.
  • Tested both elevated and unelevated Windows sandbox modes.
  • Tested proxy-related config workarounds.
  • Tested an ASCII-only folder: C:\codex-test.

The key finding is:

  • Manual sandbox execution works and can write files.
  • Codex TUI agent execution fails because the tool call is dispatched as shell_commandshell_command.

Workaround:

Downgrading Codex CLI from 0.143.0 to 0.142.5 fixed the problem. After downgrade, the same prompt successfully created the file.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗