Skip to content

Codex CLI 0.157.0 regression: middle-click and right-click Paste no longer paste text in Konsole/Wayland #48127

Closed

Description

@matthew-pk

What version of Codex CLI is running?

Codex CLI 0.157.0

What subscription do you have?

Pro 5x

Which model were you using?

GPT-6 Sol

What platform is your computer?

Manjaro Linux (Arch-based) x86_64, Kernel: 6.18.39-1-MANJARO, KDE Plasma

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

Konsole/Wayland

Codex doctor report

{
  "schemaVersion": 1,
  "generatedAt": "1790352067s since unix epoch",
  "overallStatus": "ok",
  "codexVersion": "0.157.0",
  "checks": {
    "app_server.status": {
      "id": "app_server.status",
      "category": "app-server",
      "status": "ok",
      "summary": "background server is running",
      "details": {
        "app-server version": "0.157.0",
        "control socket": "/home/user0/.codex/app-server-control/app-server-control.sock",
        "daemon state dir": "/home/user0/.codex/app-server-daemon",
        "dedicated pid file": "/home/user0/.codex/app-server-daemon/daemon.pid (file)",
        "dedicated update-loop pid file": "/home/user0/.codex/app-server-daemon/daemon-updater.pid (file)",
        "mode": "ephemeral",
        "pid file": "/home/user0/.codex/app-server-daemon/app-server.pid (missing)",
        "settings": "/home/user0/.codex/app-server-daemon/settings.json (missing)",
        "status": "running",
        "update-loop pid file": "/home/user0/.codex/app-server-daemon/app-server-updater.pid (missing)"
      },
      "remediation": null,
      "durationMs": 2
    },
    "auth.credentials": {
      "id": "auth.credentials",
      "category": "auth",
      "status": "ok",
      "summary": "auth is configured",
      "details": {
        "auth file": "/home/user0/.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/user0/.codex",
        "active thread overrides": "not inspected",
        "config.toml": "/home/user0/.codex/config.toml",
        "config.toml parse": "ok",
        "configuration load ms": "25",
        "configuration scope": "invocation config, including cloud-managed policy",
        "cwd": "/home/user0",
        "enabled feature flags": "daemon_auto_start, shell_tool, view_image, sleep_tool, unified_exec, unified_exec_tty, unified_exec_zsh_fork, shell_snapshot, content_item_kinds, code_mode_host, terminal_resize_reflow, sqlite, hooks, enable_request_compression, unbounded_connection_retries, worktrees, system_proxy_fallback, multi_agent, 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, guardianv2.thread_context, guardian_reuse_parent_compaction, goals, collaboration_modes, tool_call_mcp_elicitation, auth_elicitation, fast_mode, realtime_conversation, tui_app_server, compaction_image_budget, workspace_dependencies",
        "feature flag overrides": "none",
        "feature flags enabled": "52",
        "log dir": "/home/user0/.codex/log",
        "mcp servers": "1",
        "model": "gpt-6-sol",
        "model provider": "openai",
        "sqlite home": "/home/user0/.codex"
      },
      "remediation": null,
      "durationMs": 0
    },
    "git.environment": {
      "id": "git.environment",
      "category": "git",
      "status": "ok",
      "summary": "git executable found; execution not verified",
      "details": {
        "PATH git #1": "/usr/bin/git",
        "PATH git entries": "1",
        "git execution": "not inspected (PATH helpers are not executed)",
        "repo detected": "false",
        "selected git": "/usr/bin/git"
      },
      "remediation": null,
      "durationMs": 0
    },
    "installation": {
      "id": "installation",
      "category": "install",
      "status": "ok",
      "summary": "installation looks consistent",
      "details": {
        "PATH codex #1": "/home/user0/.local/bin/codex",
        "PATH codex #2": "/home/user0/.npm-global/bin/codex",
        "PATH codex entries": "2",
        "current executable": "/home/user0/.codex/packages/standalone/releases/0.157.0-x86_64-unknown-linux-musl/bin/codex",
        "install context": "standalone (unix, package /home/user0/.codex/packages/standalone/releases/0.157.0-x86_64-unknown-linux-musl, bin /home/user0/.codex/packages/standalone/releases/0.157.0-x86_64-unknown-linux-musl/bin, resources /home/user0/.codex/packages/standalone/releases/0.157.0-x86_64-unknown-linux-musl/codex-resources, path /home/user0/.codex/packages/standalone/releases/0.157.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": 0
    },
    "mcp.config": {
      "id": "mcp.config",
      "category": "mcp",
      "status": "ok",
      "summary": "MCP configuration is locally consistent",
      "details": {
        "configured servers": "1",
        "disabled servers": "0",
        "stdio servers": "1"
      },
      "remediation": null,
      "durationMs": 0
    },
    "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": {
        "ChatGPT inference URL": "https://chatgpt.com/backend-api/<redacted> reachable (HTTP 405)",
        "reachability mode": "ChatGPT auth"
      },
      "remediation": null,
      "durationMs": 156
    },
    "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",
        "provider name": "OpenAI",
        "proxy env vars": "none",
        "reasoning header": "false",
        "server model present": "false",
        "supports websockets": "true",
        "wire API": "responses"
      },
      "remediation": null,
      "durationMs": 676
    },
    "runtime.provenance": {
      "id": "runtime.provenance",
      "category": "runtime",
      "status": "ok",
      "summary": "running standalone on linux-x86_64",
      "details": {
        "commit": "unknown",
        "current executable": "/home/user0/.codex/packages/standalone/releases/0.157.0-x86_64-unknown-linux-musl/bin/codex",
        "install method": "standalone (unix, package /home/user0/.codex/packages/standalone/releases/0.157.0-x86_64-unknown-linux-musl, bin /home/user0/.codex/packages/standalone/releases/0.157.0-x86_64-unknown-linux-musl/bin, resources /home/user0/.codex/packages/standalone/releases/0.157.0-x86_64-unknown-linux-musl/codex-resources, path /home/user0/.codex/packages/standalone/releases/0.157.0-x86_64-unknown-linux-musl/codex-path)",
        "platform": "linux-x86_64",
        "version": "0.157.0"
      },
      "remediation": null,
      "durationMs": 0
    },
    "runtime.search": {
      "id": "runtime.search",
      "category": "search",
      "status": "ok",
      "summary": "search command found (bundled); execution not verified",
      "details": {
        "search command": "/home/user0/.codex/packages/standalone/releases/0.157.0-x86_64-unknown-linux-musl/codex-path/rg",
        "search command readiness": "file exists",
        "search provider": "bundled"
      },
      "remediation": null,
      "durationMs": 0
    },
    "sandbox.filesystem_paths": {
      "id": "sandbox.filesystem_paths",
      "category": "sandbox",
      "status": "ok",
      "summary": "no explicit filesystem paths to probe",
      "details": {},
      "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/user0/.codex/tmp/arg0/codex-arg03eEBqH/codex-linux-sandbox",
        "denied-read glob rules": "0",
        "denied-read rules": "0",
        "execve wrapper helper": "/home/user0/.codex/tmp/arg0/codex-arg03eEBqH/codex-execve-wrapper",
        "filesystem sandbox": "restricted",
        "glob scan max depth": "unbounded",
        "managed filesystem source": "none",
        "network sandbox": "restricted"
      },
      "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": "/home/user0/.codex (dir)",
        "active rollout files": "710 files, 982048242 total bytes, 1383166 average bytes",
        "archived rollout files": "0 files, 0 total bytes, 0 average bytes",
        "goals DB": "/home/user0/.codex/goals_1.sqlite (file)",
        "goals DB integrity": "ok",
        "log DB": "/home/user0/.codex/logs_2.sqlite (file)",
        "log DB integrity": "ok",
        "log dir": "/home/user0/.codex/log (dir)",
        "memories DB": "/home/user0/.codex/memories_1.sqlite (file)",
        "memories DB integrity": "ok",
        "memories v2 DB": "/home/user0/.codex/memories_v2_1.sqlite (missing)",
        "memories v2 DB integrity": "skipped (missing)",
        "queue DB": "/home/user0/.codex/queue_1.sqlite (file)",
        "queue DB integrity": "ok",
        "sqlite home": "/home/user0/.codex (dir)",
        "standalone release cache": "1 entries in /home/user0/.codex/packages/standalone/releases",
        "state DB": "/home/user0/.codex/state_5.sqlite (file)",
        "state DB integrity": "ok",
        "thread history DB": "/home/user0/.codex/thread_history_1.sqlite (file)",
        "thread history DB integrity": "ok"
      },
      "remediation": null,
      "durationMs": 3317
    },
    "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": "710",
        "rollout DB active rows": "710",
        "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=710",
        "rollout DB rows": "710",
        "rollout DB scan cap reached": "false",
        "rollout DB scan errors": "0",
        "rollout DB sources": "cli=694, vscode=9, subagent:other=6, exec=1",
        "rollout DB stale rows": "0"
      },
      "remediation": null,
      "durationMs": 464
    },
    "system.disk": {
      "id": "system.disk",
      "category": "disk",
      "status": "ok",
      "summary": "sufficient free disk space (684.9 GiB)",
      "details": {
        "CODEX_HOME available": "684.9 GiB",
        "failure threshold": "1.0 GiB",
        "warning threshold": "5.0 GiB",
        "worktree available": "684.9 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",
        "LESS": "set",
        "VISUAL": "not set",
        "os": "Manjaro 26.1.0 (Bian-May) [64-bit]",
        "os language": "en-US",
        "os type": "Manjaro",
        "os version": "26.1.0"
      },
      "remediation": null,
      "durationMs": 10
    },
    "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": "103x60",
        "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": "cwd",
        "terminal title project value": "user0",
        "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.157.0",
        "check for update on startup": "true",
        "last checked at": "2026-09-25T15:38:24.164138315Z",
        "latest version": "0.157.0",
        "latest version status": "current version is not older",
        "update action": "standalone installer",
        "version cache": "/home/user0/.codex/version.json"
      },
      "remediation": null,
      "durationMs": 491
    }
  }
}

What issue are you seeing?

Title

Codex CLI 0.157.0 regression: middle-click and right-click Paste no longer paste text in Konsole/Wayland

Codex version

codex-cli 0.157.0

Installed using the standalone installer:

/home/user0/.local/bin/codex -> ~/.codex/packages/standalone/current/bin/codex

Platform

  • Manjaro Linux (Arch-based)
  • x86_64
  • Kernel: 6.18.39-1-MANJARO
  • KDE Plasma
  • Wayland (XDG_SESSION_TYPE=wayland)
  • Konsole
  • TERM=xterm-256color
  • zsh 5.9.2

Issue

After upgrading Codex CLI from 0.153.4 to 0.157.0, normal mouse-based text paste into the Codex prompt stopped working.

Before the upgrade, I routinely pasted prompts using:

  1. Middle mouse button
  2. Konsole right-click → Paste

Both worked normally in Codex 0.153.4.

Immediately after upgrading to Codex 0.157.0, neither method pastes text into the Codex prompt.

Typing into the prompt still works normally.

Importantly, Ctrl+Shift+V does successfully paste the same clipboard text into the Codex prompt.

Normal clipboard/paste behavior also continues to work outside Codex.

This therefore appears to be a regression in how Codex 0.157.0 interacts with terminal-generated mouse paste under Konsole/Wayland rather than a general clipboard failure.

Steps to reproduce

  1. Run Konsole under KDE Plasma/Wayland.
  2. Start codex 0.157.0.
  3. Copy ordinary text to the clipboard.
  4. Focus the Codex prompt.
  5. Attempt to paste using middle mouse button.
  6. Nothing is pasted.
  7. Attempt to paste using Konsole right-click → Paste.
  8. Nothing is pasted.
  9. Press Ctrl+Shift+V.
  10. The text pastes successfully.

Regression

The same machine, desktop environment, terminal, shell, and workflow worked with Codex CLI 0.153.4 immediately before upgrading to 0.157.0.

Observed behavior:

  • 0.153.4: middle-click paste — works
  • 0.153.4: right-click → Paste — works
  • 0.157.0: middle-click paste — does not work
  • 0.157.0: right-click → Paste — does not work
  • 0.157.0: Ctrl+Shift+V — works

Expected behavior

Terminal-native paste mechanisms such as middle-click and right-click → Paste should insert clipboard text into the Codex prompt, as they did before the 0.157.0 upgrade.

Additional information

No external clipboard utilities (xclip, xsel, wl-copy, or wl-paste) are installed.

Environment variables:

XDG_SESSION_TYPE=wayland
XDG_CURRENT_DESKTOP=KDE
DESKTOP_SESSION=plasma
WAYLAND_DISPLAY=wayland-0
DISPLAY=:1
TERM=xterm-256color
COLORTERM=truecolor

Because Ctrl+Shift+V works with the same clipboard contents, the clipboard itself appears functional.

What steps can reproduce the bug?

Steps to reproduce

  1. Run Konsole under KDE Plasma/Wayland.
  2. Start codex 0.157.0.
  3. Copy ordinary text to the clipboard.
  4. Focus the Codex prompt.
  5. Attempt to paste using middle mouse button.
  6. Nothing is pasted.
  7. Attempt to paste using Konsole right-click → Paste.
  8. Nothing is pasted.
  9. Press Ctrl+Shift+V.
  10. The text pastes successfully.

What is the expected behavior?

Before the upgrade, I routinely pasted prompts using:

  1. Middle mouse button
  2. Konsole right-click → Paste

Both worked normally in Codex 0.153.4.

Additional information

No response

Activity

  1. added
    bug
    on Sep 25, 2026
  2. added
    CLI
    TUI
    on Sep 25, 2026
  3. boussouira commented on Sep 25, 2026

    @boussouira

    Shift + middle-click solve works, a workaround atleast
    normal right-click menu doesn't open at all without pressing shift

  4. matthew-pk commented on Sep 26, 2026

    @matthew-pk
    Author

    Shift + middle click works for me.
    Shift + right click + paste also works.
    Starting with 'codex -c tui.fullscreen_transcript=false' also works.

    So yes, all three work for me.

  5. ohrinplanning commented on Sep 26, 2026

    @ohrinplanning

    Additional independent reproduction on Windows 11.

    Environment:

    • Windows 11 Home 25H2
    • Windows Terminal
    • Codex CLI installed globally via npm
    • Affected version: codex-cli 0.157.0
    • Known working version tested: codex-cli 0.153.4

    Observed behavior:

    With Codex CLI 0.157.0, the normal mouse/right-click text copy workflow in Windows Terminal stopped working.

    The problem remained after:

    • restarting Windows;
    • checking Windows Terminal interaction settings;
    • restoring the Terminal settings;
    • confirming that keyboard-based selection/copy still worked.

    The clipboard itself was functional.

    We then performed a rollback/A-B test on the same machine.

    Before rollback:
    codex-cli 0.157.0
    → normal right-click copy workflow: NOT WORKING

    Rollback:
    npm install -g @openai/[email protected]

    Verification:
    codex.cmd --version
    → codex-cli 0.153.4

    npm list -g @openai/codex --depth=0
    → @openai/[email protected]

    After rollback, on the same PC and Windows Terminal:
    codex-cli 0.153.4
    → normal right-click copy workflow: WORKING AGAIN

    No project files or application code were changed during this test.

    This provides an independent Windows reproduction indicating a mouse/TUI interaction regression associated with 0.157.0.

    There was also an AI-assisted development safety issue exposed during troubleshooting.

    The AI assistant initially recommended continuing to use 0.157.0 with a keyboard-copy workaround rather than first testing a rollback to the last known-good version.

    The human operator rejected that approach and requested the rollback test. The rollback immediately restored the expected behavior.

    This suggests a broader safety concern for AI-assisted engineering: an assistant may optimize for task continuation by proposing a workaround while an unexplained regression remains present.

    A principle we derived from this incident is:

    “Humans and AI should prioritize preservation of verified facts over task completion, progress, efficiency, or convenience.”

    For unexplained behavior introduced immediately after an environment or toolchain update, a safer sequence is:

    STOP → identify the changed component → compare with the last known-good state / rollback → reproduce → establish evidence → human review → resume work.

    A workaround should not by itself be treated as evidence that the underlying development environment is safe to continue using.

  6. denshopat commented on Sep 26, 2026

    @denshopat

    This was generated by AI during triage.

    Additional user report on Linux/X11, submitted at the user's explicit request.

    The user highlights text and then middle-clicks in the Codex prompt to paste it. Nothing is inserted. The same highlight → middle-click workflow works in their terminal and in Claude Code.

    This concerns the PRIMARY selection populated by highlighting text, not an explicit Copy operation into the regular clipboard.

    Environment observed from the reporting session:

    • Installed CLI: codex-cli 0.157.1 (from codex --version).
    • XDG_SESSION_TYPE=x11.
    • TERM=xterm-256color.
    • COLORTERM=truecolor.
    • Terminal emulator and version have not been established.

    Reproduction reported by the user:

    1. Highlight ordinary text in another application.
    2. Middle-click in the Codex prompt.
    3. Observe that the highlighted text is not pasted.
    4. Compare with the terminal and Claude Code, where this gesture works.

    Expected: middle-click inserts the highlighted PRIMARY selection into the prompt, preserving the normal Linux interaction.

    This disrupts an established everyday input workflow. Please preserve native middle-click paste with the default TUI configuration.

    The agent has not independently reproduced the physical mouse interaction. Shift+middle-click and disabling fullscreen mode have not yet been tested by this reporter; no last-known-working Codex version has been established.

  7. denshopat commented on Sep 26, 2026

    @denshopat

    This was generated by AI during triage.

    Update from the same reporter: Shift + middle-click does work to paste the highlighted text.

    The reporter also cannot highlight text normally to copy it in Codex. They have now confirmed that Shift + left-click/drag works to select text.

    Both selection and PRIMARY-selection paste therefore work when Shift is held, while the ordinary unmodified mouse gestures fail in Codex. The reporter says the ordinary gestures work in their terminal and in Claude Code.

  8. Steven-Jones911 commented on Sep 28, 2026

    @Steven-Jones911

    I can reproduce this with Codex CLI over SSH using PuTTY.

    Environment:

    • Client: PuTTY on Windows 10/11
    • Remote: Linux (aarch64)
    • Codex CLI: codex-cli 0.158.0
    • Codex running on the remote host

    Before the recent Codex update, PuTTY's normal right-click paste worked in the Codex prompt.

    After the update:

    • Right-click paste at the normal remote shell prompt: works
    • Right-click paste at the Codex prompt: does nothing
    • Shift+Insert at the Codex prompt: works

    So the clipboard and PuTTY paste functionality itself are working; the regression appears specific to mouse/right-click paste while the Codex TUI is active.

    No corresponding copy works, either select text inside Codex and paste elsewhere using right-click of mouse or Shift-Ins will result in nothing being pasted. In fact, if anything is in the paste buffer/clipboard from a previous copy action (not in Codex), it gets pasted.

  9. bc-openai commented on Oct 1, 2026

    @bc-openai
    Contributor

    Thanks for the report! The paste issue is fixed in 0.158.0. If anyone is still experiencing copy issues, please open a new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    CLITUIbug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions