That's what zsh's INC_APPEND_HISTORY (mentioned in TFA) avoids. Bash may have an equivalent.