The reason we have chosen to ALWAYS use a Selenium Server--whether local or remote--is to resolve the very issues asked of the original poster. First and foremost, to be able to keep sessions open and alive and be able to connect to them from different Selenium test and debugging processes. At times, particular during test development and debugging, we can have 2 different processes open and talking to the the Selenium Server sessions at the same time (not literally, but logically).
In most cases, our testers don't want to use the production Grid environment for test development and debugging. They use their own private "pool" of real and virtual machines that they control (and limit) access to for web and/or mobile testing.
In addition, our test framework adds significant features for automated testing that go beyond what Selenium provides alone. A single test scenario may require use of Selenium, SeBuilder/Interpreter Scripts, Java AWT Robot, AutoIt,
Image-Based Testing (IBT), and other automation tools due to the complex or hybrid nature of some of the applications being tested. These are expected to work whether testing local, or remote.
And much of this is handled behind-the-scenes in a manner the tester does not have to know about or write code for.
So, for this type of general-purpose full-featured solution to automated testing, the Selenium portion of the solution dictates we use a Selenium Server--whether it be local or remote--with our own custom RemoteDriver to provide the full featureset requested of our users and their automated testing requirements.
The original poster's question is exactly the type of scenario we needed to achieve for our users. Allow some code to drive the app to some state. Exit the code but DO NOT end the browser session. Manipulate, investigate, and analyze the still running browser session. Write some new test code or snippets and try it out on that still running browser session. Try some more. Try some Java AWT Robot, IBT or AutoIt, or TestComplete if that is necessary. Try some more. All in the same test and development debugging session until something can be made to work robustly.
Sure, there will be simpler and more straight-forward ways to use Selenium in a Selenium-only solution for "simple" web applications. But I think we can see by the various types of posts across the web that there are a great many "web applications" that are not simple, and cannot use a Selenium-only solution. This is the type of framework our SAFSDEV developers have been providing our testers for almost 2 decades. And using a Selenium Server in this way seems to be the best way to allow our users to take advantage of Selenium WebDriver capabilities without giving up access to all the other tools they have needed over the years and still use alongside Selenium.
Carl Nagle