Symptom
SlidingWindowCompaction(keep_messages=1, receipts=True) drops the request being answered whenever it trims. The model sees the receipt and not that turn's prompt.
Evidence what you'll see
- With
preserve_first_user_messageon, the model still does not see the current prompt. It sees the receipt plus the first user message. - The
keep_tokenspath is not affected.keep_messages=0is unchanged and still keeps only the receipt.
Why it happens
compact() reserves one kept slot for the receipt, so keep_messages=1 calls find_safe_cutoff(messages, 0), which returns len(messages) and drops the tail, including the current request.
Affected versions
The report is pydantic-ai-harness from main at 47f5715b, Python 3.14. The linked issue does not name an operating system.
Fix steps
0 of 2 done
Your check marks stay in this browser only.
How to check it worked
- Run three turns with
keep_messages=1andreceipts=Trueand confirm each model request ends with that turn's own prompt.
If it still fails
- The linked issue does not describe a dropped current request on
v2.55.0. On the reported main commit,keep_messages=1with receipts drops it.
Sources and credit
Summarized in our own words from these public reports. Credit goes to their authors.
Provided as is, without warranty. Try changes in a non-production environment and back up first. Security-related steps: verify against the official docs. Terms · Request removal or attribution change
Hit an error we don't cover? Submit it