Repository navigation
fix(chatgpt-web): reuse persistent CDP sessions and current app mentions - #15935
Open
ElioBonfim wants to merge 4 commits into
Open
ElioBonfim wants to merge 4 commits into
ElioBonfim wants to merge 4 commits into
Conversation
This was referenced Oct 10, 2026
Owner
|
Hi @ElioBonfim — closing this pull request to clear the open queue. The branch |
Owner
|
Hi @ElioBonfim — reopening this pull request. The close was a mistake, and it is back in the merge queue. The branch |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ChatGPT Web connections using CDP currently create isolated contexts/pages and lose native Codex message IDs during routing sanitation. A logged-in operator browser can therefore fail validation or tool preflight, while repeated attempts accumulate pages. The current ChatGPT composer, model picker, and app-mention markup also differ from the vendored selectors.
This adds an opt-in
CHATGPT_WEB_CODEX_USE_CDP_PROFILE=1mode that leases the existing ChatGPT page, verifies the account/workspace, preserves refreshed session state, and releases ownership without closing the operator's page. It refuses overlapping leases or multiple ChatGPT pages, preserves unrelated operator tabs, clears stale drafts, and resets temporary conversations between turns. The default CDP context/recovery behavior on the current release is retained.Native message IDs are preserved only for ChatGPT Web so environment and permission checks remain enforceable. Current app-mention markup, keyboard highlight (
aria-current), selected app identity, composer, model family, and assistant response markers are supported alongside existing markup. Selection still requires exact identity; no account or permission checks are bypassed.Validation:
The operator guide documents loopback-only CDP, dedicated profiles, one active turn, session recovery, and deployment constraints. Headless behavior depends on ChatGPT security checks; this does not promise permanent login or CAPTCHA avoidance.