The shrimp has very poor vision and would be exposed while working at the burrow mouth. It compensates by keeping at least one long antenna in contact with the goby's body whenever it is outside. The goby has good eyesight and remains at the entrance scanning for predators.
The warning is mechanical. Distinct tail flicks pass through the antenna, and the shrimp responds by retreating; more urgent signals produce faster withdrawal, and observational work has distinguished several flick patterns associated with different threat levels. The shrimp does the digging and continuous maintenance, since these burrows collapse constantly in soft sediment.
Both partners gain: the goby gets shelter it could not construct, and the shrimp gets sentry service it could not perform. Pairings are species-specific to a degree, with particular goby species associating preferentially with particular Alpheus shrimp, but the rules governing which partners pair are only partly worked out, and some combinations form readily in aquaria that are not recorded together in the field.

