Notifications

Get pinged when Claudin needs you — through whatever channel your terminal and OS support.

Overview

Claudin surfaces "needs attention" events — input required, long task finished, custom hook-driven events — through the best channel available in your environment. The router picks automatically by default, and you can override it via /config at any time.

Identical notifications fired within 2 seconds are coalesced, so you won't get spammed when several tools complete in quick succession.

Channels

Configured via preferredNotifChannel in ~/.claudin/settings.json — or pick interactively under /configNotifications.

ChannelWhat it does
autoPick the best available channel for the detected terminal/OS (default).
iterm2iTerm2 proprietary OSC 9 sub-protocol.
iterm2_with_belliTerm2 OSC 9 + raw BEL.
kittyKitty OSC 99 (3-part: title / body / focus).
ghosttyGhostty OSC 777 notify;….
os_nativeDesktop toast via notify-send / osascript / Windows Toast XML.
terminal_bellRaw \x07 BEL.
notifications_disabledNo-op.

Auto resolution

The auto channel walks this decision tree:

  1. Headless (!process.stdout.isTTY) → os_native (no terminal to talk to).
  2. OSC channel from the terminal matrix below, if one matches.
  3. Apple Terminal → try os_native (toast), else BEL if the user's Profile has Bell enabled.
  4. SSH session without WSL → skip OS-native (a toast on the remote host is invisible). The terminal-side OSC paths still work — the escape travels over the tty to your local emulator.
  5. Otherwise → os_native.

Terminal → channel matrix

TerminalChannel chosen by auto
iTerm2iterm2
kittykitty
GhosttyOSC 777
WezTermOSC 777
foot (Wayland)OSC 777
urxvt / rxvtOSC 777
Windows TerminalOSC 9 plain (WT renders raw OSC 9 as a toast)
ConEmuOSC 9 plain
Apple Terminalos_native (osascript) → fallback BEL
Alacrittyos_native
GNOME Terminal / Konsole / Terminator / Tilix / xtermos_native
Anything elseos_native (best-effort)

OS-native backends

PlatformPrimaryFallback
macOSterminal-notifier (if installed via brew)osascript -e 'display notification …'
Linuxnotify-send (libnotify)kdialog --passivepopup
Windows 10/11powershell.exe Toast XML via -EncodedCommand (built-in WinRT, no module dep)
WSLSame Toast XML over powershell.exe interop

The Windows Toast payload is base64-encoded as UTF-16LE before being passed to powershell.exe -EncodedCommand — that avoids both XML and shell-quoting pitfalls. AppleScript and Toast XML payloads are escaped accordingly.

Hooks

Before routing to the channel above, Claudin fires executeNotificationHooks(). That lets you wire any custom backend — Slack, Pushover, ntfy, an internal webhook — via the hooks section of ~/.claudin/settings.json. The channel runs in addition to, not instead of, the hook.

Useful when you want both a desktop toast and a Slack DM, or when you're on a remote box and want the notification to reach your phone instead.

Configuration

Open /config inside the Claudin REPL and pick a channel under Notifications. Or edit ~/.claudin/settings.json directly:

{
  "preferredNotifChannel": "auto"
}

Set to any of the channels listed above. Omit the key (or leave it at auto) for automatic detection.