Severe input lag and dropped keystrokes in Codex TUI over SSH/Mosh while shell input is unaffected
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of Codex CLI is running?
codex-cli 0.153.0 (also reproduced on 0.151.0)
What subscription do you have?
API
Which model were you using?
gpt-5.6-sol via a custom OpenAI-compatible API provider (issue occurs before submitting a prompt)
What platform is your computer?
Linux 6.8.0-101-generic x86_64 (Ubuntu 24.04 remote server); SSH client runs on Windows 11
What terminal emulator and version are you using (if applicable)?
Termius on Windows 11 over SSH and Mosh; TERM=xterm-256color; Bash; no tmux/screen
Codex doctor report
{
"schemaVersion": 1,
"generatedAt": "1788402053s since unix epoch",
"overallStatus": "ok",
"codexVersion": "0.153.0",
"checks": {
"app_server.status": {
"id": "app_server.status",
"category": "app-server",
"status": "ok",
"summary": "background server is not running",
"details": {
"control socket": "/root/.codex/app-server-control/app-server-control.sock",
"daemon state dir": "/root/.codex/app-server-daemon",
"mode": "persistent",
"pid file": "/root/.codex/app-server-daemon/app-server.pid (file)",
"settings": "/root/.codex/app-server-daemon/settings.json (file)",
"status": "not running",
"update-loop pid file": "/root/.codex/app-server-daemon/app-server-updater.pid (file)"
},
"remediation": null,
"durationMs": 0
},
"auth.credentials": {
"id": "auth.credentials",
"category": "auth",
"status": "ok",
"summary": "OpenAI auth is not required for the active model provider",
"details": {
"auth env vars present": "OPENAI_API_KEY",
"auth file": "/root/.codex/auth.json",
"auth storage mode": "File",
"model provider requires OpenAI auth": "false"
},
"remediation": null,
"durationMs": 0
},
"config.load": {
"id": "config.load",
"category": "config",
"status": "ok",
"summary": "config loaded",
"details": {
"CODEX_HOME": "/root/.codex",
"config.toml": "/root/.codex/config.toml",
"config.toml parse": "ok",
"cwd": "/root",
"enabled feature flags": "shell_tool, view_image, sleep_tool, unified_exec, unified_exec_zsh_fork, shell_snapshot, content_item_kinds, code_mode_host, terminal_resize_reflow, sqlite, hooks, enable_request_compression, unbounded_connection_retries, apps, tool_search_always_defer_mcp_tools, tool_suggest, plugins, in_app_browser, in_app_chat, in_app_dictation, in_app_local_automation, 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, compaction_image_budget, workspace_dependencies",
"feature flag overrides": "multi_agent=false",
"feature flags enabled": "46",
"log dir": "/root/.codex/log",
"mcp servers": "1",
"model": "gpt-5.6-sol",
"model provider": "claude-proxy-openai",
"sqlite home": "/root/.codex"
},
"remediation": null,
"durationMs": 0
},
"git.environment": {
"id": "git.environment",
"category": "git",
"status": "ok",
"summary": "git version 2.43.0",
"details": {
"PATH git #1": "/usr/bin/git",
"PATH git #2": "/bin/git",
"PATH git entries": "2",
"git build options": "git version 2.43.0; cpu: x86_64; no commit associated with this build; sizeof-long: 8; sizeof-size_t: 8; shell-path: /bin/sh",
"git exec path": "/usr/lib/git-core",
"git version": "git version 2.43.0",
"repo detected": "false",
"selected git": "/usr/bin/git"
},
"remediation": null,
"durationMs": 21
},
"installation": {
"id": "installation",
"category": "install",
"status": "ok",
"summary": "installation looks consistent",
"details": {
"PATH codex #1": "/root/.local/bin/codex",
"PATH codex #2": "/root/.local/bin/codex",
"PATH codex #3": "/root/.local/bin/codex",
"PATH codex #4": "/usr/bin/codex",
"PATH codex #5": "/usr/bin/codex",
"PATH codex #6": "/bin/codex",
"PATH codex entries": "6",
"current executable": "/root/.codex/packages/standalone/releases/0.153.0-x86_64-unknown-linux-musl/bin/codex",
"install context": "standalone (unix, package /root/.codex/packages/standalone/releases/0.153.0-x86_64-unknown-linux-musl, bin /root/.codex/packages/standalone/releases/0.153.0-x86_64-unknown-linux-musl/bin, resources /root/.codex/packages/standalone/releases/0.153.0-x86_64-unknown-linux-musl/codex-resources, path /root/.codex/packages/standalone/releases/0.153.0-x86_64-unknown-linux-musl/codex-path)",
"managed by Vite+": "false",
"managed by bun": "false",
"managed by npm": "false",
"managed by pnpm": "false",
"managed package root": "not set"
},
"remediation": null,
"durationMs": 2
},
"mcp.config": {
"id": "mcp.config",
"category": "mcp",
"status": "ok",
"summary": "MCP configuration is locally consistent",
"details": {
"configured servers": "1",
"disabled servers": "0",
"streamable_http servers": "1"
},
"remediation": null,
"durationMs": 271
},
"network.env": {
"id": "network.env",
"category": "network",
"status": "ok",
"summary": "network-related environment looks readable",
"details": {
"managed proxy": "not configured",
"proxy env vars": "none",
"respect system proxy": "disabled"
},
"remediation": null,
"durationMs": 0
},
"network.provider_reachability": {
"id": "network.provider_reachability",
"category": "reachability",
"status": "ok",
"summary": "active provider endpoints are reachable over HTTP",
"details": {
"claude-proxy-openai API inference URL": "http://127.0.0.1:8787/v1/<redacted> reachable (HTTP 405)",
"claude-proxy-openai API route probe": "http://127.0.0.1:8787/v1/<redacted> route exists (HTTP 401)",
"reachability mode": "provider auth"
},
"remediation": null,
"durationMs": 35
},
"network.websocket_reachability": {
"id": "network.websocket_reachability",
"category": "websocket",
"status": "ok",
"summary": "Responses WebSocket is not enabled for the active provider",
"details": {
"model provider": "claude-proxy-openai",
"provider name": "OpenAI",
"proxy env vars": "none",
"supports websockets": "false",
"wire API": "responses"
},
"remediation": null,
"durationMs": 0
},
"runtime.provenance": {
"id": "runtime.provenance",
"category": "runtime",
"status": "ok",
"summary": "running standalone on linux-x86_64",
"details": {
"commit": "unknown",
"current executable": "/root/.codex/packages/standalone/releases/0.153.0-x86_64-unknown-linux-musl/bin/codex",
"install method": "standalone (unix, package /root/.codex/packages/standalone/releases/0.153.0-x86_64-unknown-linux-musl, bin /root/.codex/packages/standalone/releases/0.153.0-x86_64-unknown-linux-musl/bin, resources /root/.codex/packages/standalone/releases/0.153.0-x86_64-unknown-linux-musl/codex-resources, path /root/.codex/packages/standalone/releases/0.153.0-x86_64-unknown-linux-musl/codex-path)",
"platform": "linux-x86_64",
"version": "0.153.0"
},
"remediation": null,
"durationMs": 0
},
"runtime.search": {
"id": "runtime.search",
"category": "search",
"status": "ok",
"summary": "search is OK (bundled)",
"details": {
"search command": "/root/.codex/packages/standalone/releases/0.153.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": "Never",
"codex-linux-sandbox helper": "/root/.codex/tmp/arg0/codex-arg0jSfeWg/codex-linux-sandbox",
"execve wrapper helper": "/root/.codex/tmp/arg0/codex-arg0jSfeWg/codex-execve-wrapper",
"filesystem sandbox": "unrestricted",
"network sandbox": "enabled"
},
"remediation": null,
"durationMs": 0
},
"security.endpoint": {
"id": "security.endpoint",
"category": "security",
"status": "ok",
"summary": "endpoint protection is not inspected on this platform",
"details": {
"endpoint products": "not inspected on this platform"
},
"remediation": null,
"durationMs": 0
},
"state.paths": {
"id": "state.paths",
"category": "state",
"status": "ok",
"summary": "state paths and databases are inspectable",
"details": {
"CODEX_HOME": "/root/.codex (dir)",
"active rollout files": "238 files, 468835177 total bytes, 1969895 average bytes",
"archived rollout files": "0 files, 0 total bytes, 0 average bytes",
"goals DB": "/root/.codex/goals_1.sqlite (file)",
"goals DB integrity": "ok",
"log DB": "/root/.codex/logs_2.sqlite (file)",
"log DB integrity": "ok",
"log dir": "/root/.codex/log (dir)",
"memories DB": "/root/.codex/memories_1.sqlite (file)",
"memories DB integrity": "ok",
"queue DB": "/root/.codex/queue_1.sqlite (file)",
"queue DB integrity": "ok",
"sqlite home": "/root/.codex (dir)",
"standalone release cache": "11 entries in /root/.codex/packages/standalone/releases",
"state DB": "/root/.codex/state_5.sqlite (file)",
"state DB integrity": "ok",
"thread history DB": "/root/.codex/thread_history_1.sqlite (file)",
"thread history DB integrity": "ok"
},
"remediation": null,
"durationMs": 3033
},
"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": "claude-proxy-openai",
"rollout DB active files": "238",
"rollout DB active rows": "238",
"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": "claude-proxy-openrouter=158, claude-proxy-openai=74, claude-proxy-test-ggcpa=2, sf_probe=2, sf_test=2",
"rollout DB rows": "238",
"rollout DB scan cap reached": "false",
"rollout DB scan errors": "0",
"rollout DB sources": "subagent:thread_spawn=123, cli=72, vscode=35, exec=7, subagent:other=1",
"rollout DB stale rows": "0"
},
"remediation": null,
"durationMs": 349
},
"system.disk": {
"id": "system.disk",
"category": "disk",
"status": "ok",
"summary": "sufficient free disk space (73.5 GiB)",
"details": {
"CODEX_HOME available": "73.5 GiB",
"failure threshold": "1.0 GiB",
"warning threshold": "5.0 GiB",
"worktree available": "73.5 GiB"
},
"remediation": null,
"durationMs": 0
},
"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 24.4.0 (noble) [64-bit]",
"os language": "en-US",
"os type": "Ubuntu",
"os version": "24.4.0"
},
"remediation": null,
"durationMs": 13
},
"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": "118x40"
},
"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": "cwd",
"terminal title project value": "root",
"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.152.1",
"check for update on startup": "true",
"last checked at": "2026-09-02T13:52:43.634060122Z",
"latest version": "0.153.0",
"latest version status": "current version is not older",
"update action": "standalone installer",
"version cache": "/root/.codex/version.json"
},
"remediation": null,
"durationMs": 751
}
}
}
What issue are you seeing?
Keyboard input inside the Codex CLI TUI is extremely laggy when Codex is running on a remote Ubuntu server over SSH. Keystrokes are frequently dropped, and I often need to press the same key multiple times before a single character is entered.
Regular Bash input in the same SSH session works normally. The issue is specific to the Codex TUI.
Using Mosh instead of SSH does not improve the behavior, so this does not appear to be caused solely by ordinary SSH latency.
What steps can reproduce the bug?
- Connect from Windows 11 to the Ubuntu server using Termius and SSH.
- Run
codex. - Type a sentence into the Codex prompt at normal speed.
- Observe delayed or dropped characters. Some keys must be pressed multiple times.
- Exit Codex and type in the regular Bash shell.
- Observe that shell input responds normally.
- Repeat using Mosh and observe the same Codex TUI behavior.
What is the expected behavior?
Keyboard input in the Codex TUI should respond immediately over a remote terminal session without dropping keystrokes.
Additional information
- Codex 0.151.0 previously worked normally in the same environment.
- The issue began around September 2, 2026 without a Codex CLI upgrade or an intentional environment change.
- Upgrading from 0.151.0 to 0.153.0 did not fix it.
- Regular shell input remains unaffected.
- Mosh does not improve the issue.
- No tmux or screen is involved.
codex doctor --jsonreports overallStatusok.- Related but apparently different issue: #11678 (local Windows input regression).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the lag in the Codex CLI TUI before submitting a prompt using Termius over both SSH and Mosh, then compare it with local use and ordinary shell input. Trace the TUI input-handling and terminal transport entry points implicated by the reproduction; done means keystrokes remain responsive and are not dropped in the reported SSH/Mosh setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100