From Agents-Core Context Compaction
Opt-in native context compaction after successful main conversation turns.
6 events · 12 calls
Ships in Agents-Core Context Compaction. Installing the plugin adds it to Claude Code.
A mod runs inside Claude Code as you, unsandboxed. This is what its source calls.
fs.readfs.statenv.getcommand.runEach event it registers a hook on, with the matcher when it sets one
turn.startturn.stepagent.spawnturn.completesession.compactsession.endEvery mods API method its source calls, by namespace
listafternowlistrungetreadstatcompactsurfacesusagelogAGENTS_CONTEXT_COMPACTION_CONFIGHOMEUSERPROFILEWhere Claude Code finds the mod
hooks/hooks.jsonhooks/register.js (written ./register.js)Read from the source, never run. Claude Code checks a mod again when it loads it and can refuse code this reading accepts; claude plugin validate shows its own list.
npx claudepluginhub iezhu/agents --plugin agents-core-context-compaction