Came across this issue when using the plugin with the claude agent sdk. not sure if it's specific to using fp in that context, but the core problem is that fp agent end would use a new agent name for me.
Problem appears to be that the session-end.sh hook isn't sourcing t he CLAUDE_ENV_FILE to get the FP_AGENT_NAME that was set during session-start.sh. This caused fp agent end to use a different agent identity for session_ended events.
if [ -n "$CLAUDE_ENV_FILE" ] && [ -f "$CLAUDE_ENV_FILE" ]; then
source "$CLAUDE_ENV_FILE"
fi