Skip to content

Allow attaching the Codex terminal TUI to an existing Remote Control chat #32445

Open

Description

@michycom

What feature would you like to see?

Please add a supported way to open or attach the Codex terminal TUI to an already-running Codex Remote Control chat/thread.

A typical workflow is:

  1. Start codex remote-control on the Mac.
  2. Open and continue a Codex chat from iPhone/iPad.
  3. Return to the Mac and continue the exact same live chat in the terminal TUI.

At present, codex remote-control exposes only start, stop, and pair. There is no apparent attach, resume-remote, or equivalent command. codex --remote <ADDR> connects to an app-server endpoint, but does not provide an obvious way to attach to the existing Remote Control thread.

Why this matters

Remote Control is most useful when the same development session can move seamlessly between mobile and terminal. Without terminal attachment, the user must either remain in the app UI or start/resume a separate CLI session, which breaks continuity and may risk parallel or divergent work on the same repository.

Suggested interface

Any of these would solve the problem:

  • codex remote-control attach
  • codex resume --remote
  • a session picker showing active Remote Control threads
  • a stable thread/session ID that can be passed to the terminal TUI

The terminal should attach to the same live thread rather than create a duplicate continuation.

Environment

  • macOS 26.5.2
  • Codex CLI 0.144.1
  • Remote Control used between Mac and iPhone/iPad

Activity

  1. added
    enhancementNew feature or request
    CLIIssues related to the Codex CLI
    TUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal display
    sessionIssues involving session (thread) management, resuming, forking, naming, archiving
    on Jul 11, 2026
  2. liyoungc commented on Jul 14, 2026

    @liyoungc

    Confirmed on WSL2/Linux with codex-cli 0.144.4: codex remote-control --help exposes only start, stop, and pair—no attach or resume command.

    I would like to keep the existing local CLI TUI visible and usable on the host, then use ChatGPT mobile Remote to inspect the same live thread, send follow-ups, and handle approval requests. Returning to the terminal should continue that exact thread rather than create a separate session or competing continuation.

    A supported host-mediated pairing/control path for an existing CLI TUI thread would cover this workflow. It should work for WSL/Linux hosts as well as the desktop-app flow, without exposing an app-server WebSocket directly to the LAN or Internet.

  3. raymondtreehome commented on Aug 14, 2026

    @raymondtreehome

    I found a working path for this on macOS with codex-cli 0.147.0. It does not use a remote-control attach subcommand; instead, the top-level --remote option can be combined with resume.

    Test setup:

    codex app-server --remote-control --listen unix://...

    Then, from a separate terminal/TUI:

    codex --remote unix://<canonical-app-server-socket> resume <THREAD_ID>

    I tested this against an existing Codex thread that had been created from ChatGPT on iPhone.

    Observed behavior:

    • the terminal TUI rendered the existing conversation history;
    • a marker turn sent from the TUI landed in the same thread;
    • no fork or replacement thread was created;
    • the new turn was visible again in the same conversation on iPhone;
    • the canonical app-server remained the thread writer throughout the test.

    So, at least on 0.147.0, the architecture can effectively be:

    canonical app-server
            |
         same thread
       /     |      \
    iPhone   TUI   external client
    

    One important distinction: this is not the same as bare:

    codex resume <THREAD_ID>

    In my testing, the safe path was specifically codex --remote ... resume, where the TUI behaves as a client of the already-running canonical app-server rather than starting an independent local continuation.

    I have only verified this on my own macOS environment with 0.147.0, so I would treat it as observed behavior rather than a documented stability guarantee.

    AI assistance disclosure: The investigation and test design were largely AI-guided by ChatGPT (OpenAI) and Claude Code (Anthropic). Claude Code executed much of the terminal-side diagnostic work; I provided the environment and personally verified the phone-side behavior.

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

    CLIIssues related to the Codex CLITUIIssues related to the terminal user interface: text input, menus and dialogs, and terminal displayenhancementNew feature or requestremotesessionIssues involving session (thread) management, resuming, forking, naming, archiving

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions