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.
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_settledevents when the context is reported by the runtime. - No external configuration or credentials are required.
What it sets up
- Listens to the
agent_settledlifecycle event and readsctx.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 / path | Description |
|---|---|
/handoff-new | Suggested command when the context threshold is crossed. |
Source evidence
src/extensions/context-compaction-reminder.tsReminder source
What you can do
- Receive a one-time warning when the conversation reaches 128,000 tokens.
- Run
/handoff-newto 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-newfrom the separatehandoff-newextension.
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.