Thats it. Each LLM prompt starts a regular process that reads stdin and writes stdout, with no terminal magics. The actually executed commands appear literally in zsh_history, just like other shell commands. This allows a seamless switch between normal shell work and agentic work, with mixed history that uses regular scrollback buffer.
I also experimented with a minimum agent design, where only a single bash tool is provided. Special commands are provided for reliable file editing and multi-modal input. So far it worked well for me, as a day to day command line helper.