Skip to content

feat: add persistent context compaction - #16

Open
Sam Schillace (ramparte) wants to merge 4 commits into
mainfrom
feat/persistent-compaction
Open

feat: add persistent context compaction#16
Sam Schillace (ramparte) wants to merge 4 commits into
mainfrom
feat/persistent-compaction

Conversation

@ramparte

@ramparte Sam Schillace (ramparte) commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • branch overall: add explicit stored-history compaction while preserving ephemeral request-time compaction behavior
  • branch overall: preserve tool-call/tool-result pair validity during persistent compaction
  • Attempt-2 remediation: place compaction notices before conversation messages so they cannot split an assistant tool call from its following result
  • Attempt-2 remediation: leave stored history unchanged and report no_reduction when explicit compaction does not shrink it
  • the notice-reserve budget guard predates Attempt 2 and remains unchanged by this remediation

Tests

  • focused: uv run pytest -q tests/test_persistent_compaction.py tests/test_progressive_compaction.py tests/test_tool_pair_compaction.py (20 passed)
  • full: uv run pytest -q (43 passed)
  • protected existing regression test identity verified against origin/main
  • git diff --check origin/main...HEAD

No lockfile changes.

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