Course correction circuitry translates feature detection into behavioral action