Skip to content

Make SessionStart stop waiting on the network - #12

Merged
bguidolim merged 1 commit into
bruno/stuck-rebase-recoveryfrom
bruno/faster-session-start
Oct 30, 2026
Merged

bguidolim merged 1 commit into
bruno/stuck-rebase-recoveryfrom
bruno/faster-session-start

Conversation

@bguidolim

Copy link
Copy Markdown
Contributor

Why

Every session waited ~1.75s at start, almost all of it the network pull, plus Node stripping TypeScript on each run. The pull now runs in the background, while a separate synchronous check still reports stuck state (rebase in progress, no upstream, lingering work) to Claude. The blocking part drops to roughly 60–100ms.

On Node 23+ the hooks also reuse Node's compile cache, which skips type stripping after the first run; Node 22 behaves as before. Teammates' memories now land a second or two after the session starts rather than before it.

Test plan

  • Run mcs sync in a project using the pack → expect three hooks registered: two SessionStart (one async), one Stop
  • Start a session while a teammate has pushed a memory → expect it in .claude/memories within a few seconds
  • Leave a rebase in progress in .claude/.memories-repo, start a session → expect the /resolve-memories reminder

- Split SessionStart into a sync status check (local git only) and an async pull
- Make hook entry points plain .mjs bootstraps that enable Node's compile cache
- Fold the hooks' git probes into fewer spawns
@bguidolim
bguidolim force-pushed the bruno/faster-session-start branch from 50606b4 to a2e2e7d Compare October 29, 2026 14:04
@bguidolim
bguidolim changed the base branch from main to bruno/stuck-rebase-recovery October 29, 2026 14:04
@bguidolim
bguidolim added this pull request to stack #14 October 29, 2026 14:04
@bguidolim
bguidolim merged commit b098577 into main Oct 30, 2026
12 checks passed
@bguidolim
bguidolim deleted the bruno/faster-session-start branch October 30, 2026 00:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant