self-compact
by demetre19 · ★ 0 · updated 2 Nov 2026
0
The agent manages its own context: notice/warning/forced thresholds, a self_compact tool with a note-to-self handoff, and a context gauge.
Install
/plugin marketplace add demetre19/claude-mods/plugin install self-compact@claude-modsThen run /reload-plugins or start a new session. Requires Claude Code 2.1.287+.
What it hooks into
From an automated scan with claude plugin validate, not a security review. Mods run with your permissions; read the code before installing.
- Events
session.startturn.starttool.callprompt.submitturn.completesession.compactcommand.runui.render- API calls
$.clock.after$.command.register$.command.run$.env.get$.fs.exists$.fs.read$.fs.write$.http.fetch$.process.run$.prompt.submit$.session.compact$.session.id$.session.model$.session.usage$.state.get$.state.set$.store.delete$.store.get$.store.set$.tool.register$.ui.close$.ui.open$.ui.resolve$.ui.toast- Draws
PaneAbovePrompt- Can see
? callsevery tool callevery promptcompaction- Reach
- level 3 of 3 networkruns processeswrites filesdrives Claudereads filesreads env varsreads mod statepersists statedraws
Origin
- How it got here
- Automated scan of public GitHub repos, via the CC0 dataset awesome-claude-code-mods (scan of ).
- Repository
- github.com/demetre19/claude-mods
- Path in repo
self-compact- Source commit
3112a69the exact code the scan read- Author
- @demetre19
- License
- MIT
- First published
- Last pushed
- First listed here
Name and description come from the mod's own manifest. We link to the code; we don't host it, and it stays under its author's license.
More from demetre19/claude-mods
Related mods
Other mods in Panes, close to this one by stars.