`/resume` picker does not show CWD filter when Codex is launched with `--remote ... --cd`

Open 💬 6 comments Opened Jul 6, 2026 by coalio

What version of Codex CLI is running?

codex-cli 0.142.5

What subscription do you have?

Pro

Which model were you using?

N/A

What platform is your computer?

Linux 6.6.87.2-microsoft-standard-WSL2 x86_64 x86_64

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

remote TUI via App Server, third-party Neovim plugin launching codex --remote ... --cd <cwd>

Codex doctor report

N/A

What issue are you seeing?

When Codex is launched normally from a terminal inside a repo, the /resume picker correctly shows both filter modes:

  • [Cwd]
  • All

However, when Codex is launched through a remote App Server flow, the active cwd is displayed correctly in the Codex status line, but the /resume picker only shows:

  • [All]

This happens even though the remote TUI is launched with an explicit cwd using --cd.

What steps can reproduce the bug?

  1. Start a Codex App Server.
  2. Launch a remote Codex TUI with an explicit cwd:

``bash
codex --remote ws://127.0.0.1:<port> --cd /path/to/repo
``

  1. Confirm the TUI status line shows /path/to/repo.
  2. Open /resume.
  3. Observe that the picker only shows Filter: [All], not Filter: [Cwd] All.

For comparison:

cd /path/to/repo
codex

Then opening /resume shows the expected [Cwd] filter.

What is the expected behavior?

If Codex is launched with:

codex --remote ws://127.0.0.1:<port> --cd /path/to/repo

then /resume should treat /path/to/repo as the current working directory and show the [Cwd] filter option, the same way plain codex or codex resume does when started from that directory.

Additional information

From reading the current source, the resume picker only shows [Cwd] when its filter_cwd is populated. For remote workspaces, filter_cwd appears to come from app_server.remote_cwd_override().

The main remote TUI session receives remote_cwd_override from --cd, but when /resume is opened from an existing session, Codex starts a separate picker App Server session via start_app_server_for_picker(...). That picker session does not appear to receive the existing remote cwd override, so filter_cwd ends up None, causing the picker to collapse to Filter: [All].

Relevant areas I looked at:

  • tui/src/resume_picker.rs
  • tui/src/app/event_dispatch.rs
  • tui/src/lib.rs
  • tui/src/app_server_session.rs

The fix may be to propagate the active remote cwd override into the picker App Server session used by /resume.

View original on GitHub ↗

6 Comments

SakshamKapoor2911 · 1 month ago

I traced this to the separate app-server session that /resume creates for the picker.

The active remote TUI session has AppServerSession::remote_cwd_override() populated from --cd, and the picker already derives its CWD filter from app_server.remote_cwd_override(). But AppEvent::OpenResumePicker starts a fresh picker session through start_app_server_for_picker(...) without carrying the active session's override over, so the picker sees None and renders only [All].

Minimal fix I tested: pass the active session's remote_cwd_override into start_app_server_for_picker and apply it to the returned temporary AppServerSession.

Branch/commit with the fix: https://github.com/SakshamKapoor2911/codex/commit/66d9d74cc2b824f9f789a9339214d66e58603f1f

Validation:

  • just fmt
  • just test -p codex-tui picker_app_server_preserves_remote_cwd_override
  • just fix -p codex-tui

I also ran just test -p codex-tui; the new regression test passed, but the full local run had unrelated environment/snapshot failures (ide_context socket dir permission and existing chatwidget status/title snapshots).

coalio · 1 month ago

Thanks for bringing attention to this issue @SakshamKapoor2911, I hope that we can get this fixed soon.

snf · 13 days ago

Confirmed this still reproduces in 0.147.0, 0.148.0-alpha.16, and current main. I independently validated the proposed root cause: the temporary app-server session created by in-session /resume loses the active session remote_cwd_override. Propagating that value restores the [Cwd] filter and sends the expected thread/list.cwd value. I verified the fix end-to-end using a remote WebSocket TUI. Happy to prepare a focused PR with regression coverage if a maintainer confirms the approach and explicitly invites the contribution.

snf · 13 days ago

I prepared the focused fix and pushed it here: https://github.com/openai/codex/compare/main...snf:fix/remote-resume-cwd (commit 27a2c3341b528de8d6e2ef435762cfdd2510734d).

It propagates the active remote_cwd_override into the temporary resume-picker app-server session and adds regression coverage. Validation completed successfully: focused regression test, all 3,537 codex-tui tests, formatting, and targeted Clippy.

I attempted to open the PR, but GitHub rejected it because this repository currently has pull_request_creation_policy set to collaborators_only. If a maintainer would like the change submitted as a PR, please invite or enable this contribution and I will open it immediately.

catchmeee2002 · 8 days ago

Additional independent reproduction on the current stable release.

Environment

  • Observed on: @openai/codex 0.148.0 (stable/latest as of 2026-08-20)
  • Platform: Linux x86_64
  • Launch shape: codex --remote unix:///path/to/app-server.sock -C /path/to/repo
  • Surface: in-session TUI /resume

Observed behavior

The active TUI has the correct repository cwd, but opening /resume renders only:

Filter: [All]

There is no Cwd choice. As a control, starting the standalone picker from the repository with codex resume exposes the expected Cwd / All choices.

This confirms that the issue also affects a remote app-server reached through an official unix:// endpoint, not only the WebSocket case in the original report.

Current upstream verification

I also checked the current upstream main at 312b62ac95335e1762b70ceb8910374965bd2785 on 2026-08-20. The relevant path remains unchanged:

  • AppEvent::OpenResumePicker creates a temporary picker session via start_app_server_for_picker(...).
  • start_app_server_for_picker(...) returns a new AppServerSession without carrying over the active remote_cwd_override.
  • run_resume_picker_with_launch_context(...) derives the remote cwd filter from app_server.remote_cwd_override().
  • When that value is None, the filter mode collapses to All and the UI renders only the active value.

Root-cause status: confirmed from the current source path and the live reproduction. No local patch was applied.

coalio · 3 days ago

Wish we could get some attention on this.