openclaw - 💡(How to fix) Fix [Bug]: macOS launchd-managed Gateway cannot reliably access TCC-protected folders via CLI tools [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#78049Fetched 2026-05-06 06:17:32
View on GitHub
Comments
1
Participants
2
Timeline
9
Reactions
2
Timeline (top)
mentioned ×3subscribed ×3labeled ×2commented ×1

macOS launchd-managed Gateway cannot access TCC-protected user folders such as ~/Documents when invoking local CLI tools, even after node is granted Full Disk Access.

The issue is not limited to iMessage. When OpenClaw Gateway is started by launchd, child CLI tools cannot reliably access TCC-protected user folders such as ~/Documents, ~/Downloads, and ~/Desktop.

Example:

  • launchd -> /usr/local/bin/node -> openclaw gateway --port 18789
  • os.listdir('/Users/claw/Documents/Obsidian Vault') fails with PermissionError
  • obsidian-cli list --vault 'Obsidian Vault' fails
  • starting the same Gateway command from Terminal.app works if Terminal has Full Disk Access

Expected: OpenClaw macOS should provide a signed native app/helper or a Terminal-backed startup mode, rather than relying on a bare launchd-managed Node process for local file/CLI workflows.

Root Cause

macOS launchd-managed Gateway cannot access TCC-protected user folders such as ~/Documents when invoking local CLI tools, even after node is granted Full Disk Access.

The issue is not limited to iMessage. When OpenClaw Gateway is started by launchd, child CLI tools cannot reliably access TCC-protected user folders such as ~/Documents, ~/Downloads, and ~/Desktop.

Example:

  • launchd -> /usr/local/bin/node -> openclaw gateway --port 18789
  • os.listdir('/Users/claw/Documents/Obsidian Vault') fails with PermissionError
  • obsidian-cli list --vault 'Obsidian Vault' fails
  • starting the same Gateway command from Terminal.app works if Terminal has Full Disk Access

Expected: OpenClaw macOS should provide a signed native app/helper or a Terminal-backed startup mode, rather than relying on a bare launchd-managed Node process for local file/CLI workflows.

Code Example

Evidence:

1. Current process chain:
launchd
└─ /usr/local/bin/node /Users/claw/.local/lib/node_modules/openclaw/dist/index.js gateway --port 18789

2. Permission failures under this Gateway:
os.listdir('/Users/claw/Documents/Obsidian Vault') -> PermissionError
obsidian-cli list --vault 'Obsidian Vault' -> Failed to read notes in vault
obsidian-cli list 'Codex' --vault 'Obsidian Vault' -> failed

3. macOS permissions already tested:
- /usr/local/bin/node was added to Full Disk Access.
- The LaunchAgent plist was modified to include HOME, USER, LOGNAME, SHELL, PATH, WorkingDirectory, and LimitLoadToSessionType=Aqua.
- Gateway was restarted after the change.
- The issue still reproduces.
RAW_BUFFERClick to expand / collapse

Bug type

Behavior bug (incorrect output/state without crash)

Beta release blocker

No

Summary

macOS launchd-managed Gateway cannot access TCC-protected user folders such as ~/Documents when invoking local CLI tools, even after node is granted Full Disk Access.

The issue is not limited to iMessage. When OpenClaw Gateway is started by launchd, child CLI tools cannot reliably access TCC-protected user folders such as ~/Documents, ~/Downloads, and ~/Desktop.

Example:

  • launchd -> /usr/local/bin/node -> openclaw gateway --port 18789
  • os.listdir('/Users/claw/Documents/Obsidian Vault') fails with PermissionError
  • obsidian-cli list --vault 'Obsidian Vault' fails
  • starting the same Gateway command from Terminal.app works if Terminal has Full Disk Access

Expected: OpenClaw macOS should provide a signed native app/helper or a Terminal-backed startup mode, rather than relying on a bare launchd-managed Node process for local file/CLI workflows.

Steps to reproduce

  1. Install OpenClaw via npm global on macOS.
  2. Use the default macOS LaunchAgent/Control UI managed Gateway.
  3. Confirm the Gateway process chain is: launchd -> /usr/local/bin/node -> /Users/claw/.local/lib/node_modules/openclaw/dist/index.js gateway --port 18789
  4. Grant Full Disk Access to /usr/local/bin/node in macOS Privacy & Security.
  5. Restart the Gateway.
  6. Place an Obsidian vault under /Users/claw/Documents/Obsidian Vault.
  7. From the launchd-started Gateway context, run: os.listdir('/Users/claw/Documents/Obsidian Vault')
  8. Also run: obsidian-cli list --vault 'Obsidian Vault' obsidian-cli list 'Codex' --vault 'Obsidian Vault'

Expected behavior

A Gateway started through the official macOS startup path should support local CLI/file workflows against user-authorized folders such as ~/Documents, ~/Downloads, and ~/Desktop.

If macOS TCC prevents a launchd-managed Node Gateway from doing this reliably, OpenClaw should provide an official supported alternative, such as:

  • a signed native macOS app/helper that owns Gateway lifecycle and TCC permissions;
  • routing local file/CLI operations through the authorized macOS app/system.run broker;
  • a documented Terminal-backed startup mode for users who need local file access.

Actual behavior

Under the launchd-started Gateway process chain:

launchd └─ /usr/local/bin/node /Users/claw/.local/lib/node_modules/openclaw/dist/index.js gateway --port 18789

Observed failures:

  • os.listdir('/Users/claw/Documents/Obsidian Vault') -> PermissionError
  • obsidian-cli list --vault 'Obsidian Vault' -> Failed to read notes in vault
  • obsidian-cli list 'Codex' --vault 'Obsidian Vault' -> failed

Granting Full Disk Access to /usr/local/bin/node and adding HOME/PATH/LimitLoadToSessionType=Aqua to the LaunchAgent plist did not resolve the issue.

OpenClaw version

2026.5.4

Operating system

macOS 12.7.6

Install method

npm global

Model

gpt 5.5

Provider / routing chain

openclaw -> openai

Additional provider/model setup details

No response

Logs, screenshots, and evidence

Evidence:

1. Current process chain:
launchd
└─ /usr/local/bin/node /Users/claw/.local/lib/node_modules/openclaw/dist/index.js gateway --port 18789

2. Permission failures under this Gateway:
os.listdir('/Users/claw/Documents/Obsidian Vault') -> PermissionError
obsidian-cli list --vault 'Obsidian Vault' -> Failed to read notes in vault
obsidian-cli list 'Codex' --vault 'Obsidian Vault' -> failed

3. macOS permissions already tested:
- /usr/local/bin/node was added to Full Disk Access.
- The LaunchAgent plist was modified to include HOME, USER, LOGNAME, SHELL, PATH, WorkingDirectory, and LimitLoadToSessionType=Aqua.
- Gateway was restarted after the change.
- The issue still reproduces.

Impact and severity

Affected: macOS users using the default launchd-managed Gateway for local file/CLI workflows.

Severity: High for local-agent workflows.

Frequency: Reproduces on every attempt under the launchd-started Gateway.

Consequence:

  • Agents cannot reliably manage Obsidian vaults stored in ~/Documents.
  • The same issue likely affects workflows involving ~/Downloads and ~/Desktop.
  • Local CLI tools that need access to TCC-protected folders fail even when node is granted Full Disk Access.
  • This limits common agent tasks such as document management, download processing, note management, and local file organization.

Additional information

This is not limited to iMessage or one specific CLI. It affects general local file/CLI workflows under the default macOS launchd-managed Gateway.

Related issues: #5116 #51299 #35862 #19778 #22179

Suggested direction: OpenClaw macOS should avoid relying on a bare launchd-managed Node Gateway as the permission owner for local file/CLI workflows. A signed native helper, app-managed Gateway lifecycle, or an official Terminal-backed startup mode would better match macOS TCC behavior.

extent analysis

TL;DR

The issue can be mitigated by using a Terminal-backed startup mode or implementing a signed native macOS app/helper to manage the Gateway lifecycle and TCC permissions.

Guidance

  • The current launchd-managed Node Gateway process chain does not reliably access TCC-protected user folders, even with Full Disk Access granted to /usr/local/bin/node.
  • To verify the issue, run os.listdir('/Users/claw/Documents/Obsidian Vault') and obsidian-cli list --vault 'Obsidian Vault' under the launchd-started Gateway context.
  • Consider using a Terminal-backed startup mode as a temporary workaround to access TCC-protected folders.
  • Implementing a signed native macOS app/helper or routing local file/CLI operations through an authorized macOS app/system.run broker may provide a more robust solution.

Example

No code snippet is provided as the issue is related to system configuration and permissions rather than code.

Notes

The issue is specific to macOS and the launchd-managed Gateway process chain. The suggested direction is to avoid relying on a bare launchd-managed Node Gateway for local file/CLI workflows.

Recommendation

Apply a workaround by using a Terminal-backed startup mode until a more robust solution, such as a signed native macOS app/helper, can be implemented. This is because the current launchd-managed Node Gateway process chain does not reliably access TCC-protected user folders.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

A Gateway started through the official macOS startup path should support local CLI/file workflows against user-authorized folders such as ~/Documents, ~/Downloads, and ~/Desktop.

If macOS TCC prevents a launchd-managed Node Gateway from doing this reliably, OpenClaw should provide an official supported alternative, such as:

  • a signed native macOS app/helper that owns Gateway lifecycle and TCC permissions;
  • routing local file/CLI operations through the authorized macOS app/system.run broker;
  • a documented Terminal-backed startup mode for users who need local file access.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: macOS launchd-managed Gateway cannot reliably access TCC-protected folders via CLI tools [1 comments, 2 participants]