Skip to content

Commit a696021

Browse files
committed
fix(hooks): use CLAUDE_CODE_SESSION_ID for session-scoped flag file
SESSION_ID was null because the hook env var is CLAUDE_CODE_SESSION_ID (with fallback to CLAUDE_SESSION_ID). Also use ${VAR:+-suffix} so the flag falls back to a fixed path rather than permanently blocking when no session ID is available.
1 parent 6dc9dd9 commit a696021

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

.claude/hooks/pre-commit.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ if [ -z "$STAGED" ]; then
1212
exit 0
1313
fi
1414

15-
FLAG_FILE="/tmp/claude-tests-confirmed"
15+
SESSION_ID="${CLAUDE_CODE_SESSION_ID:-${CLAUDE_SESSION_ID:-}}"
16+
FLAG_FILE="/tmp/claude-tests-confirmed${SESSION_ID:+-$SESSION_ID}"
1617

1718
ERRORS=""
1819

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# GitNexus — Code Intelligence
44

5-
This project is indexed by GitNexus as **tail-claude-gui** (1590 symbols, 3810 relationships, 132 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
5+
This project is indexed by GitNexus as **tail-claude-gui** (1589 symbols, 3812 relationships, 132 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
66

77
> If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first.
88

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ npx oxfmt && npx oxlint && npx tsc --noEmit && npx vitest run && cargo fmt --man
3838

3939
# GitNexus — Code Intelligence
4040

41-
This project is indexed by GitNexus as **tail-claude-gui** (1590 symbols, 3810 relationships, 132 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
41+
This project is indexed by GitNexus as **tail-claude-gui** (1589 symbols, 3812 relationships, 132 execution flows). Use the GitNexus MCP tools to understand code, assess impact, and navigate safely.
4242

4343
> If any GitNexus tool warns the index is stale, run `npx gitnexus analyze` in terminal first.
4444

0 commit comments

Comments
 (0)