At one point during a closed session Monday with the president, Trump remarked — for a second time — that the Senate should put more "heart" into health care reform, even though he previously supported the bill.

For some, like Apple CEO Tim Cook , the White House's so-called "tech week" offered an opportunity to convey his personal views about health care and immigration .

Behind the scenes, though, those companies and others huddled with senior White House officials on issues like emerging technology and federal procurement, offering potential federal fixes that could open doors to new business opportunities for them. A day later, the chief lobbying groups for Apple, Amazon, Facebook, Google and others paid their own visit to the White House for a meeting focused on the tech industry's tax bills.

In front of the cameras — and seated alongside the president in the White House — the likes of Microsoft CEO Satya Nadella and Amazon chief Jeff Bezos offered rare praise of Trump's tech agenda. Eric Schmidt , the executive chairman of Google's parent company, Alphabet, even seemed to suggest Trump helped foster "a huge explosion of new opportunities" on the horizon.

But those leading executives adopted a far more tactical tone on Monday , as the Trump administration kicked off its effort to modernize the dated functions of the federal government — a long-term campaign that could someday spell big bucks and better regulations even for the Trump-wary tech industry.

For the past seven months, tech giants like Apple , Google and Microsoft have been at war with the White House — fighting President Donald Trump in court over immigration , while blasting him in public for his stance on climate change .

On the campaign trail, Trump pledged to eliminate those protections , but recently, he's seemed open to keeping them. Yet during his exchange with Cook, the president unexpectedly registered fresh desire to pursue comprehensive immigration reform, sources said. Axios first reported some details of the incident.

In response, Cook agreed, according to multiple sources with knowledge of the encounter, then urged Trump to do the same with DACA, a program implemented under President Barack Obama that allows children brought to the U.S. illegally to stay in the country.

Cook and others found themselves in Washington, D.C., for the inaugural meeting of the American Technology Council, an effort chartered by Trump in May to upgrade the dated guts of the U.S. government. Building on work that began under Obama, the Trump White House believes federal agencies should behave more like the private sector, not just in the way they buy and use technology but in the services they offer citizens who need to interact with Washington.

For the nation's tech heavyweights, however, those reforms aren't just the stuff of a modern, digitally minded government — they're also potential business opportunities. And executives like Cook, Schmidt and Bezos had an opportunity to shape the Trump administration's thinking on those issues during an afternoon of closed-door brainstorming sessions.

A session on cloud computing, for example, featured some of the industry's leading players: Keith Block, the chief operating officer and president of Salesforce, as well as the chiefs of Intel and IBM, multiple sources confirmed to Recode. They discussed the ways the U.S. government can cut down on some 6,000 costly data centers in its control and shift those responsibilities to the private sector, a move that could mean a windfall for any tech company that might someday win such contracts.

The Trump administration also focused on federal procurement — and it devoted a brainstorming workshop to the sort of reforms the White House can proffer to make it easier for the U.S. government to buy the most cutting-edge tools on the market.

There, it was the likes of some of Washington's most aggressive tech sellers — like Palantir, which provides its data-sifting tools to U.S. national security agencies — offering their thoughts on ways to lower barriers, sources told Recode. Amazon and Oracle also attended those sessions.

One of Silicon Valley's leading venture capitalists, John Doerr, even brought the leader of one of his portfolio companies — Nuna Health — to the procurement meeting. The firm, run by Jini Kim, compiles and extracts insights from health care data, specifically from Medicaid. And speaking later at a public roundtable with the president, Doerr urged Trump to be the "data liberation administration" — releasing more of the government's stores of data, particularly around health care, for private-sector use.

"If you set the data free," he said, "the entrepreneurs can do the rest."

Cook brought one of his top deputies, Guy "Bud" Tribble, who leads software development at Apple — to sessions on cyber security and cutting-edge digital trends, sources said. Google's Schmidt had been slated to attend those same discussions, according to an early roster obtained by Recode.

At the brainstorming huddle focused on future technologies, in particular, the White House had hoped to discuss ways it can tap tools like machine learning, artificial intelligence and unmanned aerial systems, according to an official memo. Companies like Google aren't just producing key work in AI and drones — they're increasingly looking to shape regulations and find business cases for those tools.

And the Trump administration gathered some of the foremost advocates — and users — of high-skilled immigration for a policy session on Monday. There were the likes of Brad Smith, a top executive at Microsoft, and Steve Mollenkopf, the chief executive of Qualcomm.

One source said there was a recognition among attendees — including Trump's top aides, Kushner and Steven Miller — that they need legislation in order to ensure the highly prized, high-skilled H-1B visa went to coders and engineers and others who actually work in specialized fields, as opposed to outsourcing firms, which the White House recently has tried to target. Tech companies pushed back on calls by Trump administration officials to tie the H-1B visa to higher-wage professions, sources said, and the White House said it planned to draft principles for immigration reforms with the hope that Silicon Valley-aligned organizations might sign onto them.