The microenvironment reprograms circuits in tumor cells