According to the Bash 4.4 changelog:
There are a few incompatible changes between bash-4.3 and bash-4.4. Bash now retains the exit status only of asynchronous jobs, as opposed to all jobs. This means that it is not possible to use `wait' to retrieve the status of a previously-completed synchronous command.
Bash only adds asynchronous commands to the table of background pids whose status it remembers, to avoid it growing too large during scripts that create and reap large numbers of child processes. This means that `wait' no longer works on synchronous jobs, but $? can be used to get the exit status in those cases.
I've already been bitten by some other breaking changes between 4.3 and 4.4 but I don't know how to write an example which tests this particular change.
What is the difference between a synchronous job versus an asynchronous one in Bash and where did it store a table of pids to be queried by wait?