openclaw - 💡(How to fix) Fix Bug: image tool allowed-path list doesn't inherit channels.imessage.attachmentRoots

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…

When an iMessage attachment is passed to the image tool via a local path (e.g. /Users/.../Library/Messages/Attachments/...), the tool rejects it with:

Local media path is not under an allowed directory: /Users/straylight/Library/Messages/Attachments/...

Root Cause

When an iMessage attachment is passed to the image tool via a local path (e.g. /Users/.../Library/Messages/Attachments/...), the tool rejects it with:

Local media path is not under an allowed directory: /Users/straylight/Library/Messages/Attachments/...

Fix Action

Fix / Workaround

iMessage attachments (photos, screenshots) cannot be analyzed by the agent using the image tool. The workaround is to share images via URL or copy them to the workspace manually, which defeats the purpose of includeAttachments: true.

Code Example

Local media path is not under an allowed directory: /Users/straylight/Library/Messages/Attachments/...

---

"channels": {
  "imessage": {
    "includeAttachments": true,
    "attachmentRoots": ["/Users/straylight/Library/Messages/Attachments"]
  }
}
RAW_BUFFERClick to expand / collapse

Summary

When an iMessage attachment is passed to the image tool via a local path (e.g. /Users/.../Library/Messages/Attachments/...), the tool rejects it with:

Local media path is not under an allowed directory: /Users/straylight/Library/Messages/Attachments/...

Config

The iMessage channel is correctly configured with attachmentRoots:

"channels": {
  "imessage": {
    "includeAttachments": true,
    "attachmentRoots": ["/Users/straylight/Library/Messages/Attachments"]
  }
}

Expected Behavior

The image tool (and other media tools) should recognize paths under channels.imessage.attachmentRoots as allowed. The iMessage plugin has already been granted operator-level trust for that directory via attachmentRoots — the image tool's path validation should inherit that trust rather than enforcing a separate, narrower allowlist.

Actual Behavior

The image tool enforces its own hardcoded allowed-path list that does not include the Messages Attachments directory, even when attachmentRoots is explicitly configured.

Impact

iMessage attachments (photos, screenshots) cannot be analyzed by the agent using the image tool. The workaround is to share images via URL or copy them to the workspace manually, which defeats the purpose of includeAttachments: true.

Suggested Fix

When building the image tool's allowed-path set, include paths from channels.<channel>.attachmentRoots for any enabled channel with attachment support.

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…

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: image tool allowed-path list doesn't inherit channels.imessage.attachmentRoots