3c39846c31
A git worktree does not load the flake pin: its .envrc is unallowed, so a process there falls through to whatever bd the profile carries. Today the two agree, which is why nothing has broken; nothing enforces that they keep agreeing. The failure mode is silent — a mutating bd of the wrong version empties the dependency graph in .beads/issues.jsonl and reports success. Section 0 of the session-start hook now reads the pinned version out of flake.nix (never a second copy, which would rot when the pin moves), compares it to `bd version`, and prints a banner and exits 2 on any disagreement. An unreadable pin or an unreadable version fails the same way: an assertion that cannot answer is not a pass. It blocks nothing — reading with a skewed bd is safe — and it runs before the CLAUDE_CODE_REMOTE gate so local worktrees, where the problem lives, are covered. The cloud path re-checks after installing bd and still completes its setup before the non-zero exit. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EoW5BB87ZZdm96SvBTWawH