Android remote-control pairing fails with “Pairing failed” for Linux Codex CLI host
What version of Codex CLI is running?
codex-cli 0.147.0
What subscription do you have?
Plus
Which model were you using?
Luna various
What platform is your computer?
Microsoft Windows NT 10.0.26200.0 x64
What terminal emulator and version are you using (if applicable)?
Windows Terminal (WSL / PowerShell)
Codex doctor report
$ codex doctor --json
{
"schemaVersion": 1,
"generatedAt": "1786403293s 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": "/home/devuser/.codex/app-server-control/app-server-control.sock",
"daemon state dir": "/home/devuser/.codex/app-server-daemon",
"mode": "persistent",
"pid file": "/home/devuser/.codex/app-server-daemon/app-server.pid (file)",
"settings": "/home/devuser/.codex/app-server-daemon/settings.json (file)",
"status": "running",
"update-loop pid file": "/home/devuser/.codex/app-server-daemon/app-server-updater.pid (file)"
},
"remediation": null,
"durationMs": 198
},
"auth.credentials": {
"id": "auth.credentials",
"category": "auth",
"status": "ok",
"summary": "auth is configured",
"details": {
"auth file": "/home/devuser/.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/devuser/.codex",
"config.toml": "/home/devuser/.codex/config.toml",
"config.toml parse": "ok",
"cwd": "/mnt/c/Users/Naj/git/daemon",
"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": "/home/devuser/.codex/log",
"mcp servers": "0",
"model": "gpt-5.6-luna",
"model provider": "openai",
"sqlite home": "/home/devuser/.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/sbin/git",
"PATH git #2": "/usr/bin/git",
"PATH git #3": "/sbin/git",
"PATH git #4": "/bin/git",
"PATH git entries": "4",
"git branch": "main",
"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": "/mnt/c/Users/Naj/git/daemon",
"selected git": "/usr/sbin/git"
},
"remediation": null,
"durationMs": 191
},
"installation": {
"id": "installation",
"category": "install",
"status": "ok",
"summary": "installation looks consistent",
"details": {
"PATH codex #1": "/home/devuser/.local/bin/codex",
"PATH codex #2": "/usr/sbin/codex",
"PATH codex #3": "/usr/bin/codex",
"PATH codex #4": "/sbin/codex",
"PATH codex #5": "/bin/codex",
"PATH codex entries": "5",
"current executable": "/home/devuser/.codex/packages/standalone/releases/0.147.0-x86_64-unknown-linux-musl/bin/codex",
"install context": "standalone (unix, package /home/devuser/.codex/packages/standalone/releases/0.147.0-x86_64-unknown-linux-musl, bin /home/devuser/.codex/packages/standalone/releases/0.147.0-x86_64-unknown-linux-musl/bin, resources /home/devuser/.codex/packages/standalone/releases/0.147.0-x86_64-unknown-linux-musl/codex-resources, path /home/devuser/.codex/packages/standalone/releases/0.147.0-x86_64-unknown-linux-musl/codex-path)",
"managed by bun": "false",
"managed by npm": "false",
"managed by pnpm": "false",
"managed package root": "not set"
},
"remediation": null,
"durationMs": 20
},
"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": 314
},
"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": 811
},
"runtime.provenance": {
"id": "runtime.provenance",
"category": "runtime",
"status": "ok",
"summary": "running standalone on linux-x86_64",
"details": {
"commit": "unknown",
"current executable": "/home/devuser/.codex/packages/standalone/releases/0.147.0-x86_64-unknown-linux-musl/bin/codex",
"install method": "standalone (unix, package /home/devuser/.codex/packages/standalone/releases/0.147.0-x86_64-unknown-linux-musl, bin /home/devuser/.codex/packages/standalone/releases/0.147.0-x86_64-unknown-linux-musl/bin, resources /home/devuser/.codex/packages/standalone/releases/0.147.0-x86_64-unknown-linux-musl/codex-resources, path /home/devuser/.codex/packages/standalone/releases/0.147.0-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/devuser/.codex/packages/standalone/releases/0.147.0-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/devuser/.codex/tmp/arg0/codex-arg0P0VITN/codex-linux-sandbox",
"execve wrapper helper": "/home/devuser/.codex/tmp/arg0/codex-arg0P0VITN/codex-execve-wrapper",
"filesystem sandbox": "restricted",
"network sandbox": "restricted"
},
"remediation": null,
"durationMs": 6
},
"state.paths": {
"id": "state.paths",
"category": "state",
"status": "ok",
"summary": "state paths and databases are inspectable",
"details": {
"CODEX_HOME": "/home/devuser/.codex (dir)",
"active rollout files": "55 files, 171712550 total bytes, 3122046 average bytes",
"archived rollout files": "1 files, 28150 total bytes, 28150 average bytes",
"goals DB": "/home/devuser/.codex/goals_1.sqlite (file)",
"goals DB integrity": "ok",
"log DB": "/home/devuser/.codex/logs_2.sqlite (file)",
"log DB integrity": "ok",
"log dir": "/home/devuser/.codex/log (missing)",
"memories DB": "/home/devuser/.codex/memories_1.sqlite (file)",
"memories DB integrity": "ok",
"queue DB": "/home/devuser/.codex/queue_1.sqlite (file)",
"queue DB integrity": "ok",
"sqlite home": "/home/devuser/.codex (dir)",
"standalone release cache": "3 entries in /home/devuser/.codex/packages/standalone/releases",
"state DB": "/home/devuser/.codex/state_5.sqlite (file)",
"state DB integrity": "ok",
"thread history DB": "/home/devuser/.codex/thread_history_1.sqlite (file)",
"thread history DB integrity": "ok"
},
"remediation": null,
"durationMs": 2727
},
"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": "55",
"rollout DB active rows": "55",
"rollout DB archive mismatches": "0",
"rollout DB archived files": "1",
"rollout DB archived rows": "1",
"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=56",
"rollout DB rows": "56",
"rollout DB scan cap reached": "false",
"rollout DB scan errors": "0",
"rollout DB sources": "vscode=42, cli=12, subagent:other=2",
"rollout DB stale rows": "0"
},
"remediation": null,
"durationMs": 255
},
"system.environment": {
"id": "system.environment",
"category": "system",
"status": "ok",
"summary": "OS language C",
"details": {
"EDITOR": "not set",
"LANG": "C.UTF-8",
"VISUAL": "not set",
"os": "Arch Linux [64-bit]",
"os language": "C",
"os type": "Arch Linux",
"os version": "Unknown"
},
"remediation": null,
"durationMs": 27
},
"terminal.env": {
"id": "terminal.env",
"category": "terminal",
"status": "ok",
"summary": "terminal metadata was detected",
"details": {
"DISPLAY": "present",
"WAYLAND_DISPLAY": "present",
"WSL_DISTRO_NAME": "present",
"WSL_INTEROP": "present",
"WT_SESSION": "present",
"color output": "enabled",
"effective locale": "C.UTF-8",
"stderr is terminal": "true",
"stdin is terminal": "true",
"stdout is terminal": "true",
"terminal": "Windows Terminal",
"terminal size": "133x35"
},
"remediation": null,
"durationMs": 15
},
"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": "daemon",
"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-10T18:44:28.984212613Z",
"latest version": "0.147.0",
"latest version status": "current version is not older",
"update action": "standalone installer",
"version cache": "/home/devuser/.codex/version.json"
},
"remediation": null,
"durationMs": 578
}
}
}
What issue are you seeing?
Android remote-control pairing consistently fails with “Pairing failed” when pairing with a Linux Codex CLI host.
The Linux host is running Codex CLI 0.147.0. Remote control starts successfully and registers the machine as BOOMBOX. The CLI also successfully generates fresh manual pairing codes, but the Android app rejects every code with “Pairing failed.”
There is no corresponding error or request in the Linux app-server stderr log when the Android pairing attempt fails.
What steps can reproduce the bug?
- Run Codex CLI 0.147.0 on Linux.
- Start remote control:
codex remote-control start
- Confirm that the host is registered and available for remote control.
- Generate a manual pairing code:
codex remote-control pair --json
- Enter the returned manualPairingCode in the Android Codex app.
- The Android app reports:
Pairing failed
- Repeat with a newly generated pairing code. The same failure occurs.
- Stop and restart remote control:
codex remote-control stop
codex remote-control start
- Generate another fresh pairing code and retry. The pairing still fails.
What is the expected behavior?
A freshly generated, unexpired manual pairing code should successfully pair the Android app with the registered Linux Codex remote-control host.
Additional information
Remote control starts successfully:
Starting app-server daemon with remote control enabled...
This machine is available for remote control as BOOMBOX.
Daemon used app-server:
path: /home/devuser/.codex/packages/standalone/current/codex
version: 0.147.0
Example pairing response:
{
"pairingCode": "...",
"manualPairingCode": "KNLG-QAE5",
"environmentId": "env_e_6a6d7fb159fc832fb0358b981c88ed91",
"expiresAt": 1786403542
}
The pairing code is freshly generated and unexpired when tested.
The local app-server stderr log shows no new output when Android reports “Pairing failed.”
There are no relevant remote-control settings in ~/.codex/config.toml, and there are no CODEX_ or OPENAI_ environment variable overrides.
The daemon was also restarted successfully before retesting, so this does not appear to be the earlier stale/unmanaged app-server issue.
The failure appears to be specific to the Android pairing flow or the remote pairing service/backend.
6 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
A fresh Linux Codex CLI 0.147.0 remote-control instance successfully registers and generates valid pairing codes, but Android consistently returns “Pairing failed,” and the local app-server receives/logs nothing from the failed pairing attempt.
Also observed the same bug on the same platforms.
Additional protocol-level observation from an independent reproduction on Codex CLI 0.147.0:
remoteControl/status/readreported a connected environment.remoteControl/client/listsucceeded.remoteControl/pairing/startsucceeded and returned a fresh, unexpired code.remoteControl/pairing/statuschecks continued returningclaimed: false.This appears distinct from #37698, where remote-control pair times out before receiving the pairing/start response. Here, offer creation completes successfully; the Android/backend flow never claims the offer.
I reproduced the same generic Android pairing failure and isolated it before the host/pairing-code path. ChatGPT Android receives HTTP 403 from
/backend-api/codex/remote/control/client/enroll/start; the host receives no client claim. It reproduces on an unrooted Pixel 5 running an official GrapheneOS release as well as a rooted Pixel 8 Pro. Full Android-side evidence and the GrapheneOS attestation request are in #38128.I’m seeing what appears to be the same Android Remote pairing issue, and I’ve done some additional cross-device testing that may help narrow it down.
Current behavior:
Android ChatGPT app → Mac A: ❌ pairing fails
Android ChatGPT app → Mac B: ❌ pairing fails
Android ChatGPT app → Windows PC: ❌ pairing fails
iPhone ChatGPT app → the same Mac A: ✅ Remote works normally
Desktop → desktop Remote between the Macs/Windows PC: ✅ works normally
The Android device had previously been paired successfully. After removing the old pairing, I have not been able to pair it again.
I’ve already tried:
Updating the Android ChatGPT app
Completely uninstalling and reinstalling the Android app
Logging out and back in
Removing the old Remote pairing
Generating fresh QR codes
Pairing against multiple independent hosts (2 Macs + 1 Windows PC)
Using the manual pairing code generated by codex remote-control pair instead of QR pairing
Both Android pairing methods fail:
QR code → pairing fails
Manual pairing code → pairing fails
The particularly interesting control test is that an iPhone can currently connect successfully to the exact same Mac host and account that Android fails to pair with.
I also verified that the Mac Remote host itself is functional: after cleaning up the host state and creating a fresh Remote enrollment/identity, the iPhone can connect and use Remote normally, while Android still cannot pair.
This makes it look less like a host-side connectivity problem and more like an Android-specific pairing / device enrollment issue, possibly involving re-pairing a previously registered Android device.
Has anyone found a reliable way to reset the Android-side Remote device identity/enrollment, or does this require a server-side reset/fix?
The detail that no request ever reaches the host's logs is diagnostic: pairing-code redemption happens between the Android app and the ChatGPT backend, and only after the backend accepts it does anything involve your host's WebSocket. Code generation succeeding locally while every redemption fails without host-side traffic means the rejection is server-side — most plausibly platform gating of Linux hosts at enrollment/redemption.
That aligns with what the source shows in #38115: the Remote Control host stack (daemon, transport, enrollment, pairing) is fully cross-platform in the CLI with zero
cfg(target_os)gates — the only macOS-specific bit is an optional device-kind header with aNonestub elsewhere (app-server-transport/src/transport/remote_control/host_device.rs#L67-L70). So the Linux host does everything right, generates valid codes, and the backend declines to marry them to an unsupported host platform, with the generic "Pairing failed" being all the Android app can say.Worth a maintainer confirming whether Linux hosts are deliberately blocked at redemption. If so, the actionable client-side improvement is honest messaging:
remote-control starton Linux should say pairing isn't supported yet rather than issuing codes that can never redeem (same lossy-error pattern as #38534, where connection failures surface as a bare status with the cause only in logs).