Skip to content

Codex hook config fails to parse when top-level description is present #6

Description

@pitimon

Summary

Codex reports a hook config parse failure for the claude-mem-local Codex hook because the hook JSON includes a top-level description field next to hooks.

This machine's claude-mem-local marketplace/cache is local, but the upstream/source-of-truth for reporting this issue is this repo: pitimon/exp-myCodex.

Error

failed to parse plugin hooks config /home/itarun/.codex/plugins/cache/claude-mem-local/claude-mem/13.6.1/hooks/codex-hooks.json: unknown field `description`, expected `hooks` at line 2 column 15

Affected File

hooks/codex-hooks.json

Current shape includes:

{
  "description": "claude-mem Codex CLI hook integration",
  "hooks": {
    "SessionStart": [],
    "UserPromptSubmit": [],
    "PreToolUse": [],
    "PostToolUse": [],
    "Stop": []
  }
}

Codex currently appears to accept only a top-level hooks object:

{
  "hooks": {
    "SessionStart": [],
    "UserPromptSubmit": [],
    "PreToolUse": [],
    "PostToolUse": [],
    "Stop": []
  }
}

Local Workaround Confirmed

Removing only the top-level description field from the cached plugin hook JSON resolves the parse warning locally. jq empty still passes after the change.

Suggested Fix

Update the Codex hook config emitted by this plugin to omit unsupported top-level metadata, or document the minimum Codex CLI/parser version if top-level description is intended to be supported.

Related Note

A separate local MCP startup warning was handled by adding this to ~/.codex/config.toml:

[mcp_servers.codex_apps]
startup_timeout_sec = 120

That looks like a separate startup-timeout concern, not the JSON schema parse failure described here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions