From b0da21ba5187149c5456aaeabb536df312bd0f8a Mon Sep 17 00:00:00 2001 From: Lex Christopherson Date: Fri, 16 Jan 2026 13:33:51 -0600 Subject: [PATCH] fix(hooks): remove stale STATE.md from notify hook STATE.md reflects project state, not session state. It persists across sessions and shows misleading info like "Phase complete" from previous work. Now only uses session-scoped todo list. Co-Authored-By: Claude Opus 4.5 --- hooks/gsd-notify.sh | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/hooks/gsd-notify.sh b/hooks/gsd-notify.sh index 9e6d1fead..e5edce3da 100755 --- a/hooks/gsd-notify.sh +++ b/hooks/gsd-notify.sh @@ -13,19 +13,9 @@ if [[ -n "$cwd" ]]; then project=$(basename "$cwd") fi -# Try to get context from GSD state file +# Check todo list for current/completed task message="" -state_file="$cwd/.planning/STATE.md" -if [[ -f "$state_file" ]]; then - phase=$(grep -m1 "^Phase:" "$state_file" 2>/dev/null | sed 's/^Phase: *//') - status=$(grep -m1 "^Status:" "$state_file" 2>/dev/null | sed 's/^Status: *//') - if [[ -n "$phase" && -n "$status" ]]; then - message="Phase $phase: $status" - fi -fi - -# Fallback: check todo list for current/completed task -if [[ -z "$message" && -n "$session_id" ]]; then +if [[ -n "$session_id" ]]; then todo_file=$(ls -t "$HOME/.claude/todos/${session_id}"*.json 2>/dev/null | head -1) if [[ -f "$todo_file" ]]; then # Get most recently completed task, or in-progress task