Skip to content

fix: retain active reminders and human boundaries during compaction - #40

Merged
Brian Krabach (bkrabach) merged 4 commits into
mainfrom
lane/rr-context-a7ec
Sep 15, 2026
Merged

Brian Krabach (bkrabach) merged 4 commits into
mainfrom
lane/rr-context-a7ec

Conversation

@bkrabach

@bkrabach Brian Krabach (bkrabach) commented Sep 15, 2026 •

Copy link
Copy Markdown
Collaborator

What changed

  • Add the optional context.request_retention request-view capability so the current required persisted hook envelope and metadata-classified first/latest human messages survive compaction.
  • Preserve the last configured N tool results from removal with their owning tool-call groups kept atomic.
  • Keep canonical history unchanged. Whole-body deduplication belongs to the separate loop companion, which will be proposed only after this change merges.

The narrow tool-removal floor builds on public context work in 1f781cd; this PR does not import its broader assembly branch.

Why

Active reminder content and human request boundaries must remain available in compacted request views without changing message roles or the default behavior.

CI qualification and compatibility

The follow-up CI-only commit removes the development Git-main Core source mapping, locks development and CI to released amplifier-core==1.6.1, and checks the required ContextLengthError API before tests run. Runtime dependencies remain empty: Core is host-provided, and this module requires host Core >=1.6.1. No Core source or production implementation/test behavior changed.

Verification

  • Focused production DTU suite: 140 passed, 1 expected failure.
  • Composed coverage: loop-streaming 274 passed; provider-openai 951 passed, 2 live tests deselected.
  • Observed Terra and Anthropic level-8 delivery/resume under separately pinned fixtures.
  • PR CI locks and tests the released Core compatibility requirement on Python 3.11 and 3.12.
  • No role promotion or default-mode change.

Limits

This is not a claim of a complete live-evaluation matrix, hard token ceiling, 1M-window behavior, or general-quality improvement. A live causal A/B remains unproven. Anthropic strict bare-JSON corroboration remains failing because otherwise-correct values were fenced.

Breaking changes

None. The capability is optional; existing request and canonical-history behavior remains unchanged. The supported host Core floor is 1.6.1.

Port the semantic request-retention delta from reviewed #2 candidate 42e3cff (implementation commits 482ea03, db63ff2, and 95de3a4).

Original contribution credit: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>

Generated with Amplifier

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Generated with Amplifier

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Tested source bytes match the final-preflight3 guest per-file SHA-256 binding.

Generated with Amplifier

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
Generated with Amplifier

Co-Authored-By: Amplifier <240397093+microsoft-amplifier@users.noreply.github.com>
@bkrabach
Brian Krabach (bkrabach) merged commit 19384a3 into main Sep 15, 2026
4 checks passed
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.

2 participants