Tropical ectotherms are thought to be especially vulnerable to climate change because they are thermal specialists, having evolved in aseasonal thermal environments.However, even within the tropics, habitat structure can influence opportunities for behavioral thermoregulation. Open (and edge) habitats likely promote more effective thermoregulation due to the high spatial heterogeneity of the thermal landscape, while forests are thermally homogenous and may constrain opportunities for behavioral buffering of environmental temperatures. Nevertheless, the ways in which behavior and physiology interact at local scales to influence the response to climate change are rarely investigated. We examined the thermal ecology and physiology of two lizard species that occupy distinct environments in the tropics. The brown anole lizard (Anolis sagrei) lives along forest edges in The Bahamas, whereas the Panamanian slender anole (Anolis apletophallus) lives under the canopy of mature forests in Panama. We combined detailed estimates of environmental variation, thermoregulatory behavior, and physiology to model the vulnerability of each of these species.Our projections suggest that forest-dwelling slender anoles will experience severely reduced locomotor performance, activity time, and energy budgets as the climate warms over the coming century. Conversely, the forest-edge-dwelling brown anoles may use behavioral compensation in the face of warming, maintaining population viability for many decades. Our results indicate that local habitat variation, through its effects on behavior and physiology, is a major determinant of vulnerability to climate change. When attempting to predict the impacts of climate change on a given population, broad-scale characteristics such as latitude may have limited predictive power.