EnCompass: Enhancing Agent Programming with Search Over Program Execution Paths