got to use the **pipe** option `-p, --sox-pipe` otherwise the first command is not passing anything to `stdout` and the second command only gets one file for mixing:
sox FAIL sox: Not enough input filenames specified
Using a pipe with the `-p` option does the job:
sox one-bar.flac -p repeat 4 | sox - -m four-bars.wav output.flac