I use a REPL in tmux. That lets Claude code read/write to it easily, as well as letting me take manual control to investigate.