Skip to content

Fix stalled history compression when utility model fails - #1887

Open
fcsguyxcw wants to merge 1 commit into
agent0ai:developmentfrom
fcsguyxcw:codex/fix-history-compression-fallback
Open

fcsguyxcw wants to merge 1 commit into
agent0ai:developmentfrom
fcsguyxcw:codex/fix-history-compression-fallback

Conversation

@fcsguyxcw

Copy link
Copy Markdown

Summary

  • fall back to deterministic, bounded head-and-tail compression when the utility model raises or returns empty content
  • keep the healthy utility-model path unchanged
  • treat an empty bulk collection as a no-op instead of raising IndexError
  • add regression coverage for exception, empty-response, compression-progress, and empty-bulk paths

Unlike catch-and-stop handling, the fallback produces a non-empty bounded summary so saturated histories can continue shrinking.

Tests

  • .venv/Scripts/python.exe -m pytest tests/test_history_compression_fallback.py tests/test_history_compression_wait.py tests/test_chat_compaction.py -q — 9 passed
  • .venv/Scripts/python.exe -m py_compile helpers/history.py tests/test_history_compression_fallback.py

Fixes #1881

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant