Skip to content

P2: Capture on compaction — consolidation pass at the context-death moment #41

Closed

Description

@abogartz

Part of #82.

Problem

Auto-capture fires on session-idle only. But compaction is the moment episodic detail actually dies — and the Compaction Cliff paper (arXiv:2608.22752, CIKM'26) shows one compaction round retains 53% of exact-wording rules, five rounds 10%. The compactionAnchor protects store→summary; nothing protects transcript→store at the moment of maximum need.

Prior art: Prime Agent's auto-refine triggers after compaction (review gate + 20-min cooldown, local scope only); Letta's sleep-time compute (arXiv:2504.13171) does async consolidation, optionally on a stronger model, "anytime" style.

Proposal

  • On the existing compaction hook (where we already drop the epoch), additionally trigger the auto-capture pipeline — same runWriteGate path, same captureModel option, plus a cooldown so repeated compactions in one session don't thrash.
  • Opt-in under the same autoCapture flag (or a captureOnCompact sub-option); zero-token default preserved.
  • Evidence line capture_compaction distinguishes trigger source so we can measure which trigger earns its tokens.

Measure

Per the NOOA caveat (reflection rows = 22% of store, ~1% of reads): compare retrieval hit-rate of capture-at-idle vs capture-at-compaction rows after a month of use; keep whichever pays.

Activity

  1. added
    capture
    on Oct 24, 2026
  2. added a commit that references this issue on Oct 25, 2026
  3. abogartz-opencode-self-improvement commented on Oct 25, 2026

    @abogartz-opencode-self-improvement

    🎉 This issue has been resolved in version 0.14.0 🎉

    The release is available on:

    Your semantic-release bot 📦🚀

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    capturereleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions