Provide Hook for manuall compact #1094
Closed
dsrednicki
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Extend the
PreCompacthook to also fire when the user manually runs/compact, not only during auto-compact triggered by context window l imits.Current behavior:
PreCompactonly fires during automatic context compaction (when the context window limit is hit).Desired behavior:
PreCompactfires on both auto-compact and manual/compact.Why it matters: Any hook registered on
PreCompactis silently skipped when users compact manually, making the hook unreliable for use cases like saving state, logging, or reminders before context is lost.Suggestion: Optionally pass a flag to distinguish trigger source (e.g.
COMPACT_TRIGGER=manualvsCOMPACT_TRIGGER=auto) so hooks can handle both cases differently if needed.Beta Was this translation helpful? Give feedback.
All reactions