Skip to content

Bug: codex-acp MCP function calls stall without dispatching tools/call under OpenAB #976

@feiyun968-agent

Description

@feiyun968-agent

Description

When running GuanYu (openab-codex-guanyu) through OpenAB's Discord -> ACP path with Codex/codex-acp, streamable HTTP MCP tool calls can stall after the model emits a function_call. The MCP sidecar receives initialization and tool discovery requests, but never receives the corresponding tools/call request.

This does not look like a Google Drive wrapper-specific failure:

  • The Google Drive MCP sidecar is healthy and exposes drive_* tools via tools/list.
  • Direct MCP tools/call to drive_list_folder succeeds from the OpenAB container.
  • Direct codex exec in the same pod can call the gdrive MCP tool successfully.
  • A minimal local noop streamable HTTP MCP server reproduced the same failure pattern: Codex/OpenAB emitted a function_call for ping, but the noop MCP server saw no tools/call.

The narrowed failing path is OpenAB -> @zed-industries/codex-acp bridge handling of MCP function calls/results during an ACP turn.

Steps to Reproduce

  1. Configure a Codex-based OpenAB agent with a streamable HTTP MCP server.
    • Tested with gdrive at http://127.0.0.1:3140/mcp.
    • Also reproduced with a temporary noop MCP server at 127.0.0.1:3150 exposing only ping.
  2. Verify MCP discovery works locally:
    • initialize succeeds.
    • notifications/initialized succeeds.
    • tools/list returns the expected tool names.
  3. Trigger the agent through Discord/OpenAB and ask it to call the MCP tool.
  4. Inspect Codex session JSONL and MCP server logs.

Observed sessions during diagnosis:

  • 019e85d4-42c7-76f3-9b73-fe4d96671b86: gdrive narrow test stalled.
  • 019e8616-353b-7a73-ae8e-86d903f8b356: debug-log gdrive test showed function_call name=drive_list_folder, but sidecar only saw initialize/initialized/tools/list.
  • 019e8628-a670-7020-b169-2dd0131a78f7: noop MCP contrast test emitted function_call name=ping, but noop server saw no tools/call.

Expected Behavior

After the model emits an MCP-backed function_call, the OpenAB/codex-acp path should dispatch the corresponding MCP tools/call request to the configured streamable HTTP MCP server, collect the result, return a function/tool output to Codex, and complete the ACP turn.

Environment

  • OpenAB deployment: openab-codex-guanyu
  • Agent path: Discord -> OpenAB -> ACP -> codex-acp -> Codex CLI
  • Kubernetes pod observed healthy during tests: containers ready, no restarts
  • MCP sidecar: Google Drive streamable HTTP MCP at 127.0.0.1:3140/mcp
  • Reproduction also used a minimal noop streamable HTTP MCP server at 127.0.0.1:3150
  • Versions observed before temporary test upgrade:
    • @zed-industries/codex-acp: 0.14.0
    • @openai/codex: 0.133.0
  • Temporary live-pod upgrade test:
    • @zed-industries/codex-acp: 0.15.0
    • @openai/codex: 0.136.0
    • Result: still stalled after function_call, no function_call_output or final response

Screenshots / Logs

Key observations from sanitized logs:

  • gdrive sidecar received only:
    • initialize
    • notifications/initialized
    • tools/list
  • gdrive sidecar did not receive:
    • tools/call
  • noop MCP sidecar showed the same pattern:
    • discovery happened
    • no tools/call for the emitted ping function call
  • Codex session JSONL contained MCP function calls such as:
    • drive_list_folder
    • ping
  • The ACP turn then stalled without a tool/function output or final response.

Related non-root-cause checks:

  • Direct MCP tools/call against gdrive succeeded quickly.
  • Direct codex exec in the same pod successfully completed the gdrive folder listing.
  • The gdrive wrapper's protocol compatibility issues found earlier were fixed before this narrowed test: unsupported discovery methods return empty lists, and initialized notifications no longer return an invalid JSON-RPC response.

Conclusion: the failure is likely in the OpenAB/codex-acp MCP function-call dispatch/result handling path, not in the MCP sidecar implementation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingp1High — address this sprintpending-maintainer

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions