fix: 60s grace period on crash detection for spawned sessions#69
Merged
Conversation
c9bae34 to
f124a88
Compare
…adAt
Four fixes to the crash detection category:
1. Remove duplicate inline death check in bridge-server.ts socket.on('end')
— checkSessionDeath() already covers this case via setTimeout. The inline
copy fired in parallel, producing double death notices.
2. Health poll (daemon.ts) changed from OR to AND — only flag as crashed
when BOTH tmux is dead AND bridge is disconnected. Bridge-only
disconnects are handled by the bridge-server disconnect handler (3s
delay + tmux check). The OR condition false-positived on temporary
bridge drops and newly spawned sessions.
3. Health poll now sets info.deadAt + calls registry.persist() +
threadRegistry update + refreshSessionVisual(), fully consistent
with checkSessionDeath().
4. 60s spawn grace period — skip crash detection for sessions younger
than SPAWN_GRACE_MS (bridge needs time to connect after spawn).
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
f124a88 to
4a89826
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Consolidates four bugs in the crash detection category into one fix:
bridge-server.tssocket.on('end') had bothcheckSessionDeath()AND an inline copy, producing double 💀 notices on genuine crashescheckSessionDeath(). Previously only added tocrashAlertedwithout marking the session dead, leaving the door open for a second death notice from other pathsSPAWN_GRACE_MSNet -9 lines. 2 files changed.
Config change (not in PR)
Added
DEFAULT_SESSION_CHANNEL=D0B86C5250Cto~/.claude/channels/slack/.env— fixes Home tab spawn routing Discord channel ID on Slack.Test plan
🤖 Generated with Claude Code