codexmcp icon indicating copy to clipboard operation
codexmcp copied to clipboard

Failed to get `agent_messages` from the codex session

Open jameskade opened this issue 1 year ago • 4 comments

 codex - codex (MCP)(PROMPT: "简单测试,请回复\"收到\"即可。", cd: "/Users/xxxx", sandbox:
                      "read-only", skip_git_repo_check: true,
                     return_all_messages: false)
  ⎿ {
      "result": {
        "success": false,
        "error": "Failed to get `agent_messages` from the codex session.
    \n\n You can try to set `return_all_messages` to `True` to get the
    full reasoning information. \n\n 2025-11-24T10:46:53.251593Z ERROR
    rmcp::transport::async_rw: Error reading from stream: serde error
    expected value at line 1 column 1"
      }
    }

大佬,大佬,这个是啥错误意思呢?

jameskade avatar Nov 24 '25 10:11 jameskade

我的没问题了。 ai帮我修复了。

  1. 根本原因: open-websearch MCP 服务器启动失败,错误日志混入 JSON 输出流
  2. 解决方案: 暂时禁用了 open-websearch 配置
  3. 结果: Codex MCP 工具现在完全正常

jameskade avatar Nov 24 '25 10:11 jameskade

怎么禁用open-websearch

duoduoan8 avatar Nov 24 '25 11:11 duoduoan8

怎么禁用open-websearch

codex的配置文件里有open-websearch的 mcp配置。ai帮我把它干掉就好了。

jameskade avatar Nov 24 '25 12:11 jameskade

我发现是错误处理的逻辑有问题。返回不是json就报错了,我修改了错误处理部分

duoduoan8 avatar Nov 24 '25 12:11 duoduoan8