Skip to content

Context reminder

The context-compaction-reminder extension warns you when the conversation context grows large and suggests a handoff so you can keep token usage low and AI quality high.

Bundled with Selesai

Loaded automatically with Selesai; no per-extension npm install is required.

Manifest entry
./context-compaction-reminder.ts
Runtime surface
Automatic

Setup and prerequisites

  • This extension is bundled with Selesai. It is loaded automatically; you do not need to install it separately.
  • The reminder is triggered after agent_settled events when the context is reported by the runtime.
  • No external configuration or credentials are required.

What it sets up

  • Listens to the agent_settled lifecycle event and reads ctx.getContextUsage().tokens.
  • Resets its flag whenever the session is compacted via session_compact.

What you can configure

Context reminder is fully automatic. The threshold and suggestion behavior are fixed.

No user configuration

This capability does not expose user-editable settings. Its behavior is controlled by the commands and runtime rules documented below.

Command, tool, and shortcut controls

Key / pathDescription
/handoff-newSuggested command when the context threshold is crossed.

Source evidence

What you can do

  • Receive a one-time warning when the conversation reaches 128,000 tokens.
  • Run /handoff-new to summarize the conversation into a clean session and continue from a smaller context.
  • Enable Auto Handoff in settings if you prefer compaction to happen automatically.

Commands, tools, and shortcuts

  • None. The reminder fires automatically.
  • The suggested follow-up is /handoff-new from the separate handoff-new extension.

Limits and safety

  • Only one reminder is shown per crossing of the threshold. If context drops below the threshold later, the reminder resets.
  • The warning is informational; it does not truncate context or stop the agent.
  • The extension relies on the runtime’s context usage report. If context usage is unavailable, it does nothing.

Source evidence

Selesai version: 0.10.0