New York (CNN Business) Elon Musk is a visionary and enjoys a cult following among many of Tesla's customers. But he is a loose cannon as a CEO of a company with public investors.

Now he is once again battling the Securities and Exchange Commission, which could seek to strip him of his position at Tesla.

Tesla TSLA The SEC on Monday asked a federal court to find Musk in contempt for violating a settlement agreement reached in October. Musk tweeted last week that Tesla would build 500,000 cars this year. That was incorrect:has said it would only produce about 400,000 cars during the year. Musk had not received Tesla's approval to send his tweet. That violates the agreement, according to the SEC.

Meant to say annualized production rate at end of 2019 probably around 500k, ie 10k cars/week. Deliveries for year still estimated to be about 400k. — Elon Musk (@elonmusk) February 20, 2019

The regulator didn't specify what penalties it will seek if he is found in contempt, but it had previously sought to remove Musk as CEO. Last year, Musk falsely tweeted that he had secured funding to take the company private. In the October settlement, the SEC allowed Musk to keep his CEO job, but he agreed to give up his board chairman position. He also needed to get pre-approval from Tesla's laywers of social media posts about company information that is "material" to investors.

The decision on whether to remove Musk as CEO doesn't rest with the SEC; it would be up to a judge. Or Tesla's board could decide to pull the plug on Musk, if it decides it has had enough.

Read More