Discord plugin: no notification when session ends without responding (auth errors, etc.)

Resolved 💬 2 comments Opened Mar 27, 2026 by subrih Closed Apr 27, 2026

Summary

When Claude Code fails to respond to a Discord message — due to auth errors, keychain issues, or other startup failures — the Discord user receives no feedback. The session simply goes silent.

Example scenario

  1. User sends a Discord message
  2. Claude Code is running but not logged in (/login required) or keychain is locked
  3. Claude processes the message, encounters the auth error, and exits
  4. Discord user sees nothing — no error, no indication anything happened

Current workaround

A Stop hook checks whether any assistant text was ever posted during the session. If the seen-file is empty and no text was flushed, it posts a warning:

if [ ! -s "$SEEN_FILE" ] && [ -z "$REMAINING" ]; then
  post_async "⚠️ Session ended without responding — may need \`/login\` or \`security unlock-keychain\`."
fi

This catches silent failures but requires maintaining per-session seen-files and can produce false positives (e.g. very short sessions with no substantive output).

Expected behavior

The plugin (or Claude Code) should emit a notification to the originating Discord channel when a session terminates without having sent any response. This could be a dedicated session_ended_without_response event or a failure mode on the Stop hook payload.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗