Skip to content

feat(plugin): add skip option to experimental.session.compacting hook#35510

Open
SinyaLv wants to merge 2 commits into
anomalyco:devfrom
SinyaLv:feat/compaction-skip
Open

feat(plugin): add skip option to experimental.session.compacting hook#35510
SinyaLv wants to merge 2 commits into
anomalyco:devfrom
SinyaLv:feat/compaction-skip

Conversation

@SinyaLv

@SinyaLv SinyaLv commented Jul 6, 2026

Copy link
Copy Markdown

Issue for this PR

None

Type of change

  • New feature

What does this PR do?

Adds a skip?: boolean field to experimental.session.compacting hook output. When set to true by a plugin, the compaction cycle is skipped entirely.

This is needed for memory-management plugins that handle their own context window via messages.transform and don't need (or want) the built-in compaction to run.

The change is minimal: 1 field in the type definition + 1 guard check after the trigger call. Existing plugins are unaffected since skip defaults to undefined/falsy.

How did you verify your code works?

  • Type check passes locally
  • Backward compatible: existing plugins that only set context/prompt continue to work unchanged

Screenshots / recordings

N/A

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Jul 6, 2026
@SinyaLv SinyaLv force-pushed the feat/compaction-skip branch from 589fc02 to 9e141c5 Compare July 6, 2026 06:11
@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jul 6, 2026
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

1 similar comment
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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