Boeing Co. didn’t share information about a problem with a cockpit safety alert for about a year before the issue drew attention with the October crash of a 737 MAX jet in Indonesia, and then gave some airlines and pilots partial and inconsistent explanations, according to industry and government officials.

It was only after a second MAX accident in Ethiopia nearly five months later, these officials said, that Boeing became more forthcoming with airlines about the problem. And the company didn’t publicly disclose the software...