[DOCS] Hooks docs missing SessionEnd behavior when using /resume to switch sessions

Resolved 💬 3 comments Opened Mar 18, 2026 by coygeek Closed Mar 23, 2026

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://code.claude.com/docs/en/hooks

Section/Topic

The SessionEnd event section and the SessionStart matcher documentation.

Current Documentation

The hooks page documents SessionEnd as firing "when a session terminates" with reason values: clear, logout, prompt_input_exit, bypass_permissions_disabled, and other.

The SessionStart matcher table explicitly lists resume as a trigger value for --resume, --continue, or /resume.

There is no symmetric documentation that /resume also causes a SessionEnd on the session being left. The SessionEnd reason table has no resume or session_switch value.

What's Wrong or Missing?

Changelog v2.1.79 fixed "SessionEnd hooks not firing when using interactive /resume to switch sessions." This confirms that switching sessions via /resume is intended to fire SessionEnd on the outgoing session — a behavior that is not documented anywhere.

The asymmetry is notable: SessionStart explicitly documents resume as a trigger, but SessionEnd is silent on this case. Hook authors who rely on SessionEnd for cleanup (closing connections, saving state, generating summaries) have no way to know that /resume triggers their hook unless they discover it empirically.

Suggested Improvement

A. Update the SessionEnd reason table

Add a note or reason value indicating that /resume triggers SessionEnd on the departing session. For example, add a row to the reason table or a note beneath it:

Using /resume to switch to another session fires SessionEnd on the current session before starting the new one.

B. Add cross-reference from SessionStart

The SessionStart section already documents resume as a trigger. Add a brief note there:

When /resume starts a new session, SessionEnd fires on the previous session first.

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

| Page | Context |
|------|---------|
| https://code.claude.com/docs/en/hooks | SessionEnd event section and reason table; SessionStart matcher table |
| https://code.claude.com/docs/en/hooks-guide | SessionEnd usage examples |

Total scope: 2 pages affected

Source: Changelog v2.1.79

Fixed SessionEnd hooks not firing when using interactive /resume to switch sessions

View original on GitHub ↗

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