Political parties agree to revive military courts