Skip to content

[Bug]: build_macOS is super slow and hangs my entire mac in Codex. #440

@BarnoTD

Description

@BarnoTD

Bug Description

I usually tell codex to run build_macOS after modifications to verify work. This used to run within a few seconds until recently. It slows my entire Macbook to build whereas building manually via XCode gets done in seconds.

I added tool_timeout_sec = 600 to codex's config.toml file like mentioned in the documentation (It wasn't stated under which section so I put it on the top of the file), codex still returns timed out awaiting tools/call after 120s.

Debug Output

⚙️ XcodeBuildMCP Doctor

Generated: 2026-06-02T09:40:08.823Z
Server Version: 2.6.0
Output Mode: Redacted (default)

System Information
platform: darwin
release: 25.0.0
arch: arm64
cpus: 8 x Apple M2
memory: 16 GB
hostname:
username:
homedir: /Users/
tmpdir: /var/folders/s0/0vsl_1hs23vgb5blg86p4khh0000gn/T

Node.js Information
version: v25.2.1
execPath: /opt/homebrew/Cellar/node/25.2.1/bin/node
pid: 14357
ppid: 14345
platform: darwin
arch: arm64
cwd: /Users/
argv: /opt/homebrew/Cellar/node/25.2.1/bin/node /Users//.npm/_npx/99336612077b7094/node_modules/.bin/xcodebuildmcp-doctor

Process Tree
Running under Xcode: No
14357 (ppid 14345): node -- node /Users//.npm/_npx/99336612077b7094/node_modules/.bin/xcodebuildmcp-doctor
14345 (ppid 768): npm -- exec xcodebu npm exec xcodebuildmcp-doctor
768 (ppid 760): -zsh -- -zsh
760 (ppid 668): login -- login -pf
668 (ppid 1): /System/Applicat -- /System/Applications/Utilities/Terminal.app/Contents/MacOS/Terminal
1 (ppid 0): /sbin/launchd -- /sbin/launchd

Xcode Information
version: Xcode 26.0.1 - Build version 17A400
path: /Applications/Xcode.app/Contents/Developer
selectedXcode: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
xcrunVersion: xcrun version 72.

Dependencies
axe: 1.7.0
mise: Not found

Environment Variables
INCREMENTAL_BUILDS_ENABLED: (not set)
DEVELOPER_DIR: (not set)
HOME: /Users/
USER:
TMPDIR: /var/folders/s0/0vsl_1hs23vgb5blg86p4khh0000gn/T/
NODE_ENV: (not set)
SENTRY_DISABLED: (not set)
AXE_PATH: (not set)
XBMCP_LAUNCH_JSON_WAIT_MS: (not set)
XCODEBUILDMCP_DEBUGGER_BACKEND: (not set)
XCODEBUILDMCP_UI_DEBUGGER_GUARD_MODE: (not set)
XCODEBUILDMCP_RUNTIME: cli
XCODEBUILDMCP_SILENCE_LOGS: true

PATH
/Users//.npm/_npx/99336612077b7094/node_modules/.bin
/Users//node_modules/.bin
/Users//.bin
/node_modules/.bin
/opt/homebrew/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin
/opt/homebrew/bin
/opt/homebrew/sbin
/usr/local/bin
/System/Cryptexes/App/usr/bin
/usr/bin
/bin
/usr/sbin
/sbin
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
/Library/Apple/usr/bin

UI Automation (axe)
Available: Yes
UI Automation Supported: Yes
Simulator Video Capture Supported (AXe >= 1.1.0): Yes
UI-Debugger Guard Mode: error

Incremental Builds
Enabled: No
xcodemake Binary Available: No
Makefile exists (cwd): (not checked: incremental builds disabled)

Mise Integration
Running under mise: No
Mise available: No

Debugger Backend (DAP)
lldb-dap available: Yes
Selected backend: dap

Manifest Tool Inventory
Total Unique Tools: 82
Workflow Count: 15
coverage: 2 tools
debugging: 8 tools
device: 15 tools
doctor: 1 tools
macos: 13 tools
project-discovery: 5 tools
project-scaffolding: 2 tools
session-management: 5 tools
simulator-management: 10 tools
simulator: 20 tools
swift-package: 8 tools
ui-automation: 14 tools
utilities: 1 tools
workflow-discovery: 1 tools
xcode-ide: 5 tools

Runtime Tool Registration
Enabled Workflows: 0
Registered Tools: 0
Note: Runtime registry unavailable.

Xcode IDE Bridge (mcpbridge)
Workflow enabled: No
mcpbridge path: (not found)
Xcode running: true
Connected: No
Bridge PID: (none)
Proxied tools: 0
Last error: (none)
Note: Bridge debug tools (status/sync/disconnect) are only registered when debug: true

Tool Availability Summary
Build Tools: Available
UI Automation Tools: Available
Incremental Build Support: Not available

Sentry
Sentry enabled: Yes

Editor/Client

Codex Version 26.519.41501

MCP Server Version

2.6.0

LLM

gpt-5.4-mini

MCP Configuration

[mcp_servers.xcodebuildmcp]
args = ["-y", "xcodebuildmcp@latest", "mcp"]
command = "npx"
enabled = true

[mcp_servers.xcodebuildmcp.env]
XCODEBUILDMCP_ENABLED_WORKFLOWS = "macos,simulator"
XCODEBUILDMCP_PROJECT_PATH = <projectPath>
XCODEBUILDMCP_SCHEME = <App Scheme>
XCODEBUILDMCP_SENTRY_DISABLED = "true"

Steps to Reproduce

  1. run build_macos on our project
  2. agent calling XCodeBuildBuild macos
  3. tool call failed error:

tool call error: tool call failed for xcodebuildmcp/build_macos

Caused by:
timed out awaiting tools/call after 120s

Expected Behavior

finish building with either a build successful message or a failure.

Actual Behavior

Slows down my entire macOS during tool call + ends with timeout error

Error Messages

`build_macos` timed out after 120 seconds.

That confirms the issue is reproducible in this session. The timeout happened at the tool layer, not as a normal Xcode compile failure, so the next useful triage step is to inspect the underlying build log from the previous failed run or rerun with more direct xcodebuild logging if you want me to keep digging.

If you want, I can next:
1. Pull the build log from the earlier failed attempt and inspect where it stalls.
2. Check the active XcodeBuildMCP session defaults and workflow registration.
3. Try a lower-level macOS build command outside the MCP tool path to isolate whether this is an XcodeBuildMCP issue or a project build issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working
    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