Elon Musk appeared in a Manhattan courtroom on Thursday to listen as his lawyers defended him against claims that he had violated a September deal with the Securities and Exchange Commission. The SEC told Judge Alison Nathan that Musk violated the deal by publishing a February tweet stating that Tesla would produce "around 500k" vehicles in 2019—without getting the tweet pre-approved by a Tesla attorney.

Musk's lawyers disagreed, arguing that his September deal gave him discretion to decide which tweets needed legal review. The settlement requires Musk to seek legal review for tweets that "contain or may reasonably contain" information that's "material"—i.e., significant for people trading Tesla's stock. But Musk's lawyers argue that the 500k figure is consistent with Tesla's past guidance (the SEC disputes this) and therefore wasn't new information that needed fresh legal approval.

People who came to the courthouse hoping to see Musk smacked down—or vindicated—by Judge Nathan left disappointed. Rather than ruling directly on the SEC's contempt motion, she ordered the parties to go back to the bargaining table and draw up a new, more-specific agreement governing Musk's use of social media.

Judge Nathan seemed frustrated by the entire situation, stating that she had "serious concerns that, whatever I decide here, the issue will not be finally resolved."

Complying with court orders was "not optional" and "not a game," the judge said. "I don't care if you are a small potato or a big fish."

One of the most significant lessons of the hearing was something that didn't come up: stripping Musk of his job as Tesla's CEO. Securities law gives the SEC the option to ask for a defendant to be barred from serving as an officer of a public company. In recent weeks, there has been some speculation that the SEC might seek to ban Musk from running Tesla as a punishment for his behavior on Twitter.

But that possibility did not come up during Thursday's hearing. When asked what punishments Musk should face, the SEC's lawyer said the agency would like to hit Musk with larger fines but did not ask for Musk to lose his job as Tesla's CEO. The SEC also asked the judge to force Musk to check in regularly with the SEC to prove his compliance with the terms of his deal with the agency.

The judge gave the parties two weeks to negotiate and come up with a revised agreement.

On his way out the door, Musk told reporters that he was "impressed" with Judge Nathan's analysis.