The head of Israel's military resigned on Tuesday, taking responsibility for its "failure" to stop Hamas's October 7 attack, days after a fragile truce took effect following 15 months of war in the Gaza Strip.