Dealing with agent terminal commands that trigger a pager

Lots of terminal commands use pagers. One example is git stash list.
When you have your composer agent run this, it will seemingly get stuck generating but it’s not–it’s waiting for you to press “Q” in the terminal pager.

I use bat on my system and I tried solving this problem like this in my ~/.zshrc:

# Configure bat based on environment
# Enable features only in regular terminal, disable in IDEs/editors/AI tools
if [[ "$TERM_PROGRAM" == "Apple_Terminal" || "$TERM_PROGRAM" == "ghostty" || "$TERM_PROGRAM" == "WarpTerminal" ]]; then
    # Regular terminal - enable all bat features
    export BAT_STYLE="full"
else
    # Disable paging and use plain style in IDEs/editors/AI tools
    echo "Note: bat pager disabled for $TERM_PROGRAM"
    export BAT_PAGER=""
fi

Only… it doesn’t work.

I do see this printed out in the actual terminal inside Cursor…

Note: bat pager disabled for $TERM_PROGRAM

… and I even did this:

so my .zshrc config SHOULD work, right? Like I said, it does not.

Has anyone solved this?