anthropics / anthropics/claude-plugins-official
read_imessages returns stale results — newer messages not returned regardless of limit
- Dominant language
- Python
- Stars
- 36.3k
- Forks
- 4.1k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 539
Description
## Summary
`read_imessages` (and by extension `get_unread_imessages`) in the Read_and_Send_iMessages MCP connector appears to serve stale/cached data. For a specific 1-on-1 conversation, the tool consistently stops returning messages at a fixed timestamp, even though newer messages exist in Messages.app for that same thread.
## Steps to reproduce
1. Call `read_imessages` with `phone_number` set to a contact with recent, active message history, `limit=100`.
2. Compare the newest returned message's `date` field against what Messages.app actually shows for that conversation.
## Observed behavior
- The newest message returned was identical regardless of whether `limit` was 10, 20, 50, or 100 — same content, same timestamp.
- Messages.app showed at least two additional messages in the same thread, dated after that cutoff (one outgoing attachment, one incoming text), that never appeared in any `read_imessages` call.
- `get_unread_imessages` did not surface them either (they'd already been read in the app, so that may be expected/out of scope).
- To rule out a handle-matching issue rather than a data-freshness issue, I tried the phone number in a few formats, plus every email address linked to the same Contacts card as an alternate `phone_number` value — all returned either the same stale result set or an empty array. This points to the underlying data source being stale rather than a query-parameter problem.
## Suspected cause
Possibly the connector reads a cached or copied snapshot of the Messages `chat.db` rather than the live database, or doesn't account for SQLite WAL data that hasn't been checkpointed yet.
## Impact
Downstream automations that rely on `read_imessages` to detect "new since last run" can silently miss messages once the cache/snapshot goes stale — no error is raised, it just quietly stops returning anything newer than the stale point.
## Environment
- Connector: Read_and_Send_iMessages (macOS, local)
- Observed via a Cowork/Claude session, July 2026
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at the read_imessages and get_unread_imessages entry points and compare their returned dates with Messages.app for the reproduced one-on-one thread. Inspect how the connector reads chat.db, including SQLite WAL handling, then reproduce with limits 10, 20, 50, and 100. Done means newer messages, including the cited attachment and text, are returned without a stale cutoff.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, python, sqlite
- Domain
- databases, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100