-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Description
Describe the bug
Sleeptime trigger evaluates after each capture call, not after a complete request/response cycle is finished. There's no atomicity guarantee that all parts of a multi-part assistant response are processed together before sleeptime evaluation.
- Frontend sends multi-part assistant response (e.g., thinking block + response text) via /messages/capture
- Each part creates a separate Message in Letta
- Sleeptime frequency counter increments per message batch
- If counter hits trigger threshold between assistant message parts, sleeptime fires mid-response
- Sleeptime agent receives incomplete context: thinking block without response text, or response without full conversation
- Missing context causes sleeptime to misinterpret its role - attempts conversational response instead of memory processing.
Please describe your setup
- How are you running Letta?
- Using Letta Cloud, but this bug is visible in OSS version as well.
- Describe your setup
- Linux, accessing Letta Cloud api via custom rust and letta-python.
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
- I'm using Opus with very fresh context window (freshly created agents) in sleeptime.
- I can semi-reliably reproduce this both on first turn sleeptime (another oddity, for another bug report) and further in.
Agent File (optional)
Please attach your .af file, as this helps with reproducing issues.
Metadata
Metadata
Assignees
Labels
No labels