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.
Summary
When an iMessage attachment is passed to the
imagetool via a local path (e.g./Users/.../Library/Messages/Attachments/...), the tool rejects it with:Config
The iMessage channel is correctly configured with
attachmentRoots:Expected Behavior
The
imagetool (and other media tools) should recognize paths underchannels.imessage.attachmentRootsas allowed. The iMessage plugin has already been granted operator-level trust for that directory viaattachmentRoots— the image tool's path validation should inherit that trust rather than enforcing a separate, narrower allowlist.Actual Behavior
The
imagetool enforces its own hardcoded allowed-path list that does not include the Messages Attachments directory, even whenattachmentRootsis explicitly configured.Impact
iMessage attachments (photos, screenshots) cannot be analyzed by the agent using the
imagetool. The workaround is to share images via URL or copy them to the workspace manually, which defeats the purpose ofincludeAttachments: true.Suggested Fix
When building the image tool's allowed-path set, include paths from
channels.<channel>.attachmentRootsfor any enabled channel with attachment support.