What
When Claude Code exits, peer messages that were being held in the cross-session inbound queue are answered as expired instead of being abandoned, so the sending session gets a definite result.
Details
- A shutdown hook drains the hold buffer and settles every still-held peer message with an
expiredstatus, logging how many were settled - The drain is raced against a grace period of up to 750 ms before shutdown continues
- Once shutdown has begun, a late peer message is refused rather than parked, recording peer_inbound_gate / shutdown_expired telemetry
- Unix-socket messaging server teardown now also destroys open connections and unlinks the socket file before awaiting the drain
- A new lookup lets the headless expiry path read a message's hold cause
Evidence
[cross-session-inbound] shutdown: settling ${e.length} still-held peer message(s) as expired, shutdown: settling , [cross-session-inbound] shutdown: not parking a late peer message \u2014 settled as expired:
Strings lifted out of the shipped bundle, so the claim above can be checked against them.