mirror of
https://github.com/affaan-m/everything-claude-code.git
synced 2026-04-08 18:33:28 +08:00
fix: sync .cursor observe.sh and fix suggest-compact.sh session tracking
- Sync .cursor/observe.sh with corrected main version (use stdin pipe instead of broken heredoc json.loads pattern) - Fix suggest-compact.sh to use CLAUDE_SESSION_ID instead of $$ which gives a new PID per invocation, preventing counter from incrementing
This commit is contained in:
@@ -28,7 +28,9 @@
|
||||
# - Plan has been finalized
|
||||
|
||||
# Track tool call count (increment in a temp file)
|
||||
COUNTER_FILE="/tmp/claude-tool-count-$$"
|
||||
# Use CLAUDE_SESSION_ID for session-specific counter (not $$ which changes per invocation)
|
||||
SESSION_ID="${CLAUDE_SESSION_ID:-${PPID:-default}}"
|
||||
COUNTER_FILE="/tmp/claude-tool-count-${SESSION_ID}"
|
||||
THRESHOLD=${COMPACT_THRESHOLD:-50}
|
||||
|
||||
# Initialize or increment counter
|
||||
|
||||
Reference in New Issue
Block a user