Discord plugin: no notification when session ends without responding (auth errors, etc.)
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
- User sends a Discord message
- Claude Code is running but not logged in (
/loginrequired) or keychain is locked - Claude processes the message, encounters the auth error, and exits
- 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.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗