Create a named FIFO that will "loop" the pipe:
<myfifo program1 | program2 >myfifo
Even if none of the programs prints anything first, you can "inject" data into the FIFO, so it's received by
# from another console
echo start >myfifo
To observe/store the communication, use
tee in the right place(s). Examples:
<myfifo program1 | program2 | tee myfifo
<myfifo program1 | tee /dev/tty ./log1 | program2 | tee ./log2 >myfifo
The whole thing will work in
sh, there's nothing specific to Bash in this solution.
Please read this answer about possible scenarios leading to a deadlock.