Skip to content

Code-mode tool host IPC decode failure: unknown field code_mode_host_duration_ns #42111

Description

@sigmalko

What version of Codex CLI is running?

codex-cli 0.152.0

What subscription do you have?

PRO

Which model were you using?

gpt-5.6-terra

What platform is your computer?

Linux 6.14.0-37-generic x86_64 unknown

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

bash

Codex doctor report

{
      "schemaVersion": 1,
      "generatedAt": "1788285968s since unix epoch",
      "overallStatus": "ok",
      "codexVersion": "0.152.0",
      "checks": {
        "app_server.status": {
          "id": "app_server.status",
          "category": "app-server",
          "status": "ok",
          "summary": "background server is running",
          "details": {
            "app-server version": "0.151.0",
            "control socket": "/root/.codex/app-server-control/app-server-control.sock",
            "daemon state dir": "/root/.codex/app-server-daemon",
            "mode": "ephemeral",
            "pid file": "/root/.codex/app-server-daemon/app-server.pid (missing)",
            "settings": "/root/.codex/app-server-daemon/settings.json (missing)",
            "status": "running",
            "update-loop pid file": "/root/.codex/app-server-daemon/app-server-updater.pid (missing)"
          },
          "remediation": null,
          "durationMs": 57
        },
    … +309 lines (ctrl + t to view transcript)
            "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.152.0",
            "check for update on startup": "true",
            "last checked at": "2026-09-01T16:16:56.938838556Z",
            "latest version": "0.152.0",
            "latest version status": "current version is not older",
            "npm update target": "/usr/local/lib/node_modules/@openai/codex",
            "update action": "npm install -g @openai/codex",
            "version cache": "/root/.codex/version.json"
          },
          "remediation": null,
          "durationMs": 445
        }
      }
    }

What issue are you seeing?

Summary

All tool calls fail before the requested operation is executed. The failure appears to be caused by an IPC/protocol mismatch between the code-mode tool host and the client
decoding its response.

Error

failed to read code-mode host message:
failed to decode code-mode IPC frame:
unknown field `code_mode_host_duration_ns`,
expected one of `cell_id`, `content_items`, `error_text`

### Steps to reproduce

1. Start a Codex session with code-mode tools enabled.
2. Run a minimal command through the tool host, for example:

   pwd

   or:

   true

3. Observe that the operation fails before command output is returned.

The same error also occurs when attempting:

- local shell reads,
- Google Drive-related work,
- web search.

### Expected behavior

The tool response should decode successfully and return the command or tool result.

### Actual behavior

Every attempt fails while decoding the IPC frame. No target command or downstream service call appears to run.

### Impact

The session cannot use any tool-backed capability, including filesystem work, web/GitHub search, Google Drive access, and TTS workflows.

### Notes

- This does not appear to be an OpenAI TTS/API error: no TTS request is reached.
- The error suggests that the host emits a newer code_mode_host_duration_ns field while the client-side decoder only accepts cell_id, content_items, and error_text.
- Restarting/retrying within the same session did not resolve the issue.

### What steps can reproduce the bug?

### Environment

- Codex CLI: `0.152.0`
- App server reported by `codex doctor --json`: `0.151.0`
- Model: `gpt-5.6-terra`
- OS: Debian 12, Linux `6.14.0-37-generic`, `x86_64`
- Auth mode: ChatGPT
- Installation: npm
- Terminal transport: SSH, `TERM=xterm-256color`

### Reproduction steps


   ```text
4. Instead of returning the command output, the tool call fails with:

   failed to read code-mode host message:
   failed to decode code-mode IPC frame:
   unknown field `code_mode_host_duration_ns`,
   expected one of `cell_id`, `content_items`, `error_text`

5. Repeat with an operation that should have no output or dependencies:

   Run `true`.

   The same IPC-decoding error occurs.

6. The failure also occurs when Codex attempts other tool-backed actions, including local file reads and web search.

### Control observation

The commands themselves work when run directly in the terminal. For example, codex --version, uname -mprs, and codex doctor --json complete successfully. codex doctor --json
reports overall status ok and provider/WebSocket reachability as successful.

Thread ID: not available.

### What is the expected behavior?

Codex should execute the requested tool-backed command and return its result.

For the reproduction command:

```sh
pwd

the expected result is the current workspace directory, for example:

/root/mm/project

More generally, the code-mode tool host response should be decoded successfully. It should not fail because of an unrecognized IPC field. Minimal commands such as pwd and true
should work, and other tool-backed features should remain available.

### Additional information

_No response_

Activity

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

    CLIIssues related to the Codex CLIapp-serverIssues involving app server protocol or interfacesbugSomething isn't workingtool-callsIssues related to tool calling

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions