My understanding is that the SQLite shell will attempt to detect whether it should be in batch mode or interactive mode. If stdin is attached to a tty, it defaults to interactive. If stdin is not attached to a tty, it is batch. The heuristic may not be perfect, so the command line options exist to override the default. This does not change the default "if you issue a command line query, it will exit when complete". This is why someone suggested adding a ".interactive" command to your copy of the shell (along with a diff to show what would need to be done) so that perhaps you could issue .interactive in your script to transition back from batch to interactive mode.