TOKYO - Japan's ruling parties agreed Tuesday to cooperate in all constituencies except those in Tokyo for the next general election, brushing aside concerns that they may end their decades-long alliance amid increased friction over the fielding of candidates.