CometixCode
Plugin / AgentAn unofficial Rust 1:1 reimplementation of the Claude Code terminal UI, ported file-for-file onto an iocraft TUI framework.
- terminal-ui
- rust
- reimplementation
- unofficial
An agent plugin that answers one question — should I /compact now? — with a Jev judgment of whether the session sits at a safe boundary.
compact-adviser watches each settled turn and asks TypeSafe's Jev two one-sentence questions — is the unit of work finished, and is this hands-on work or coordination — composed in code into one score. The hint floor slides from 0.90 while the context is mostly empty (through about 10% used) to 0.50 by about 90% full, because a wrong hint costs most when there is still room. It can stop at a hint, or on Pi and Claude Code, with your explicit opt-in, run the compaction itself at the right moment; Codex CLI and Grok Build are hint-only because nothing outside their sessions can trigger /compact. Local gates keep it inert below a 40,000-token minimum, in non-interactive sessions, and whenever COMPACT_ADVISER_DISABLE is set.
Long agent sessions where compaction timing is a judgment call: compact too early and you lose working context, too late and the host force-compacts mid-task. Also for unattended runs — export COMPACT_ADVISER_DISABLE=1 and the adviser stays completely inert.
claude plugin marketplace add kunchenguid/compact-adviser claude plugin install compact-adviser@compact-adviser CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1 claude # then /compact-adviser (status shows Key: env / saved / .env) # requires a TypeSafe API key (TYPESAFE_API_KEY)
Requires a TypeSafe API key, and installing the package is consent to send eligible checkpoint context to TypeSafe — the README's table spells out what is and is not sent, but it is explicitly not a guarantee: use Off mode for material that must stay local. The Claude Code path depends on CLAUDE_CODE_ENABLE_FUNCTION_HOOKS=1, an experimental feature. Automatic compaction exists only on Pi and Claude Code (behind a first-use confirmation); Codex and Grok can only hint. MIT.
Repository
kunchenguid/compact-adviserCharted
An unofficial Rust 1:1 reimplementation of the Claude Code terminal UI, ported file-for-file onto an iocraft TUI framework.
Hook-level enforcement for the natural-language rules in AGENTS.md and CLAUDE.md — every edit is judged and violations are repaired in the same turn.
A Claude Code plugin that replaces the lossy compaction summary with Jev-scored pruning: stale tool calls are dropped, and everything kept stays verbatim.