Thanks for sharing the full env output. No proxy variables are present, so that hypothesis is ruled out.
Before the bisection: can you run this first?
type agent
If it shows a shell function or alias (rather than just a file path), that’s likely the cause – the function could be injecting variables that env doesn’t show but the CLI receives at runtime.
If type agent shows a plain file path, move to bisection:
Step 1 – test if it’s the PATH:
env -i HOME="$HOME" PATH="$PATH" TERM="$TERM" agent
This uses your full PATH but strips everything else.
Step 2 (if step 1 works) – test the suspicious group:
env -i HOME="$HOME" PATH="$PATH" TERM="$TERM" CI=true SSH_AUTH_SOCK="$SSH_AUTH_SOCK" NVM_DIR="$NVM_DIR" NVM_BIN="$NVM_BIN" agent
Step 3 (if step 2 works) – test the rest:
env -i HOME="$HOME" PATH="$PATH" TERM="$TERM" SHELL="$SHELL" LANG="$LANG" COLORTERM="$COLORTERM" JAVA_HOME="$JAVA_HOME" HOMEBREW_PREFIX="$HOMEBREW_PREFIX" XDG_DATA_DIRS="$XDG_DATA_DIRS" agent
Whichever step first reproduces the hang contains the offending variable. Let me know which step hangs and we’ll isolate it from there.
Also: CI=true in your env is unusual for an interactive shell. Where does it come from? (It shouldn’t cause the hang here, but it can affect other tools.)