Get notified before your LLM loses its mind.
An OpenCode plugin that tracks token consumption per session and fires desktop alerts when you approach the dumb zone: the point where a context window is so saturated that model quality degrades.
LLMs have a fixed context window. As the conversation grows, the model has to juggle more and more tokens, and past a certain point it starts dropping the ball: forgetting earlier instructions, hallucinating, repeating itself. That degraded region is the dumb zone.
The problem is that there's no built-in warning. You only notice when the output quality tanks. This plugin watches your token consumption in real time and alerts you at configurable thresholds so you can decide to start a fresh session before things go sideways.
- Three alert tiers — 50 %, 75 %, and 100 % of your configured threshold
- Desktop notifications via
notify-sendwith urgency levels (low,normal,critical) - TUI toasts displayed inside OpenCode's terminal UI (with graceful fallback if unavailable)
- Per-session deduplication — each threshold fires at most once per session, no spam
- Per-project context — the notification title includes the current project name
- Fully configurable — adjust the token threshold, ratios, urgency levels, and messages
- OpenCode installed and working
notify-sendavailable on your system (Linux withlibnotify)- Install on Debian/Ubuntu:
sudo apt install libnotify-bin - Install on Arch:
sudo pacman -S libnotify
- Install on Debian/Ubuntu:
- macOS / Windows:
notify-sendis not natively available. Desktop notifications will silently fail; TUI toasts will still work.
-
Copy or clone
dumb-zone-alert.json your machine, e.g.:~/.config/opencode/plugins/dumb-zone-alert.js -
Restart OpenCode. The plugin loads automatically on startup.
All configurable values are at the top of dumb-zone-alert.js.
The total token count that represents your model's effective limit. Tiers are calculated as percentages of this value.
const TOKEN_THRESHOLD = 100_000; // adjust to your model's context windowDefines the ratio, visual level, notify-send urgency, and display label for each alert tier.
const TIERS = [
{ ratio: 0.5, level: "info", urgency: "low", label: "50 %" },
{ ratio: 0.75, level: "warning", urgency: "normal", label: "75 %" },
{ ratio: 1.0, level: "error", urgency: "critical", label: "100 %" },
];The body text of each notification, keyed by ratio.
const MESSAGES = {
0.5: "We're half way to the dumb zone!",
0.75: "Be careful, the dumb zone is about to be reached!",
1.0: "You reached the dumb zone, you should start a new session.",
};MIT — see LICENSE file.