Feature: Isolate browser sessions per task or project
Problem
The in-app browser appears to share cookies and other website session data across Codex tasks. This prevents parallel tasks from using different accounts on the same service.
Example:
- Task A signs in to
example.comwith Account A. - Task B signs in to the same site with Account B.
- Returning to Task A shows Account B's session.
This is inconvenient and can also cause actions to be performed in the wrong customer, organization, test, or production account.
Requested feature
Add selectable browser-session isolation:
- shared, matching the current behavior
- isolated per project
- isolated per task
An isolated context should have its own cookies, local storage, and authentication state. The selected mode should be visible in the UI.
Expected behavior
Task A can remain signed in as Account A while Task B uses Account B on the same website.
Related issues
- #39552 notes that in-app browser tabs share one persisted storage partition.
- #23314 requests multiple browser tabs, which does not provide cookie isolation.
- #21145 requested external browser profiles; this request is specifically about isolation inside the in-app browser.
Feedback requested
Is this only my workflow, or would others also benefit from per-task or per-project browser sessions? I would especially be interested in use cases involving multiple customers, organizations, environments, or user roles.
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
- #40117
Powered by Codex Action
Thanks for the suggestion. I reviewed #40117, but I believe the use cases are distinct.
#40117 requests temporary private sessions whose state is discarded when closed. This issue requests persistent, isolated browser sessions per task or project so multiple accounts on the same service can remain signed in and be used concurrently.
The underlying browser-context isolation may be related, but the required lifecycle and expected behavior are different.
I’d strongly benefit from persistent, isolated browser profiles per project, covering cookies, local storage, login sessions, and project-specific download folders/history. Within a single project, users should also be able to create, name, switch between, and delete multiple profiles with separate cookie jars—for example, to use different accounts or staging/production environments. Deleting one profile should clear only that profile’s browser data, without disturbing other projects or profiles. The active project and profile should be clearly visible before an agent acts. Please carry this isolation model into Codex Cloud when integrated browser/computer use arrives.
Windows incident: shared website login state interferes with separate agents
Submitting this sanitized incident with the affected user's explicit authorization. This is a concrete operational impact report for the isolation requested here.
Environment
- Windows x64: Microsoft Windows NT 10.0.26340.0.
- Installed Codex Windows package: 26.1111.2228.0.
- Installed primary runtime package: 26.1112.611.0.
- Local Codex chats/agents using the agent-controlled in-app browser.
Package and OS versions were read from Windows during report preparation.
Observed behavior and impact
Independent agents were working on different projects/accounts on the same social service. In one project's OAuth workflow, its agent-owned in-app-browser tab was authenticated as the account intended for another project, rather than the account required for this integration. The OAuth attempt consequently failed with non_sandbox_target.
The owner explicitly confirmed that browser logins are shared between agents and that they had not moved or switched the logins. This should not be attributed to the owner changing accounts.
The agent then incorrectly signed out of that shared website session while trying to repair its own workflow. This demonstrates why separate chats or agent-owned tabs do not provide sufficient containment: one agent's authentication changes can disrupt the other workflow. Shared-browser authentication work has now been stopped, that agent's tab is closed, and the request to sign in again through the shared profile has been cancelled.
The browser inventory exposed a single IAB entry with profileName: null. The advertised controls were visibility and viewport; the exposed toolset offered no create-profile or create-isolated-context operation. Browser/tab IDs and session names are not evidence of independent cookie jars.
Reproduction scenario for maintainers
- In chat/project A, authenticate an IAB tab to account A on a service.
- In independent chat/project B, use IAB for account B on the same service.
- Check the signed-in website identity from both chats.
- Verify whether signing in or signing out in one context changes the other context's identity/session.
This scenario describes the reported failure. We did not conduct a fresh controlled two-account login/logout experiment after the owner confirmed the problem, because doing so would further disturb active sessions. We have not inspected cookie databases or established the internal storage-partition cause.
Expected behavior / requested fix
Provide persistent cookie/storage/authentication isolation per project or agent, with a visible active context and a supported tool/API to select or provision it. Authentication changes in one context must not change another context. If a context is shared, clearly disclose its scope before agents change authentication state.
Please provide a supported recovery/setup path that preserves existing website sign-ins and does not require resetting shared cookies or switching to the user's personal browser.
No credentials, account handles, private project URLs, cookies, raw logs, screenshots, or conversation contents are attached.