Skip to content

[Bug]: Cursor subagents drop Codex Desktop unified exec bridge #1661

Description

@growth-wizard-digital

Client or integration

Codex App, through OpenCodeX's Cursor provider adapter, using a fresh native multi-agent child routed to cursor/grok-4.6.

Area

Tools / MCP / web search

Summary

Fresh Cursor-routed Codex Desktop subagents can respond but cannot execute the Desktop terminal tool. The same fresh task succeeds on a native gpt-5.6-terra child.

This is not a sandbox or permission problem. The parent exposes Codex Desktop's unified custom terminal tool as exec; the Cursor adapter's generic tool-use path only preserves bare exec_command / shell_command aliases, which are absent from this child catalog.

Reproduction

  1. Start a fresh Codex Desktop task through OpenCodeX.
  2. Spawn a fresh cursor/grok-4.6 subagent with no inherited conversation context.
  3. Ask it to execute a harmless local command such as pwd.
  4. The child replies, but cannot use the bridge:
    • Tool not found: exec_command
    • Tool not found: shell_command
  5. A bridge-only prompt reports a Cursor-native catalog plus mcp_opencodex-responses_request_user_input, with neither shell bridge alias present.
  6. Run the identical task with a fresh native gpt-5.6-terra child: pwd succeeds with exit code 0.

Version

OpenCodeX 2.14.2; Codex Desktop runtime 0.148.0-alpha.9.

Operating system

macOS on Apple Silicon.

Provider and model

cursor/grok-4.6

Logs or error output

Cursor child:
Tool not found: exec_command
Tool not found: shell_command

Native Terra control:
pwd
/Users/.../Documents/Codex/...
exit code 0

Description

The installed adapter already recognizes unified exec as an execution-path tool:

const CURSOR_EXECUTION_PATH_TOOL_NAMES = [
  CODEX_UNIFIED_EXEC_TOOL, // "exec"
  CODEX_EXEC_COMMAND_TOOL,
  CODEX_SHELL_COMMAND_TOOL,
];

However, its generic-tool-use filter uses the narrower bare-alias predicate:

function isBareCodexExecCommandTool(tool) {
  return isBareCodexShellBridgeTool(tool);
}

const execTools = tools?.filter(isBareCodexExecCommandTool);

That excludes unified exec. In addition, src/adapters/cursor/native-exec.ts returns an error for a Responses client tool over native MCP-exec: bridge suspension is not implemented.

Expected behavior:

  • Preserve unified Desktop exec when filtering and prioritizing Cursor execution tools.
  • Do not instruct a child to call exec_command or shell_command unless that exact name is present in its catalog.
  • Relay the resulting client tool call back to Codex Desktop so the nested tools.exec_command(...) operation executes.
  • Add regressions for a fresh cursor/* subagent with unified exec, including generic tool-use prompts.

Related issues

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtoolstool_calls, MCP, web-search / sidecar tools

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions