> It's not the brace command; it's the pipeline.
>
>> Minimal repro:
>>
>> $ sleep 1 & { wait $!; } | cat
>> [1] 665454
>> bash: wait: pid 665454 is not a child of this shell
Interestingly, this is almost trivial to clairfy:
$ sleep 5 & { wait $!; }
[1] 19069
[1]+ Done sleep 5
$
> I was also misled by the term "subshell" which is not a proper shell
> like a subprocess is just another process.
The criticial point is that "being a subshell" is a relationship between
the child bash process and its parent. Intuitively, a subshell is
created whenever a bash child process is created "implicitly". The
manual page et al. enumerate all the ways a subshell can be created;
search for the word "subshell".
Dale