I-400 and I-402 are personal guards and attendants of the supreme flagship Yamato in the manga while in the anime their purpose here was entirely different. Instead of being supreme flagship's eyes and ears, these two submarines are actually autonomous unit with high-enough standing within the Fleet of Fog to be able to freely replace Kongou as the flagships of the First Oriental fleet .
I-400 is a "Fleet of Fog" reincarnation a of Sen-toku class WWII Japanese submarine, upgraded with "Fog" technology. I-400 is almost identical to I-401 in her hull's appearance in manga, but has pinkish color scheme instead of a blue one in anime.
I-402 is a "Fleet of Fog" reincarnation a of Sen-toku class WWII Japanese submarine, upgraded with "Fog" technology. In manga, I-402's hull is almost identical in appearance to that of I-401, but in anime it has a different color scheme: teal instead of blue.
As surveliance submarines,They have comparably small arsenals inboard: 8 frontal torpedo tubes and some Photon cannons for active anti-missile defense system. However, they are equipped with sensors unparalleled by all others save for their sister I-400.
I-400 and I-402, are sent to confront Takao who had just deserted the "Fleet of Fog". They managed to track her down in the capital of Northern region, however, they deemed her to no threat to the fleet at the moment and allowed her to live.
After their meeting with Takao, for some time the two sisters were shifted into tracking down the recently-reappeared Admiralty Code, however, this mission was soon aborted. While I-400 was ordered to tail heavy cruiser Maya with Haruna and Kirishima inboard, I-402 remained with Yamato for some time. When Takao was attacked by U-2501, I-402 took it upon herself to guide I-401's active decoy and she also supplied Takao with surveillance data. She also helped I-401 by providing her with Milchkuh's coordinates.
After Takao was sunk, I-402 went ahead and rescued her core and what remained of her Mental Model. She also informed I-401 via quantum communication network that she did pick Takao's core in order to keep her wayward sister away from the potentially dangerous region with unstable spatial anomalies.
After Takao was revived, Yamato made I-402 her warden. As such I-402 had dragged Takao along when she was sent to deliver a message to Assault and Supression vessel Zuikaku. They all disappeared for a time, but most recently I-402 and Takao were seen in Yokosuka city.
Using the experience in communicating with humans that was acquired by various Mental Models - though, still, mostly by I-401 - I-402 is bargaining with local people quite successfully... Or, at least, she is much better at hiding her true nature than Haruna had been.
Along with her sister, I-400, I-402 has a long-term mission that is collecting the information about the Admiralty Code for Yamato.
In the anime they act as unthinking drones loyal to the Admiralty Code, even more than Kongou... to the point that they attack Iona just as she escapes Kongou, detain Kongou due to her hate making her deviate from Admiralty Code, and its revealed that Maya's Mental Model was a fake and was just an observation unit created and maintained by I-400 and I-402 in order to keep an eye on Kongou.