anthropics / anthropics/claude-plugins-official
read_imessages returns stale results — newer messages not returned regardless of limit
- Ngôn ngữ chính
- Python
- Star
- 36.3k
- Fork
- 4.1k
- Merge trung bình
- 2 ngày 14 giờ
- Pull request đã merge (30 ngày)
- 539
Mô tả
## 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
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- macos, python, sqlite
- Lĩnh vực
- databases, desktop
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 48/100