Preserve in-app browser login state when the same remote service is forwarded to a new local port
What variant of Codex are you using?
Codex App on Windows, using the built-in browser with a remote development environment.
What feature would you like to see?
Please preserve or safely reuse the built-in browser's authentication state when the same web application on the same remote server is exposed through a different local forwarded port.
A typical workflow is:
- Run an authenticated web application on a remote development server.
- Codex forwards the remote port to a local URL such as
http://localhost:49152. - Sign in to the application in the Codex built-in browser.
- Restart or reconnect the remote session.
- The same remote service is forwarded again, but the assigned local port changes, for example to
http://localhost:52731. - The built-in browser treats the URL as a different site/origin, so the existing authenticated session is unavailable and the user must enter their username and password again.
It would be useful if Codex could recognize that these changing localhost URLs map to the same remote service, based on a stable identity such as the workspace/remote target plus the remote host and port. Codex could then provide a stable proxy origin or otherwise safely preserve the relevant browser session across local port remapping.
Additional information
This is especially painful for services that store authentication data in origin-scoped browser storage, because the local port is part of the origin even though the underlying remote application has not changed.
Any reuse should remain isolated between unrelated remote services, workspaces, and users. An explicit per-service opt-in would also be reasonable if automatic reuse creates security concerns.