Support Linux Codex CLI as a ChatGPT Remote Control host

Open 💬 5 comments Opened Aug 12, 2026 by iosmand
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

codex-cli 0.147.0

What subscription do you have?

ChatGPT Pro

Which model were you using?

_No response_

What platform is your computer?

Linux 7.1.6-1-cachyos x86_64 unknown

What terminal emulator and version are you using (if applicable)?

konsole 26.04.3, fish

Codex doctor report

{
  "schemaVersion": 1,
  "generatedAt": "1786509126s 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 not running",
      "details": {
        "control socket": "/home/i0s/.codex/app-server-control/app-server-control.sock",
        "daemon state dir": "/home/i0s/.codex/app-server-daemon",
        "mode": "ephemeral",
        "pid file": "/home/i0s/.codex/app-server-daemon/app-server.pid (missing)",
        "settings": "/home/i0s/.codex/app-server-daemon/settings.json (missing)",
        "status": "not running",
        "update-loop pid file": "/home/i0s/.codex/app-server-daemon/app-server-updater.pid (missing)"
      },
      "remediation": null,
      "durationMs": 0
    },
    "auth.credentials": {
      "id": "auth.credentials",
      "category": "auth",
      "status": "ok",
      "summary": "auth is configured",
      "details": {
        "auth file": "/home/i0s/.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": "/home/i0s/.codex",
        "config.toml": "/home/i0s/.codex/config.toml",
        "config.toml parse": "ok",
        "cwd": "/home/i0s/Documents/projects/agentic-news",
        "enabled feature flags": "shell_tool, view_image, unified_exec, shell_snapshot, code_mode_host, terminal_resize_reflow, sqlite, memories, 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": "memories=true",
        "feature flags enabled": "40",
        "log dir": "/home/i0s/.codex/log",
        "mcp servers": "0",
        "model": "gpt-5.6-terra",
        "model provider": "openai",
        "sqlite home": "/home/i0s/.codex"
      },
      "remediation": null,
      "durationMs": 0
    },
    "git.environment": {
      "id": "git.environment",
      "category": "git",
      "status": "ok",
      "summary": "git version 2.55.0",
      "details": {
        ".git entry": "directory",
        "PATH git #1": "/usr/bin/git",
        "PATH git entries": "1",
        "git branch": "324-normalized-rendition-schema",
        "git build options": "git version 2.55.0; cpu: x86_64; built from commit: e9019fcafe0040228b8631c30f97ae1adb61bcdc; sizeof-long: 8; sizeof-size_t: 8; shell-path: /bin/sh; rust: enabled; feature: fsmonitor--daemon; gettext: enabled; libcurl: 8.21.0; OpenSSL: OpenSSL 3.6.3 9 Jun 2026; zlib-ng: 2.3.3; 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.55.0",
        "repo detected": "true",
        "repo root": "/home/i0s/Documents/projects/agentic-news",
        "selected git": "/usr/bin/git"
      },
      "remediation": null,
      "durationMs": 19
    },
    "installation": {
      "id": "installation",
      "category": "install",
      "status": "ok",
      "summary": "installation looks consistent",
      "details": {
        "PATH codex #1": "/home/i0s/.local/share/npm-global/bin/codex",
        "current executable": "/home/i0s/.local/share/npm-global/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin/codex",
        "install context": "npm (package /home/i0s/.local/share/npm-global/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl, bin /home/i0s/.local/share/npm-global/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin, resources /home/i0s/.local/share/npm-global/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-resources, path /home/i0s/.local/share/npm-global/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 root": "/home/i0s/.local/share/npm-global/lib/node_modules/@openai/codex",
        "npm update target": "/home/i0s/.local/share/npm-global/lib/node_modules/@openai/codex"
      },
      "remediation": null,
      "durationMs": 49
    },
    "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 404)",
        "reachability mode": "ChatGPT auth"
      },
      "remediation": null,
      "durationMs": 129
    },
    "network.websocket_reachability": {
      "id": "network.websocket_reachability",
      "category": "websocket",
      "status": "ok",
      "summary": "Responses WebSocket handshake succeeded",
      "details": {
        "DNS": "2 IPv4, 2 IPv6, first IPv4",
        "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": 671
    },
    "runtime.provenance": {
      "id": "runtime.provenance",
      "category": "runtime",
      "status": "ok",
      "summary": "running npm on linux-x86_64",
      "details": {
        "commit": "unknown",
        "current executable": "/home/i0s/.local/share/npm-global/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin/codex",
        "install method": "npm (package /home/i0s/.local/share/npm-global/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl, bin /home/i0s/.local/share/npm-global/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/bin, resources /home/i0s/.local/share/npm-global/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-x64/vendor/x86_64-unknown-linux-musl/codex-resources, path /home/i0s/.local/share/npm-global/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": "/home/i0s/.local/share/npm-global/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": "/home/i0s/.codex/tmp/arg0/codex-arg0tWNPmm/codex-linux-sandbox",
        "execve wrapper helper": "/home/i0s/.codex/tmp/arg0/codex-arg0tWNPmm/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": "/home/i0s/.codex (dir)",
        "active rollout files": "97 files, 105755398 total bytes, 1090261 average bytes",
        "archived rollout files": "0 files, 0 total bytes, 0 average bytes",
        "goals DB": "/home/i0s/.codex/goals_1.sqlite (file)",
        "goals DB integrity": "ok",
        "log DB": "/home/i0s/.codex/logs_2.sqlite (file)",
        "log DB integrity": "ok",
        "log dir": "/home/i0s/.codex/log (dir)",
        "memories DB": "/home/i0s/.codex/memories_1.sqlite (file)",
        "memories DB integrity": "ok",
        "queue DB": "/home/i0s/.codex/queue_1.sqlite (file)",
        "queue DB integrity": "ok",
        "sqlite home": "/home/i0s/.codex (dir)",
        "state DB": "/home/i0s/.codex/state_5.sqlite (file)",
        "state DB integrity": "ok",
        "thread history DB": "/home/i0s/.codex/thread_history_1.sqlite (file)",
        "thread history DB integrity": "ok"
      },
      "remediation": null,
      "durationMs": 84
    },
    "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": "97",
        "rollout DB active rows": "97",
        "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=97",
        "rollout DB rows": "97",
        "rollout DB scan cap reached": "false",
        "rollout DB scan errors": "0",
        "rollout DB sources": "subagent:thread_spawn=61, cli=14, vscode=13, subagent:other=9",
        "rollout DB stale rows": "0"
      },
      "remediation": null,
      "durationMs": 32
    },
    "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": "CachyOS Linux Rolling Release [64-bit]",
        "os language": "en-US",
        "os type": "CachyOS Linux",
        "os version": "Rolling Release"
      },
      "remediation": null,
      "durationMs": 5
    },
    "terminal.env": {
      "id": "terminal.env",
      "category": "terminal",
      "status": "ok",
      "summary": "terminal metadata was detected",
      "details": {
        "COLORFGBG": "15;0",
        "COLORTERM": "truecolor",
        "DISPLAY": "present",
        "WAYLAND_DISPLAY": "present",
        "color output": "enabled",
        "effective locale": "en_US.UTF-8",
        "stderr is terminal": "true",
        "stdin is terminal": "true",
        "stdout is terminal": "true",
        "terminal": "Konsole",
        "terminal size": "120x35",
        "terminal version": "260403"
      },
      "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 root",
        "terminal title project value": "agentic-news",
        "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-11T10:05:05.870309787Z",
        "latest version": "0.147.0",
        "latest version status": "current version is not older",
        "npm update target": "/home/i0s/.local/share/npm-global/lib/node_modules/@openai/codex",
        "update action": "npm install -g @openai/codex",
        "version cache": "/home/i0s/.codex/version.json"
      },
      "remediation": null,
      "durationMs": 369
    }
  }
}

What issue are you seeing?

Codex CLI works natively on my CachyOS Linux workstation and can access my local repositories, development tools, and authenticated CLIs such as glab. However, I cannot register the Linux Codex CLI host with ChatGPT Remote Control or access that host through the ChatGPT web or mobile interface.

The current Remote workflow requires the ChatGPT desktop application, which is available only for Windows and macOS. Signing in to Codex CLI with the same ChatGPT account does not expose local Linux threads, repositories, approvals, diffs, terminal output, or task progress in ChatGPT.

This creates a significant platform gap: Codex already runs locally on Linux, but Linux users cannot remotely start, continue, monitor, or approve that work through ChatGPT. Using a Windows or macOS computer as a bridge is not a reasonable solution for users whose primary development environment is Linux.

This is especially limiting for workflows involving private GitLab repositories. On my Linux host, Codex can use an already authenticated glab session to read issues, create branches, implement changes, run tests, push commits, and create merge requests. I want to monitor and control that same local workflow securely from ChatGPT on the web or iOS without changing operating systems or introducing another computer.

What steps can reproduce the bug?

Install and authenticate Codex CLI on a Linux system.
Run Codex inside a local Git repository.
Confirm that Codex can access the repository, shell, and locally authenticated development tools.
Sign in to ChatGPT on the web or iOS using the same account.
Attempt to register the Linux Codex CLI installation as a Remote Control host.
Attempt to open, continue, monitor, or approve the local Codex thread from ChatGPT.
Observe that no supported Linux host pairing or registration mechanism is available.
Observe that the local CLI thread and environment cannot be accessed through ChatGPT Remote Control.

This is not dependent on a specific repository, model, prompt, terminal emulator, or Git provider.

What steps can reproduce the bug?

Uploaded thread: 019ff437-e381-7670-b15d-c39fbee03365

What is the expected behavior?

Codex CLI on Linux should be able to operate as an official ChatGPT Remote Control host.

A Linux user should be able to:

Securely pair a local Codex CLI installation with their ChatGPT account.
See eligible local Codex threads and projects in ChatGPT web and mobile.
Start, continue, and monitor tasks running on the Linux host.
Review diffs, test results, terminal output, screenshots, and task progress remotely.
Approve or reject consequential actions remotely.
Preserve the Linux host’s existing filesystem permissions, network sandbox, credentials, and approval policies.
Use provider-neutral Git workflows, including private GitLab repositories and authenticated tools such as glab.
Revoke paired devices and remote access from either the Linux host or ChatGPT account settings.

Ideally, OpenAI should also provide an official ChatGPT Work desktop application for Linux. However, enabling Codex CLI itself to act as a secure Remote host would address the core development workflow without requiring a full Linux GUI application.

Additional information

Linux is a major software-development platform and already has first-class Codex CLI support. The local execution capability therefore exists; the missing component is a supported connection between the Linux Codex host and the ChatGPT Remote interface.

The architecture should not require users to install Windows or macOS, maintain a second computer, or route Linux development through an operating-system bridge.

GitHub should not be a prerequisite either. Remote Control operates at the host, project, shell, and approval layers, so it should remain independent of the repository provider. Existing local Git credentials and tools such as git, glab, or other provider CLIs should continue to work within the host’s permission boundaries.

Related uploaded thread:

019ff437-e381-7670-b15d-c39fbee03365

View original on GitHub ↗

5 Comments

github-actions[bot] contributor · 16 days ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #37897

Powered by Codex Action

inv1sible · 12 days ago

Additional Linux-only use case: I run my coding agents directly on Linux servers and intentionally do not have a Windows or macOS bridge host in that network. Today I work around this by using pi.dev together with my own web UI (piwebdev), because I need a browser/mobile-friendly way to interact with a terminal-first coding agent remotely.

What I would like from Codex is essentially a native Linux equivalent of the current Remote Control workflow: run Codex CLI/TUI on the Linux host, pair that host/session directly with ChatGPT, then continue the same session from the Android/iOS/web UI — including prompts, streaming output, approvals, diffs, task status, and session resume — without requiring a ChatGPT desktop app on Windows/macOS.

A CLI UX similar to codex remote-control or /remote-control that securely registers the Linux host with the user's ChatGPT account would solve this very well. SSH/tmux remains a useful fallback, but it is not equivalent to an integrated mobile UI and synchronized session state.

This would also make Codex much more suitable for headless Linux development servers and homelab environments.

jdcodes1 · 9 days ago

Useful context from the source: the Remote Control client stack is already cross-platform. The daemon, WebSocket transport, enrollment, and pairing (codex remote-control start / pair in cli/src/remote_control_cmd.rs, transport in app-server-transport/src/transport/remote_control/) compile and run on Linux with no cfg(target_os) gates — the only platform-specific piece is an optional x-codex-host-device-kind header that identifies Mac minis, with an explicit non-macOS stub returning None (https://github.com/openai/codex/blob/1f41cc5d92/codex-rs/app-server-transport/src/transport/remote_control/host_device.rs#L67-L70).

So the Linux gap is not missing host code; it's (1) whatever enrollment/entitlement gating the backend applies to non-desktop-app hosts, and (2) the pairing flow being documented/surfaced only through the Windows/macOS desktop app. That reframes this issue from "port the host to Linux" to "allow the existing Linux CLI host to enroll" — a much smaller ask, mostly server-side policy plus documentation of the CLI pairing path. Worth a maintainer confirming whether Linux hosts are deliberately blocked at enrollment or just untested/unadvertised.

ithiria894 · 7 days ago

Confirmed with a real Ubuntu Remote Control setup:

  • Ubuntu 22.04.5 LTS, x86_64
  • Codex CLI/app-server 0.148.0
  • Remote Control enabled through codex remote-control start
  • ChatGPT iOS successfully connects as codex_chatgpt_ios_remote
  • The Linux host can receive prompts and continue running tasks

The Linux Remote stack is therefore not merely theoretical. The daemon, enrollment, WebSocket transport, app-server, and mobile controller already work on Linux. The unsupported path is simply not reliable enough for real work.

I collected host-side diagnostics and found two distinct failures:

  1. Remote WebSocket/TLS disconnects occur even while the host remains awake and online. They usually reconnect within 1–11 seconds using the saved subscription cursor.
  1. More seriously, six threads produced 1,628 durable-history projection failures with errors such as:

thread history projection ... expected ordinal 1650, got 1649

For affected threads, the canonical rollout JSONL continues growing while the SQLite projection checkpoint remains frozen. The task continues normally on the Ubuntu host, but ChatGPT Remote lists stale history or cannot display later content.

This matches #35746 and #38317. Codex 0.148.0 includes #38399, but current releases still provide no supported recovery path for projections already damaged by duplicate or replayed ordinals. Restarting Remote Control does not repair them.

The result is a particularly damaging failure mode: the computer is still doing the work, but the mobile controller silently loses access to the later conversation.

Linux is a primary software-development platform. Requiring a Mac or Windows bridge when the Linux Remote host implementation already exists is an artificial product limitation.

Please provide:

  1. Official Linux support for codex remote-control start and pair.
  2. A documented Linux enrollment and device-revocation workflow.
  3. Automatic detection and rebuilding of stale thread-history projections from canonical rollouts.
  4. Linux regression coverage for idle reconnects, long-running threads, resume, mobile background/foreground transitions, and large transcripts.
  5. A clear support status or roadmap for Linux Remote hosts.

The remaining gap appears to be product support, enrollment policy, recovery tooling, and reliability hardening—not the absence of Linux host code.

cendyandreoli · 2 days ago

I reproduced this on WSL2 and prepared a tested implementation for reference.

Environment

  • Codex CLI: 0.149.1 (standalone install)
  • Host: Linux 6.18.33.2-microsoft-standard-WSL2 x86_64
  • Client: ChatGPT Android, signed into the same ChatGPT account

Findings

The Linux/WSL daemon path itself is functional: codex remote-control start can launch the managed standalone app-server and register the machine. Two CLI-side gaps made setup fail or become misleading:

  1. codex remote-control pair used the generic 2-second local control-socket timeout even though remoteControl/pairing/start performs a backend request with a much longer deadline. On this host the response arrived just after the local timeout, reproducing #37698.
  2. A short manual pairing code is only the fallback artifact. The desktop-equivalent flow uses the opaque pairingCode to open https://chatgpt.com/codex/pair?pairing_code=... as a QR/deep link. Entering only the manual code on Android repeatedly returned to the authorization screen in this WSL test.

Reference implementation

Branch: https://github.com/cendyandreoli/codex/tree/cli-remote-control

The branch contains three focused commits:

/remote-control now:

  • reuses the current standalone Codex executable;
  • requests pairing immediately if the daemon is already ready;
  • otherwise starts the persistent remote-control daemon and retries pairing;
  • generates a scan-ready QR from the opaque pairingCode deep link;
  • displays the manual code only as a fallback;
  • reports setup failures directly in the TUI.

Validation

  • Pairing/setup unit tests: 5 passed.
  • codex-tui build completed successfully.
  • Interactive WSL validation rendered the QR, pairing link, and fallback code inside the TUI.
  • The user-visible output has insta snapshot coverage.

This is published as an implementation reference rather than an external PR, following the repository's current contribution policy. It also complements #32826 by making setup available directly from an active TUI session.