Repository navigation
Cannot use multiple terminal sessions #37552
Description
What version of Codex CLI is running?
codex-cli 0.147.0
What subscription do you have?
Pro
Which model were you using?
gpt-5.6-sol-max
What platform is your computer?
Linux 7.0.0-29-generic x86_64 unknown
What terminal emulator and version are you using (if applicable)?
multiple
Codex doctor report
{
"schemaVersion": 1,
"generatedAt": "1786173429s since unix epoch",
"overallStatus": "ok",
"codexVersion": "0.147.0",
"checks": {
"app_server.status": {
"id": "app_server.status",
"category": "app-server",
"status": "ok",
"summary": "background server is running",
"details": {
"app-server version": "0.147.0",
"control socket": "/--/.codex/app-server-control/app-server-control.sock",
"daemon state dir": "/--/.codex/app-server-daemon",
"mode": "ephemeral",
"pid file": "/--/.codex/app-server-daemon/app-server.pid (missing)",
"settings": "/--/.codex/app-server-daemon/settings.json (missing)",
"status": "running",
"update-loop pid file": "/--/.codex/app-server-daemon/app-server-updater.pid (missing)"
},
"remediation": null,
"durationMs": 168
},
"auth.credentials": {
"id": "auth.credentials",
"category": "auth",
"status": "ok",
"summary": "auth is configured",
"details": {
"auth file": "/--/.codex/auth.json",
"auth storage mode": "File",
"stored API key": "false",
"stored ChatGPT tokens": "true",
"stored agent identity": "false",
"stored auth mode": "chatgpt"
},
"remediation": null,
"durationMs": 0
},
"config.load": {
"id": "config.load",
"category": "config",
"status": "ok",
"summary": "config loaded",
"details": {
"CODEX_HOME": "/--/.codex",
"config.toml": "/--/.codex/config.toml",
"config.toml parse": "ok",
"cwd": "/--",
"enabled feature flags": "shell_tool, view_image, unified_exec, shell_snapshot, code_mode_host, terminal_resize_reflow, sqlite, hooks, enable_request_compression, multi_agent, apps, tool_search_always_defer_mcp_tools, tool_suggest, plugins, in_app_browser, in_app_updates, browser_use, browser_use_full_cdp_access, browser_use_external, computer_use, remote_plugin, plugin_sharing, image_generation, resize_all_images, item_ids, skill_mcp_dependency_install, skill_search, mentions_v2, steer, guardian_approval, goals, collaboration_modes, tool_call_mcp_elicitation, auth_elicitation, personality, fast_mode, tui_app_server, remote_compaction_v2, workspace_dependencies",
"feature flag overrides": "none",
"feature flags enabled": "39",
"log dir": "/--/.codex/log",
"mcp servers": "0",
"model": "gpt-5.3-codex-spark",
"model provider": "openai",
"sqlite home": "/--/.codex"
},
"remediation": null,
"durationMs": 0
},
"git.environment": {
"id": "git.environment",
"category": "git",
"status": "ok",
"summary": "git version 2.53.0",
"details": {
".git entry": "directory",
"PATH git #1": "/usr/bin/git",
"PATH git #2": "/bin/git",
"PATH git entries": "2",
"git build options": "git version 2.53.0; cpu: x86_64; no commit associated with this build; sizeof-long: 8; sizeof-size_t: 8; shell-path: /bin/sh; rust: disabled; gettext: enabled; libcurl: 8.18.0; zlib: 1.3.1; SHA-1: SHA1_DC; SHA-256: SHA256_BLK; default-ref-format: files; default-hash: sha1",
"git exec path": "/usr/lib/git-core",
"git version": "git version 2.53.0",
"repo detected": "true",
"repo --": "/--",
"selected git": "/usr/bin/git"
},
"remediation": null,
"durationMs": 103
},
"installation": {
"id": "installation",
"category": "install",
"status": "ok",
"summary": "installation looks consistent",
"details": {
"PATH codex #1": "/--/.nvm/versions/node/v24.16.0/bin/codex",
"current executable": "/--/.nvm/versions/node/v24.16.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin/codex",
"install context": "npm (package /--/.nvm/versions/node/v24.16.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl, bin /--/.nvm/versions/node/v24.16.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin, resources /--/.nvm/versions/node/v24.16.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-resources, path /--/.nvm/versions/node/v24.16.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-path)",
"managed by bun": "false",
"managed by npm": "true",
"managed by pnpm": "false",
"managed package --": "/--/.nvm/versions/node/v24.16.0/lib/node_modules/@openai/codex",
"npm update target": "/--/.nvm/versions/node/v24.16.0/lib/node_modules/@openai/codex"
},
"remediation": null,
"durationMs": 178
},
"mcp.config": {
"id": "mcp.config",
"category": "mcp",
"status": "ok",
"summary": "no MCP servers configured",
"details": {},
"remediation": null,
"durationMs": 0
},
"network.env": {
"id": "network.env",
"category": "network",
"status": "ok",
"summary": "network-related environment looks readable",
"details": {
"proxy env vars": "none"
},
"remediation": null,
"durationMs": 0
},
"network.provider_reachability": {
"id": "network.provider_reachability",
"category": "reachability",
"status": "ok",
"summary": "active provider endpoints are reachable over HTTP",
"details": {
"ChatGPT base URL": "https://chatgpt.com/backend-api/ reachable (HTTP 403)",
"reachability mode": "ChatGPT auth"
},
"remediation": null,
"durationMs": 141
},
"network.websocket_reachability": {
"id": "network.websocket_reachability",
"category": "websocket",
"status": "ok",
"summary": "Responses WebSocket handshake succeeded",
"details": {
"DNS": "2 IPv4, 2 IPv6, first IPv6",
"auth mode": "chatgpt",
"connect timeout": "15000 ms",
"endpoint": "wss://chatgpt.com/backend-api/<redacted>",
"handshake result": "HTTP 101 Switching Protocols",
"model provider": "openai",
"models etag present": "true",
"provider name": "OpenAI",
"proxy env vars": "none",
"reasoning header": "false",
"server model present": "false",
"supports websockets": "true",
"wire API": "responses"
},
"remediation": null,
"durationMs": 562
},
"runtime.provenance": {
"id": "runtime.provenance",
"category": "runtime",
"status": "ok",
"summary": "running npm on linux-x86_64",
"details": {
"commit": "unknown",
"current executable": "/--/.nvm/versions/node/v24.16.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin/codex",
"install method": "npm (package /--/.nvm/versions/node/v24.16.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl, bin /--/.nvm/versions/node/v24.16.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin, resources /--/.nvm/versions/node/v24.16.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-resources, path /--/.nvm/versions/node/v24.16.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-path)",
"platform": "linux-x86_64",
"version": "0.147.0"
},
"remediation": null,
"durationMs": 0
},
"runtime.search": {
"id": "runtime.search",
"category": "search",
"status": "ok",
"summary": "search is OK (bundled)",
"details": {
"search command": "/--/.nvm/versions/node/v24.16.0/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-path/rg",
"search command readiness": "file exists",
"search provider": "bundled"
},
"remediation": null,
"durationMs": 0
},
"sandbox.helpers": {
"id": "sandbox.helpers",
"category": "sandbox",
"status": "ok",
"summary": "sandbox configuration is readable",
"details": {
"approval policy": "OnRequest",
"codex-linux-sandbox helper": "/--/.codex/tmp/arg0/codex-arg0hl2deM/codex-linux-sandbox",
"execve wrapper helper": "/--/.codex/tmp/arg0/codex-arg0hl2deM/codex-execve-wrapper",
"filesystem sandbox": "restricted",
"network sandbox": "restricted"
},
"remediation": null,
"durationMs": 0
},
"state.paths": {
"id": "state.paths",
"category": "state",
"status": "ok",
"summary": "state paths and databases are inspectable",
"details": {
"CODEX_HOME": "/--/.codex (dir)",
"active rollout files": "329 files, 3302742416 total bytes, 10038730 average bytes",
"archived rollout files": "0 files, 0 total bytes, 0 average bytes",
"goals DB": "/--/.codex/goals_1.sqlite (file)",
"goals DB integrity": "ok",
"log DB": "/--/.codex/logs_2.sqlite (file)",
"log DB integrity": "ok",
"log dir": "/--/.codex/log (dir)",
"memories DB": "/--/.codex/memories_1.sqlite (file)",
"memories DB integrity": "ok",
"queue DB": "/--/.codex/queue_1.sqlite (file)",
"queue DB integrity": "ok",
"sqlite home": "/--/.codex (dir)",
"state DB": "/--/.codex/state_5.sqlite (file)",
"state DB integrity": "ok",
"thread history DB": "/--/.codex/thread_history_1.sqlite (missing)",
"thread history DB integrity": "skipped (missing)"
},
"remediation": null,
"durationMs": 995
},
"state.rollout_db_parity": {
"id": "state.rollout_db_parity",
"category": "threads",
"status": "ok",
"summary": "rollout files and state DB thread inventory agree",
"details": {
"default model provider": "openai",
"rollout DB active files": "329",
"rollout DB active rows": "329",
"rollout DB archive mismatches": "0",
"rollout DB archived files": "0",
"rollout DB archived rows": "0",
"rollout DB duplicate DB paths": "0",
"rollout DB duplicate rollout thread ids": "0",
"rollout DB malformed file names": "0",
"rollout DB missing active rows": "0",
"rollout DB missing archived rows": "0",
"rollout DB model providers": "openai=329",
"rollout DB rows": "329",
"rollout DB scan cap reached": "false",
"rollout DB scan errors": "0",
"rollout DB sources": "subagent:thread_spawn=202, cli=112, vscode=15",
"rollout DB stale rows": "0"
},
"remediation": null,
"durationMs": 412
},
"system.environment": {
"id": "system.environment",
"category": "system",
"status": "ok",
"summary": "OS language en-US",
"details": {
"EDITOR": "not set",
"LANG": "en_US.UTF-8",
"VISUAL": "not set",
"os": "Ubuntu 26.4.0 (resolute) [64-bit]",
"os language": "en-US",
"os type": "Ubuntu",
"os version": "26.4.0"
},
"remediation": null,
"durationMs": 32
},
"terminal.env": {
"id": "terminal.env",
"category": "terminal",
"status": "ok",
"summary": "terminal metadata was detected",
"details": {
"SSH_CLIENT": "present",
"SSH_CONNECTION": "present",
"SSH_TTY": "present",
"TERM": "xterm-256color",
"color output": "enabled",
"effective locale": "en_US.UTF-8",
"stderr is terminal": "true",
"stdin is terminal": "true",
"stdout is terminal": "true",
"terminal": "unknown",
"terminal size": "120x30"
},
"remediation": null,
"durationMs": 0
},
"terminal.title": {
"id": "terminal.title",
"category": "title",
"status": "ok",
"summary": "terminal title default",
"details": {
"terminal title activity": "true",
"terminal title items": "activity, project-name",
"terminal title project source": "git repo --",
"terminal title project value": "--",
"terminal title source": "default"
},
"remediation": null,
"durationMs": 0
},
"updates.status": {
"id": "updates.status",
"category": "updates",
"status": "ok",
"summary": "update configuration is locally consistent",
"details": {
"cached latest version": "0.147.0",
"check for update on startup": "true",
"last checked at": "2026-08-08T04:31:35.178749144Z",
"latest version": "0.147.0",
"latest version status": "current version is not older",
"npm update target": "/--/.nvm/versions/node/v24.16.0/lib/node_modules/@openai/codex",
"update action": "npm install -g @openai/codex",
"version cache": "/--/.codex/version.json"
},
"remediation": null,
"durationMs": 510
}
}
}What issue are you seeing?
(After updating to 0.147) i cannot run multiple sessions at the same time on multiple devices anymore:
Error: Failed to resume session from /--/.codex/sessions/2026/08/03/rollout-2026-08-03T15-11-29-019fc7c0-3225-7923-8042-690f08f31c92.jsonl: thread/resume failed during TUI bootstrap: thread/resume failed: thread 019fc7c0-3225-7923-8042-690f08f31c92 already has an active writer (code -32600)
Even the mobile and desktop apps cannot resume into Remote:
This task is active elsewhere. Close it there and try again here.
What steps can reproduce the bug?
Open a cli task (i always use --yolo here) and resume into the same task on other devices. In der Vergangenheit hat es immer reibungslos funktioniert. Now I can only start a single session at the moment in the same chat and also no longer connect the apps remotely (where I can sometimes only read the text summaries instead of seeing a lot of code in the CLI).
What is the expected behavior?
I can use a CLI chat on any number of devices at the same time (I usually have some computers and some mobile devices on, so I never lose the connection and the agent can work continuously)
Additional information
I am running 5.6 Sol Max in --yolo mode on Linux (Ubuntu 26.04), using terminal sessions and/or the ChatGPT/Codex-App on MacOS (26.5.2), Windows (11), iPhone (26.5.2) and terminal session on Android Phone (Android 16).
Activity
shaoyuyoung commentedon Aug 9, 2026
The same issue here. It seems related to #36389. We shouldn't revert it completely bc it implements a reasonable mechanism but we can change it throuth a small patch.
will investigate further
bendietze commentedon Aug 9, 2026
@shaoyuyoung I don't know why, but since now it works again, I'm on 3 devices in the same session. Obviously you patched it internally, because I didn't run an update.
Thanks so much 💯
marioaltvater commentedon Aug 10, 2026
Still happening here on 0.147.0. The task is not actually running: its latest turn is complete, but
codex app-server --remote-controlkeeps the task history open after I close the mobile app. Desktop then shows “This task is active elsewhere,” and Retry hitsalready has an active writeragain.bendietze commentedon Aug 10, 2026
Fortunately, after a problematic day, it works completely again for me, all night long and also this morning. I didn't perform any updates, I didn't restart my server or devices or anything like that, and I didn't install a CLI update yesterday.
But this feature is a must for me, so I hope it works continuously again.
RazeBerry commentedon Aug 11, 2026
Same issue here! Even if there are no active working sessions.
TEKFused commentedon Aug 11, 2026
Same here.... Getting this message in VSCode Codex extension, v26.803.61601. The session is NOT open elsewhere. I restarted my computer and still getting this message after clicking retry multiple times.
whilemouse commentedon Aug 11, 2026
I am also having the same Issue
jandwertmann-ai commentedon Aug 21, 2026
Adding another concrete workflow that is heavily impacted by this change.
I regularly use the same Codex conversation across VS Code on my desktop and the Codex mobile app. My workflow is intentionally fluid: I may start working at my desk, continue from the sofa, then go outside to a park and keep steering the same coding task from my phone, often switching back again later without planning the handoff in advance.
Previously, keeping the same conversation available across devices made this feel seamless. With the current active-writer/session lock, I now get blocked with messages that the conversation is already running elsewhere and have to close one client before I can continue in the other. This creates a lot of friction and breaks the main reason I want mobile access in the first place.
The ideal behavior would be closer to Claude Code Remote Control: one running agent/session, with multiple clients able to attach to it as control surfaces. It would be totally fine if only one client can submit/approve at the exact same instant, but simply having the conversation open on desktop and mobile should not require closing one first. Ownership could be transferred automatically when a user sends a message from another client, or secondary clients could remain attached as followers until they interact.
For me this is a significant workflow regression rather than an edge case. Cross-device continuity is one of the most valuable features of Codex, and I would really appreciate a supported way to move spontaneously between desktop, sofa, and mobile/outside without manually closing and reopening the session every time.
Tiabet commentedon Aug 21, 2026
I reproduced what looks like the same regression with VS Code + iOS Remote Control, and found a version-sensitive workaround.
Environment / observations:
0.146.00.149.0-alpha.4codex_chatgpt_ios_remoteclient version1.2026.188When the VS Code extension was open, the mobile client failed to resume the same thread with:
I verified with
lslocksthat the writer lock was actually held by the Codex binary bundled inside the VS Code extension, e.g.:The iOS app then showed the equivalent UI error that the conversation was open in another app / Codex server returned an error. Closing the VS Code container window released the lock and mobile could open the conversation again.
Most importantly, rolling back the VS Code OpenAI/ChatGPT extension to an earlier version restored the previous behavior: VS Code and mobile could use the same conversation again without the active-writer conflict. Reinstalling the newer extension reproduced the problem.
So this appears to be a regression in the VS Code extension's bundled Codex/thread-writer behavior, rather than SSH, Remote Control enrollment, or the standalone CLI itself. Keeping the older extension version pinned (auto-update off) is currently working as a workaround.
I can provide the exact working extension version if useful.
bendietze commentedon Aug 24, 2026
I have been having problems for a long time now that the iPhone app cannot use the SSH connection at the same time and now since today other terminals are also hanging on other devices again:
Error: Failed to resume session from /.../.codex/sessions/2026/08/23/rollout-2026-08-23T13-50-58-01a02e75-aa4f-7950-94cf-d5f278df38cf.jsonl: thread/resume failed during TUI bootstrap: thread/resume failed: thread 01a02e75-aa4f-7950-94cf-d5f278df38cf already has an active writer (code -32600)bendietze commentedon Aug 24, 2026
I think it's a disaster. I can only use one terminal at the same time again, which restricts and it causes problems if the terminal loses the job, because then the job runs in the background and I have to restart the computer to get the unbound task again. I have not yet been able to test whether it is chat-related and only affects the current chat. If I go cleanly into a new one, I will test directly whether I can then use several terminals in parallel again.
This happens actually in 0.149.1
Edit: A new chat doesn't change anything.
KevinFraga commentedon Sep 2, 2026
I’m seeing the equivalent behavior in the Codex IDE interface: “This is open in another app. Close it there to continue here.” The available “Retry” button does not actually provide a way to recover or transfer control.
A safer UX could allow multiple clients to view the same conversation while keeping only one active writer. The blocked client should offer a clear “Take over / Transfer session here” action that safely disconnects the previous writer after confirmation. “Retry” should either perform that transfer or clearly explain that it only checks whether the previous client has disconnected.
bendietze commentedon Sep 2, 2026
That is not necessary at all; naturally, you can read and write reactively on all clients simultaneously. It is only occasionally disrupted here.
akrohn commentedon Sep 23, 2026
Same here. Super annoying. Had to change workflow. Have to close active session on local computer to continue working by remote function in the ChatGPP app in my iPad. Never had to do that before. In claude /remote-control just works. Please make that happen here too.
Frequency7032 commentedon Oct 5, 2026
Corroborating a macOS desktop workflow involving a remote conversation on 5 October 2026. The UI shows exactly:
“This is open in another app”
“Close it there to continue here.”
The available actions are Retry and Fork chat. The banner does not identify which other client holds the conversation. Please provide an actionable way to identify the owner and safely resume the existing conversation.
We have not verified whether another client actually holds the session or whether this has the same cause as the reports above. The app version has not yet been collected. This observation does not establish a connection with the separate placement-format read errors in #50077. Account details, task identifiers and conversation contents are omitted.
aliwatters commentedon Oct 7, 2026
This is a deciding feature for me. I start in the terminal on my Mac in the morning, discuss architecture, then supervise the same session from my phone later. Claude’s
/remote-controlmakes this wonderfully seamless—I can keep both open and switch between them without managing a handoff.With otherwise similar capabilities and pricing, this one feature will keep me using Claude over Codex. Please prioritize support for multiple clients attached to the same running session.
MoDDiB commentedon Oct 10, 2026
I'd like to add a related Codex Remote use case: handoff from an active Codex CLI session on a PC to Codex Remote on a phone.
On Windows 11, when a task is open in Codex CLI, opening the same task in Codex Remote on my phone shows:
If I physically return to my PC and exit Codex CLI, the task immediately becomes available on my phone. That confirms the task itself is accessible; the blocker is that I cannot release the CLI session remotely.
Feature request: When Codex Remote encounters this lock, offer a “Take over session” action that asks the existing CLI client to gracefully release control (ideally waiting for its current operation to finish), preserving task history and workspace state. The same handoff should work in reverse when returning to the PC.
As a further improvement, read-only monitoring from a second client while the CLI retains write control would be useful.
Expected workflow: Start work in Codex CLI at my desk → leave the PC running → open the same task on my phone → take over safely without needing to physically access the computer → return to the CLI later.
This would make Codex Remote much more practical for mobile use.