I'm not sure I understand the question. There are very few people in Israeli prisons since before 1990 ("before Hamas was a thing").
Israel was close to reach an agreement with the gevernment of the Palestinian Authority in 2008. But then Netanyahu came. Now both sides are more in blame-game mode.