Skip to content

Regression (2026.2.26): image tool can't read iMessage attachments — mediaLocalRoots doesn't include attachmentRoots #30170

Description

@macminikenny1

Summary

After upgrading to 2026.2.26, the image tool can no longer read iMessage attachment paths. The error is:

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

Root Cause

The iMessage channel correctly configures attachmentRoots (defaulting to /Users/*/Library/Messages/Attachments) to validate inbound attachment paths. However, getAgentScopedMediaLocalRoots builds the image tool's allowlist from buildMediaLocalRoots (state dir + workspace) and does not merge in the iMessage attachmentRoots. So attachments pass channel validation but then fail the image tool's separate path check.

This worked before 2026.2.26, likely because the path check was less strict prior to the security hardening around symlink/boundary resolution.

Expected Behavior

If a path is validated by the iMessage channel's attachmentRoots, it should also be accessible to the image tool (i.e., iMessage attachment roots should be merged into mediaLocalRoots for agents that have iMessage configured).

Steps to Reproduce

  1. Have iMessage channel configured with includeAttachments: true
  2. Send a photo via iMessage to your OpenClaw bot
  3. Attempt to use the image tool on the attachment path

Workaround

Send images via webchat instead of iMessage.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dedupe:parentPrimary canonical item in dedupe clusterstaleMarked as stale due to inactivity

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions