Stop listing closed agent sessions as online
A session stayed online for as long as its machine's daemon was connected, so closed Claude Code and OpenCode sessions lingered until they expired 12 hours later. - A new SessionEnd hook detaches the session when Claude Code exits. The session does not end, so a resume picks it back up. - A connected machine now keeps a session online for at most 1 hour after its last call, which also clears sessions of crashed clients. - `refs update` refreshes the Claude Code hooks.
4 files changed · +30 −5
apps/backend/index.ts+3 −3
apps/backend/sessions.ts+7 −1
apps/backend/test/presence.test.ts+12 −0
apps/cli/refs.mjs+8 −1