You can also do convoluted things like run Claude Code within tmux and send input to it and read the output.
MCP Channels are interesting too for bidirectional communication between your app and a running Claude Code instance, with an MCP server sitting in between. It's slow, but allows for some interesting use cases when you want to step out of an existing CLI session to do work that is easier in a graphical interface, have Claude Code respond and do work, then when you're done, go back to the CLI session and continue, never losing context.