Apparently this behavior occurs when piping gdb to a file with tee. I had not noticed it initially because I was calling gdb from a script, obfuscating the pipe to tee. Thanks to @Andrew and @Barmar for helping me sort this out.
tee