anthropics / anthropics/claude-plugins-official

read_imessages returns stale results — newer messages not returned regardless of limit

Aperta
#4,202 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
36.3k
Fork
4.1k
Merge medio
2g 14h
PR unite (30g)
539

Descrizione

## 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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

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.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
macos, python, sqlite
Ambito
databases, desktop
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Tranquilla
Chiarezza
Abbastanza chiara
Idoneità per principianti
48/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.