Attorney General Jeff Sessions and Secretary of Homeland Security John Kelly.
"Courthouses should not be used as bait in the necessary enforcement of our country's immigration law," Cantil-Sakauye wrote.
Trump has vowed to increase deportations and has widened the net of illegal immigrants prioritized for detention and removal.
"We will review the letter and have no further comment at this time," Peter Carr, a spokesman for the U.S. Department of Justice, said in an email.
Immigrant rights groups say federal agents have entered courthouses with increased frequency this year, including in California, Massachusetts, Maryland and Texas, said National Immigration Law Center staff attorney Melissa Keaney.
"It's definitely an issue we're seeing a tremendous increase in under the new administration," Keaney said by phone on Thursday.
Reuters could not independently confirm whether there has been an uptick in arrests at courthouses.Read more at Reuters