The exercise off the Horn of Africa is the first under a new code of conduct between the two navies that covers unplanned encounters at sea. The code was ratified in April. It’s seen as an encouraging sign the two sides want to minimize chances for misunderstanding.