-
-
Notifications
You must be signed in to change notification settings - Fork 52.7k
Closed
Description
Summary
compaction.mode: "safeguard" fails to produce a summary when session hits ~186k tokens, resulting in:
"Summary unavailable due to context limits. Older messages were truncated."
Expected Behavior
Safeguard mode should chunk the large history and produce a summarized compaction, preserving conversation context.
Actual Behavior
Compaction entry shows:
{
"type": "compaction",
"summary": "Summary unavailable due to context limits. Older messages were truncated.",
"tokensBefore": 186094,
"fromHook": true
}Environment
- Session ran for ~12.5 hours before hitting the limit
- Config:
agents.defaults.compaction.mode: "safeguard" - Model:
anthropic/claude-opus-4-5 - Memory flush did fire (~38s before compaction)
- Two compactions fired in quick succession (186k tokens, then 19 tokens)
Notes
- Memory flush safeguard worked correctly (fired at soft threshold)
- Bug appears to be in chunked summarization logic — it should have broken 186k tokens into pieces but bailed out instead
- Gemini embeddings showed quota exhaustion (429 RESOURCE_EXHAUSTED) ~40s before compaction, but that is for memory search, not summarization
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels