`/resume` picker does not show CWD filter when Codex is launched with `--remote ... --cd`
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?
- Start a Codex App Server.
- Launch a remote Codex TUI with an explicit cwd:
``bash``
codex --remote ws://127.0.0.1:<port> --cd /path/to/repo
- Confirm the TUI status line shows
/path/to/repo. - Open
/resume. - Observe that the picker only shows
Filter: [All], notFilter: [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.rstui/src/app/event_dispatch.rstui/src/lib.rstui/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.
6 Comments
I traced this to the separate app-server session that
/resumecreates for the picker.The active remote TUI session has
AppServerSession::remote_cwd_override()populated from--cd, and the picker already derives its CWD filter fromapp_server.remote_cwd_override(). ButAppEvent::OpenResumePickerstarts a fresh picker session throughstart_app_server_for_picker(...)without carrying the active session's override over, so the picker seesNoneand renders only[All].Minimal fix I tested: pass the active session's
remote_cwd_overrideintostart_app_server_for_pickerand apply it to the returned temporaryAppServerSession.Branch/commit with the fix: https://github.com/SakshamKapoor2911/codex/commit/66d9d74cc2b824f9f789a9339214d66e58603f1f
Validation:
just fmtjust test -p codex-tui picker_app_server_preserves_remote_cwd_overridejust fix -p codex-tuiI also ran
just test -p codex-tui; the new regression test passed, but the full local run had unrelated environment/snapshot failures (ide_contextsocket dir permission and existing chatwidget status/title snapshots).Thanks for bringing attention to this issue @SakshamKapoor2911, I hope that we can get this fixed soon.
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.
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.
Additional independent reproduction on the current stable release.
Environment
@openai/codex 0.148.0(stable/latest as of 2026-08-20)codex --remote unix:///path/to/app-server.sock -C /path/to/repo/resumeObserved behavior
The active TUI has the correct repository cwd, but opening
/resumerenders only:There is no
Cwdchoice. As a control, starting the standalone picker from the repository withcodex resumeexposes the expectedCwd / Allchoices.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
mainat312b62ac95335e1762b70ceb8910374965bd2785on 2026-08-20. The relevant path remains unchanged:AppEvent::OpenResumePickercreates a temporary picker session viastart_app_server_for_picker(...).start_app_server_for_picker(...)returns a newAppServerSessionwithout carrying over the activeremote_cwd_override.run_resume_picker_with_launch_context(...)derives the remote cwd filter fromapp_server.remote_cwd_override().None, the filter mode collapses toAlland 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.
Wish we could get some attention on this.