Windows: folder links in Codex force File Explorer's left navigation pane/tree open despite saved preferences
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 125k
- Forks
- 19.4k
- PR merge metrics
- PR metrics pending
Description
What version of the Codex App are you using?
Windows package version: 26.901.6511.0 (OpenAI.Codex,x64).
Bundled app package.json version: 26.901.51231.
These versions were read from the installed package rather than the About dialog.
What subscription do you have?
Not provided in this report.
What platform is your computer?
Windows 10 Pro 22H2,x64,build 19045.4529. Traditional Chinese Windows UI. Local Windows workspace.
What issue are you seeing?
Clicking a local folder link in a Codex response opens File Explorer with the left navigation pane/tree opened or expanded despite the user's saved preference. The affected pane is the left folder navigation tree. The user initially described it as a preview pane.
Closing the Explorer window opened by the Codex link and opening Explorer normally preserves the user's preferred state. The problem was repeatedly observed with links from Codex. It makes ordinary folder links disruptive because the user must keep correcting the Explorer layout.
The following values stayed at 0 before and after the problematic clicks:
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced
NavPaneExpandToCurrentFolder = 0
NavPaneShowAllFolders = 0
There is no evidence that Codex persistently changed these two preferences. The unwanted behaviour appears associated with how the Explorer window is opened.
What steps can reproduce the bug?
①In Windows File Explorer,disable automatic expansion to the current folder and leave the left navigation pane/tree in the preferred hidden or collapsed state.
②Close the Explorer window.
③Ask Codex to return a clickable link to an existing local folder. The tested links were Markdown directory links. A sanitised example using the same syntax is [open folder](</D:/example/project/output>); substitute an existing directory.
④Click the link in the Codex response.
⑤Observe that Explorer opens the left navigation pane/tree or expands the folder hierarchy against the saved preference.
⑥Close that window and open the same directory normally in Explorer. Compare the navigation pane/tree state.
What is the expected behavior?
Opening a folder link from Codex should preserve the user's Explorer navigation pane visibility and expansion preferences,just as opening the folder normally does.
Additional information
A local workaround resolved the behaviour in this session:
HKCU\Software\Classes\Folder\shell\explore
LaunchExplorerFlags = DWORD 0
Before the workaround,the effective merged value at HKCR\Folder\shell\explore\LaunchExplorerFlags was 24 (0x18). There was no per-user override. The original state was backed up before adding the override.
After applying the per-user override,the effective merged value was verified as 0. Both Explorer Advanced preferences above remained 0. The user then tested four different folder links at different directory depths,closing the test window between clicks,and confirmed that all four worked correctly.
This is a session-verified workaround,not a proposed permanent product fix. It changes the current user's folder explore verb behaviour for other applications too. Persistence across reboot has not been tested.
Read-only inspection of the installed desktop bundle found that its Windows file-manager handler calls Electron shell.openPath() for an existing directory and shell.showItemInFolder() for a file. The directory handler was p0() in .vite/build/main-DpnWwRdP.js in this build. Upstream Electron/Chromium code suggests the directory path can use the Windows explore verb. Please investigate whether that launch path forces navigation pane visibility or tree expansion.
The exact native cause and individual flag bits have not been proven. Direct explorer.exe launches both with a plain directory argument and with /e preserved the collapsed tree in our checks. Separate ShellExecuteEx tests returned success without a verifiable new target window,so those tests were inconclusive and are not evidence of equivalence to the real Codex click.
Please make the app's folder-opening behaviour respect Explorer preferences without requiring users to override Windows registry values. This report uses sanitised example paths and does not include private project files or conversation logs.
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
Start with the directory handler p0() in .vite/build/main-DpnWwRdP.js and trace its Electron shell.openPath() path for existing folders. Reproduce with the Markdown directory links on Windows, comparing Explorer's saved navigation settings before and after each click. Done means folder links open without forcing the navigation pane or tree to expand, without requiring a registry override.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- electron, javascript
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100