codeflash-agent/plugin/hooks/session-end.sh
Kevin Turcios 3b59d97647 squash
2026-04-13 14:12:17 -05:00

13 lines
428 B
Bash
Executable file

#!/usr/bin/env bash
# Plugin SessionEnd hook: Clean up symlink in target repo if in dogfood mode.
# The symlink redirects .codeflash/ to the agent repo — remove it when done
# so the target repo stays clean.
cd "$CLAUDE_PROJECT_DIR" 2>/dev/null || exit 0
# Only clean up if .codeflash is a symlink (dogfood mode created it)
if [ -L "$CLAUDE_PROJECT_DIR/.codeflash" ]; then
rm "$CLAUDE_PROJECT_DIR/.codeflash"
fi
exit 0