Ctrl+G in the Claude Code prompt hands the prompt to an external editor.
This makes that editor a fresh frame in the GUI Emacs already running,
raised above other windows, with focus returned to the terminal afterwards.
The shell's $EDITOR is left alone.
Three pieces: Emacs serves, a wrapper script connects, Claude Code is pointed at the wrapper.