mcpproxy-go icon indicating copy to clipboard operation
mcpproxy-go copied to clipboard

[Bug]: Codex CLI and Claude Desktop stuck at "connected, never seen"

Open xpolb01 opened this issue 1 month ago • 0 comments

What happened?

Codex CLI and Claude Desktop stay "connected, never seen" (client_never_seen, "How to restart") although both open MCP sessions through MCPProxy many times a day. Restarting them cannot clear it.

Presence matches clientInfo.name exactly (case-insensitive, NormalizeRaw) against ClientInfoNames, and neither client sends a listed name:

Client Sends clientInfo.name ClientInfoNames
Codex CLI 0.164.0 codex-mcp-client (source) codex, codex-cli (clients.go#L114)
Claude Desktop through mcp-remote 0.15.2 claude-ai (via mcp-remote 0.15.2); mcp-remote appends the suffix (source) claude-ai, Claude (clients.go#L74)

The Claude Desktop case affects every Claude Desktop set up with Connect, because Connect writes exactly that mcp-remote bridge (clients.go#L533-L546).

The sessions land in other: rows instead, one per mcp-remote version (mcpproxy client list -o json, trimmed):

id                                         state                 last_seen
codex                                      connected_never_seen  null
other:codex-mcp-client                     other                 2026-10-25
claude-desktop                             connected_never_seen  null
other:claude-ai (via mcp-remote 0.14.3)    other                 2026-10-13
other:claude-ai (via mcp-remote 0.15.1)    other                 2026-10-20
other:claude-ai (via mcp-remote 0.15.2)    other                 2026-10-25

The same Claude Desktop entry adds two more other: rows: local-agent-mode-mcpproxy (via mcp-remote 0.15.2), which Claude Desktop opens alongside claude-ai, and mcp-remote-fallback-test, mcp-remote's transport probe (source).

Expected behavior

Once Codex CLI or Claude Desktop opens a session after Connect, it shows connected_seen with a last_seen, and its client_never_seen item clears.

Steps to reproduce

  1. mcpproxy connect codex; start Codex CLI 0.164.0 and let it initialize the mcpproxy server.
  2. mcpproxy connect claude-desktop; restart Claude Desktop (bridge: mcp-remote 0.15.2).
  3. Wait at least 5 minutes, then run mcpproxy attention and mcpproxy client list -o json.

Both clients stay connected_never_seen with last_seen: null; their sessions appear only as other: rows.

MCPProxy version

MCPProxy v0.71.1 (personal) darwin/arm64. ClientInfoNames is unchanged on main as of 2026-10-25.

Operating system

macOS

Relevant logs

INFO | server/hooks.go:376 | MCP client initialized with capabilities | {"client_name": "codex-mcp-client", "client_version": "0.164.0", ...}
INFO | server/hooks.go:376 | MCP client initialized with capabilities | {"client_name": "claude-ai (via mcp-remote 0.15.2)", "client_version": "0.1.0", ...}
INFO | server/hooks.go:376 | MCP client initialized with capabilities | {"client_name": "local-agent-mode-mcpproxy (via mcp-remote 0.15.2)", "client_version": "1.0.0", ...}

Suggested fix

  • Add codex-mcp-client to Codex's ClientInfoNames. Codex also sends title: "Codex", if matching on clientInfo.title is acceptable.
  • Strip a trailing (via mcp-remote <version>) before alias classification, so a bridged client resolves to the client behind the bridge and mcp-remote upgrades stop adding other: rows. Matching stays exact otherwise.
  • Optionally map local-agent-mode-<entry> to claude-desktop and ignore mcp-remote-fallback-test.

Pre-submission checklist

  • [x] I searched existing issues and did not find a duplicate (closest: #1709, a different Codex Connect bug)
  • [x] I ran mcpproxy doctor and reviewed the output (0 diagnostics; Needs attention lists only client_never_seen items)

xpolb01 avatar Oct 25 '26 16:10 xpolb01