DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to get hint-only /compact advice in Codex CLI on macOS or Linux with Compact Adviser

Install the Compact Adviser hook in Codex CLI to see a compact hint after each finished turn.

Short answer: Confirm you are on macOS or Linux, Node is 22.18 or newer, and Codex CLI is 0.153.0 or newer; then run codex plugin marketplace add kunchenguid/compact-adviser; run codex plugin add compact-adviser@compact-adviser. All steps.

Who it is forA developer on macOS or Linux using Codex CLI for long sessions who wants a prompt to compact without giving up manual control.

The problemCodex CLI sessions grow over time, and there is no built-in signal for when compacting would be safe.

The outcomeAfter a completed checkpoint, Codex shows a hint line under the answer. Codex never compacts on its own, so the decision stays with you.

What you need first

  • Node 22 or newer (22.18 or newer for Codex and Grok)
  • One supported host: Pi 0.82.0 or newer, Claude Code 2.1.274 or newer, Codex CLI 0.153.0 or newer, or Grok Build 1.0.34 or newer
  • A TypeSafe API key, supplied as TYPESAFE_API_KEY in the launch environment, a cwd .env file, or saved through the host settings where supported

Steps

  1. Confirm you are on macOS or Linux, Node is 22.18 or newer, and Codex CLI is 0.153.0 or newer.
  2. Run codex plugin marketplace add kunchenguid/compact-adviser.
  3. Run codex plugin add compact-adviser@compact-adviser.
  4. Restart Codex and review the hook in /hooks once so it is trusted.
  5. Finish a turn and look for the ↳ Hook · Compact adviser: line under the answer. If the hook cannot find Node, set COMPACT_ADVISER_NODE to an absolute node path.

Prompt for your agent

Install compact-adviser in Codex CLI on <target macOS or Linux machine>: add the kunchenguid/compact-adviser marketplace, add compact-adviser@compact-adviser, then restart and trust the hook in /hooks. Expected output: a Compact adviser hint line appears after a completed turn. Verify the hook is trusted before reporting success.

Caveat. Codex support is limited to macOS and Linux, and Windows is not supported in this release.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for kunchenguid/compact-adviser and "Get hint-only /compact advice in Codex CLI on macOS or Linux"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer