Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By u-ichiv1.3.2MITIn 2 marketplaces
Keeps your working state through /compact, restoring the plan and recent decisions after compaction. Hooks run on every prompt and before compaction, and they call claude -p or codex exec to write the state file.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
Public GitHub repos that commit this plugin as enabled in their Claude Code settings
No risk signals detected
Nothing flagged in this plugin's hooks, MCP servers or commands. Other components are not analyzed.
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
2 marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Japanese README | Architecture
A transparent Claude Code and Codex plugin that preserves working state around /compact. It does not replace either runtime's compaction algorithm; it augments compaction through documented hooks.
additionalContextNot verified/compactadditionalContext, so the agent keeps its bearings during the last few turns before compaction actually runs. This does not change the compaction algorithm itself; it is a focus aid that reduces late-session drift between warn and the real /compact/compact-plus skill for manual state captureAfter installation, just run /compact as usual. No additional action is required — the flow is fully transparent.
/compact and auto-compaction trigger the same hook pathSessionStart(source=compact) before the first post-compaction promptOptional enhancements:
/compact keep the security-related decisions to send priority guidance to the state-generation LLM/compact-plus manually right before compaction if you want to leave richer recovery notes; this switches to the fallback path where the agent writes the structured state itselfclaude -p or codex execclaude -p --model claude-sonnet-5 --effort medium as the primary backend and codex exec --model gpt-5.3-codex-spark as the fallback backendgpt-5.4 or gpt-5.5Add this GitHub repository as a marketplace, then install the plugin from it.
claude plugin marketplace add u-ichi/compact-plus --scope user
claude plugin install compact-plus@compact-plus
Add the same GitHub repository as a marketplace, then install the Codex plugin.
codex plugin marketplace add u-ichi/compact-plus
codex plugin add compact-plus@compact-plus
Review and trust the hook definitions when Codex prompts. Start a new thread after installation so Codex loads the installed plugin and hooks.
Refresh the GitHub marketplace snapshot, then update or reinstall the plugin.
# Claude Code
claude plugin update compact-plus@compact-plus
# Codex
codex plugin marketplace upgrade compact-plus
codex plugin add compact-plus@compact-plus
For local development, replace u-ichi/compact-plus in the marketplace-add command with the absolute path to this repository.
The plugin reference remains compact-plus@compact-plus.
Following the Claude Code plugin model, write environment variables under the env block in ~/.claude/settings.json. For temporary per-session overrides, shell export also works.
Two environment variables replace the primary and fallback commands as whole shell commands.
| env var | Meaning |
|---|---|
COMPACT_PLUS_PRIMARY_BACKEND | Complete shell command for the primary backend. Set to an empty string ("") to skip the primary backend |
COMPACT_PLUS_FALLBACK_BACKEND | Complete shell command for the fallback backend. Set to an empty string to skip the fallback backend |
Environment variables available inside those commands:
$SYSTEM_PROMPT: the LLM system prompt from prompts/state-summary.md$SESSION_ID: Claude Code session id$TRANSCRIPT_PATH: transcript JSONL path$MAX_OUTPUT_TOKENS: LLM output capDefault values are embedded in hooks/precompact-state-summary.sh.
Example ~/.claude/settings.json override for a lower-cost Haiku backend:
{
"env": {
"COMPACT_PLUS_PRIMARY_BACKEND": "claude -p --model claude-haiku-4-5-20251001 --effort low --permission-mode dontAsk --output-format text --no-session-persistence --system-prompt \"$SYSTEM_PROMPT\""
}
}
Example replacing the primary backend with Codex Spark (requires ChatGPT Pro; served through Cerebras for higher throughput):
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub u-ichi/compact-plus --plugin compact-plusPlugins from other owners that cover similar ground