The US military has been asked to get ready to house up to 20,000 immigrant children, officials say, as President Donald Trump's efforts to roll back a widely condemned policy of separating children from their parents is beset by confusion.

While no decision has been made, the Department of Health and Human Services (HHS) has already assessed three military bases in Texas and will review another in Arkansas, Pentagon spokeswoman Dana White said on Thursday.

She said HHS had asked the Pentagon "to determine its capabilities to provide up to 20,000 temporary beds for unaccompanied alien children" at military installations.

White did not give further details and it was not clear how many of the children who could be sent to the bases are already being detained at other facilities.

Trump and his administration have faced fierce criticism in recent weeks for separating more than 2,300 children from their families in order to prosecute their parents for crossing the border illegally.

Video footage of children sitting in cages and an audiotape of wailing children sparked worldwide anger.

Trump backed down on Wednesday, signing an executive order to keep families together in detention during immigration proceedings.

But late on Thursday it remained unclear late how and when those children would be reunited with their parents, and where families would be held while the parents face criminal charges.

It was also not clear if the government would keep prosecuting cases against people caught crossing the border illegally.

While prosecutors said they were not dismissing any cases, some hearings on Thursday did not proceed as scheduled. In McAllen, Texas, 17 immigrants were told by their public defenders that their cases were not proceeding for now.

First lady Melania Trump on Thursday flew to Texas to visit children displaced by the immigration crisis.

But the hooded, olive-green jacket she wore as she boarded the plane for Texas - daubed with the words "I REALLY DON'T CARE, DO U?" on the back - appeared to undercut the message of compassion.

The White House responded to criticism by saying there was no hidden message. "It's a jacket," said Stephanie Grisham, Melania Trump's spokeswoman. "After today's important visit to Texas, I hope the media isn't going to choose to focus on her wardrobe."

The president said, however, the message was directed at news organizations, which he dubbed the "Fake News Media."

The administration also has sought a permanent legislative fix on the issue, but the US House of Representatives on Thursday rejected a bill favoured by conservatives that would have halted the practice of splitting up families and addressed a range of other immigration issues.

The bill was defeated in a 231-193 vote, with 41 Republicans joining the opposition. The House also postponed, likely until next week, a vote on a more moderate bill in order to try to drum up more support.

Both bills have received backing from Trump but are opposed by Democrats and immigration advocacy groups. They would fund the wall Trump has proposed along the border with Mexico and reduce legal migration.