Skip to content

compact-adviser

Agent plugin that asks Jev whether the session is at a safe boundary to /compact and can trigger it on Pi and Claude Code.

Pluginbeta

Overview

compact-adviser is a plugin for coding agents that answers one question: should I /compact now? It sends two one-sentence classification questions to Jev in a single request (is the current unit of work finished, and is this hands-on work or coordination) and combines the answers in code into one score.

It is for people running long coding-agent sessions who want to compact at natural boundaries rather than mid-task. The hint threshold is 0.90 while context is mostly empty and relaxes toward 0.50 as the context fills, because a wrong hint costs more when there is still room; an optional context budget makes it relax earlier. On Pi and Claude Code it can run /compact automatically after a first-use confirmation; Codex CLI and Grok Build get hints only. Jev is never asked to write a summary.

What the decision model decides

TypeQuestionAnswers
Yes / noIs the current unit of work finished?yes · no
ChoiceIs this hands-on work or coordination?hands-on · coordination

How it works

  1. At a checkpoint, the plugin collects eligible session context
  2. Two Jev questions are asked in one request
  3. Code composes a score and compares it to a fill-dependent threshold (0.90 down to 0.50)
  4. Show a /compact hint, or run /compact automatically on Pi or Claude Code if opted in

Strengths

  • Threshold adapts to how full the context is
  • Works across Pi, Claude Code, Codex CLI and Grok Build
  • Decision only; no summary generation by Jev

Caveats

  • Claude Code support relies on an experimental function-hooks flag
  • Codex support is macOS and Linux only
  • Installing implies consent to send checkpoint context to TypeSafe

Getting started

pi install npm:compact-adviser, or claude plugin marketplace add kunchenguid/compact-adviser then claude plugin install compact-adviser@compact-adviser.

At a glance

Type
Plugin
Status
beta
Language
TypeScript
Runtime
Pi extension, Claude Code plugin, Codex/Grok hooks
Has code
yes

Use cases and integrations

How curated lists describe it

  • Agent plugin that asks Jev whether the session is at a safe point to `/compact`, and can run it automatically on Pi and Claude Code.

    MrJev/awesome-jev

Frequently asked questions

What does compact-adviser decide?

Whether the agent session is at a safe point to run /compact.

Can it compact automatically?

Yes on Pi and Claude Code if you opt in; Codex and Grok receive hints only.

Does it need a TypeSafe key?

Yes, via TYPESAFE_API_KEY, a local .env, or the agent's settings.

Related projects

  • Pi coding agent extensions, including pi-jev-router, which asks Jev whether a prompt should continue, fork or start a new session.

    PluginbetaTypeScript
  • JIT-JEV Context OS: deterministic context compiler plus a Jev System 1 gate that scores AST relevance, test proofs and tool targets.

    BenchmarkresearchPython
  • Recursive language model layer for coding agents that keeps inputs in a local evaluator, with optional Jev judge_many for typed calls.

    ProjectbetaRust
  • Codex plugin that builds handoff packets by asking Jev whether each old read-only tool record should stay, keeping retained text verbatim.

    ProjectbetaJavaScript
  • Local compaction proxy for Claude Code and Codex that compacts more often with local rules and keeps full history searchable.

    ProxybetaGo
  • Coding-agent hook where Jev decides whether a mid-turn message should steer the running task, be queued, or interrupt it.

    PluginbetaPython