# Mac tool calls fail: “code-mode host closed its stdout”

**URL:** <https://community.openclaw.ai/t/mac-tool-calls-fail-code-mode-host-closed-its-stdout/500>\
**Category:** Troubleshooting\
**Created:** [November 21, 2026, 1:22am UTC](https://community.openclaw.ai/t/mac-tool-calls-fail-code-mode-host-closed-its-stdout/500 "2026-11-21T01:22:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Francesco\_Caristo](https://yyz2.discourse-cdn.com/flex028/user_avatar/community.openclaw.ai/francesco_caristo/32/778_2.png) [@Francesco\_Caristo](https://community.openclaw.ai/u/Francesco_Caristo)\
**Post date:** [November 21, 2026, 1:22am UTC](https://community.openclaw.ai/t/mac-tool-calls-fail-code-mode-host-closed-its-stdout/500/1 "2026-11-21T01:22:33Z")

</div>

macOS 27.2.1, Apple Silicon, OpenClaw 2026.11.5 (76cbb32). Every agent tool call—including a simple text-only functions.exec test—fails with “code-mode host closed its stdout.” Computer Control and Peekaboo Bridge are enabled. Gateway is reachable and the macOS node connects, but logs repeatedly show “node command surface withheld.” Gateway/app restart, doctor --fix, and a new chat did not resolve it. Please help diagnose the tool-host failure.

---

<div class="post-metadata">

**Author:** ![joe](https://yyz2.discourse-cdn.com/flex028/user_avatar/community.openclaw.ai/joe/32/48_2.png) [@joe](https://community.openclaw.ai/u/joe)\
**Post date:** [November 22, 2026, 12:42am UTC](https://community.openclaw.ai/t/mac-tool-calls-fail-code-mode-host-closed-its-stdout/500/2 "2026-11-22T00:42:27Z")

</div>

Hey Francesco,

This closely matches a known macOS code-signing regression affecting the bundled Codex tool host: “#192851” ([[Bug]: 2026.10.10 macOS app re-signs codex-code-mode-host without JIT entitlements, so every Codex tool call fails (V8 "Failed to reserve virtual memory for CodeRange") · Issue #192851 · openclaw/openclaw · GitHub](https://github.com/openclaw/openclaw/issues/192851)).

The fix is merged into “main”, but I checked the 2026.11.6 release tag, and its signing script still omits the Codex host fix. Upgrading to 2026.11.6 is therefore not a confirmed solution.

You can check your installed binary without modifying anything:

find /Applications/OpenClaw.app -type f -name codex-code-mode-host -print -exec codesign -d --entitlements - {} ;

Look for “com.apple.security.cs.allow-jit” and “com.apple.security.cs.allow-unsigned-executable-memory”.

If those entitlements are missing, the supported resolution is a correctly signed app release. Repeating “doctor --fix”, resetting permissions, or recreating sessions won’t repair the signature. I would avoid manually re-signing the application.

Track the release fix here: “#194641” ([[Bug]: Codex macOS signing fix absent from inspected stable candidate; track release inclusion/backport · Issue #194641 · openclaw/openclaw · GitHub](https://github.com/openclaw/openclaw/issues/194641)).

The “node command surface withheld” warning may be a separate issue. I’d address the Codex host failure first, since even your text-only test fails.
