Repository navigation
Description
What variant of Codex are you using?
IDE Extension
cc @etraut-openai, opening this as a fresh feature request per your guidance in #17185 (comment).
What feature would you like to see?
In the Codex VS Code extension, chat/thread history should be scoped, grouped, or filtered by the current workspace/project.
Right now, chats from different projects appear together in one shared history list. When working across multiple repositories, VS Code windows, remote workspaces, WSL/SSH sessions, or unrelated codebases, it becomes easy to resume the wrong thread or confuse which chat belongs to which project.
This creates a real workflow problem because Codex threads carry project-specific context. Accidentally continuing a thread from another project can lead to irrelevant suggestions, wrong assumptions, and extra mental overhead.
A useful MVP could be:
- Associate each thread with its originating VS Code workspace folder or working directory.
- Show current-workspace threads first in the extension history.
- Hide, collapse, or visually separate threads from other workspaces.
- Provide an “all threads” view or toggle for users who intentionally want global history.
- Preserve existing thread rename/archive behavior.
This does not need to introduce a full project-management system. The most important behavior is that when I am in Project A, I should not have to scan through chats from Projects B, C, and D to find the relevant Codex thread.
Additional information
This is related to the closed issue #17185, but I am opening a new feature request per maintainer guidance here:
There is also related discussion in #12564, where the VS Code extension recently gained thread renaming. Renaming helps, but it is only a mitigation for the broader issue: chats from unrelated projects are still mixed together.
A commenter noted that Codex CLI already appears to have working-directory-based isolation by default, with codex resume --all available for showing all threads:
If that is accurate, the VS Code extension could potentially reuse the same working-directory concept and expose it in the extension history UI.
Activity
github-actions commentedon May 30, 2026
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
whatsupbros commentedon May 30, 2026
I agree this is a natural fit for the next step after adding the capability to rename threads.
One important thing though, that if filtration of threads by working directory is added to VS Code extension, there also should be a way to "Show All". Because, for instance, if you move or copy a project to a different directory, there should be a way to resume the old thread about this project in the new location as well.
daxliniere commentedon May 30, 2026
This has my vote. When I'm working on an Arduino project, I don't need to see web development threads.
JohnnyBill commentedon Jun 2, 2026
That would be so nice, especially for linux users that still don't have the app :)
dyunwei commentedon Jun 6, 2026
This is very important for those working across multiple projects.
max5800 commentedon Jun 6, 2026
I want to add a more severe real-world impact case here.
This is not just a history/navigation issue. In my setup, Codex chat sessions appeared to leak across multiple VS Code windows and repositories, and this resulted in unintended changes being applied across multiple repos.
Environment:
Setup:
Current local evidence, redacted:
.github/dependabot.ymlfiles.Impact:
In my view this should be treated as a bug / safety issue, not only an enhancement request. Other coding assistants such as Claude and GitHub Copilot handle multi-window / multi-repo project separation in a way that does not expose the same kind of cross-repo session confusion.
Expected behavior:
Related issues:
xsjk commentedon Jun 7, 2026
I think #25319 should be separated from full multi-root workspace support in #2909.
Multi-root is hard because VS Code can have many workspace folders in one window, while a Codex core session still has one effective
cwd. That is a real model mismatch, and fixing it properly probably belongs in #2909.But the common single-root VS Code workspace case is much simpler. Codex already records cwd for each session, and
thread/list.cwdalready supports filtering by cwd.So the VS Code extension can fix the main #25319 problem by passing the current workspace folder / effective cwd into its
thread/listrequests. When no workspace folder is open, it can keep showing the global history; multi-root can keep today's effective behavior for now and leave true multi-root semantics to #2909.Until there is an official fix, Codex Workspace Filter can be used as a small workaround.
zsxm1998 commentedon Jun 8, 2026
I am curious about why this feature is not supported until now. When open codex in vscode, it is hard to find the thread I want from hundred of my chats.
omry commentedon Jun 8, 2026
Because #17185 didn't get enough interest from the community.
Please upvote this one.
xionghaizhi commentedon Jun 8, 2026
+1. I strongly support this request.
I use the Codex VS Code extension across multiple repositories and VS Code windows every day, and the current global mixed history makes the extension much harder to use than it should be.
The main issue is that Codex threads are project-specific by nature. A thread usually contains assumptions about a particular repository, file structure, build system, dependencies, and task context. When threads from unrelated projects all appear in one shared history list, it becomes very easy to reopen or continue the wrong conversation.
This is not just a small navigation inconvenience. It creates real workflow risk:
The CLI already appears to have a better mental model here by scoping resume behavior around the working directory, with an option to show all sessions. The VS Code extension should follow a similar model.
A good MVP would be:
This would make the extension much safer and easier to use for people who work across multiple active projects. Right now, the lack of project/workspace separation is one of the biggest sources of friction in the VS Code extension.
Efs-O commentedon Jun 20, 2026
For anyone affected by this before an upstream fix lands, I published a small experimental workaround:
https://github.com/Efs-O/codex-sessions-workspace-patch-kit
Current pre-release:
https://github.com/Efs-O/codex-sessions-workspace-patch-kit/releases/tag/v0.4.0
It patches the shipped
openai.chatgptVS Code extension bundle locally so Codex session history is filtered to the active VS Code workspace roots. It also widensthread/listrequests before filtering, so older matching workspace sessions are less likely to be hidden behind newer sessions from unrelated workspaces.Compatibility note: this has been tested locally against
openai.chatgpt 26.616.xextension bundles. It is a pre-release workaround, not an upstream source patch. Because it patches minified shipped extension code, a new Codex/VS Code extension version can overwrite the patch or change the anchors so the patch no longer applies.Please run the dry-run flow before applying:
To undo it:
Feedback would be very helpful, especially reports about version drift, missing anchors, and workspace-history edge cases.
AbrahamWilton commentedon Jun 20, 2026
This is soo usefull! thanks. I just tested a few moments and works like a charm, but I have a question, this fix will only separated just at visual level or will separate at logical level, like you know, codex will not mix context or will do?
38 remaining items
omry commentedon Oct 13, 2026
@etraut-openai: Is this getting close to sufficient user support to prioritize?
Thanks.
chrishaly commentedon Oct 14, 2026
I support workspace-scoped session filtering.
One additional request: please provide an option to automatically restore
the last active session for each workspace when opening the Codex extension.
Each workspace should remember its own last active session independently.
At minimum, the session picker should offer a "Current workspace only"
filter and remember that preference.
mklilley commentedon Oct 15, 2026
I support this request too 🙏
tnoetzel commentedon Oct 15, 2026
Please implement this. It's a serious problem impacting any dev with more than one project... which is, presumably, most serious devs.
geraldnguyen commentedon Oct 16, 2026
Supporting this feature request.
GH copilot separated chats from different projects. I was shocked to find this feature wasn't available.
DImagine commentedon Oct 16, 2026
+1 Supporting this feature request.
indhra commentedon Oct 17, 2026
is this fixed?
AwinHuang commentedon Oct 21, 2026
Adding my use case: please support organizing and filtering Codex conversations by the active VS Code workspace, including multi-root
.code-workspaceworkspaces.I use VS Code workspaces to group multiple folders for a project. However, conversations created while working in one workspace are still visible when I switch to another workspace, leaving unrelated project conversations mixed together.
Expected behavior
The important distinction is that a VS Code workspace can contain several folders or repositories. Filtering only by a single chat's working directory would not fully address this workflow; the conversation list should respect the workspace association.
This should work through the normal VS Code workspace-opening flow, without requiring separate
CODEX_HOMEdirectories, separate VS Code user-data directories, duplicated configuration, or custom launch shortcuts. Manually prefixing conversation names helps identify them but does not remove unrelated conversations from the list.Environment: Windows x64, VS Code 1.142.0, Codex extension (
openai.chatgpt) 26.1007.21434.The requested improvement is workspace-based conversation organization and visibility filtering; a separate account or security boundary is not required.
Grapehool commentedon Oct 21, 2026
I support this feature request. This is a critical feature, please implement this!
yfNJU commentedon Oct 24, 2026
I strongly support this request too!
balabommablock-cpu commentedon Oct 27, 2026
Reading the 55 comments, people want three things, in this order:
.code-workspacesupport, and later, reopen the last thread for each workspace.The CLI already does #1 with
cwd, andthread/listtakes acwdfilter. But that filter is an exact match, so a thread started inrepo/packages/webwon't show in a window opened atrepo, and multi-root needs a list of paths.The app-server also has experimental projects now (#38940): a project has ordered roots,
thread/starttakes aprojectId, andthread/listcan filter by it. That looks like a close fit for a VS Code workspace:.code-workspacefile) maps to one project, with its folders as rootsprojectId, and the history list filters by it, with "All projects" as the escape hatchcwdunder any root, so history doesn't look empty after the updateSmallest first version: filter to the current project, add the "All projects" toggle, and show a folder label on each thread. Last-thread restore can come later.
I can't see the extension code, so I may be missing why this is harder there. Could a maintainer say whether projects are the intended path?
harishsk commentedon Nov 3, 2026
I would also like this feature in the Codex VS Code extension. When I open different project folders, I see Codex chats from all my projects together, which makes it harder to find the conversations relevant to the folder I am working in.
Please add a “Current project / All projects” filter to the chat history, default to the current project folder, and remember the selection per VS Code workspace. Chats from other projects should remain available through the explicit “All projects” option.
My goal is to keep each project's chat list local to that project when switching folders in VS Code.
cixiangtao commentedon Nov 3, 2026
@harishsk The “Current project / All projects” switch with a per-workspace preference is exactly the workflow I built Codex Project Chats for. Disclosure: I’m the author.
Following up on the patch-based workaround I shared earlier in this issue, this is now available as a standalone companion extension:
Install: VS Code Marketplace
Source and screenshots: GitHub
It adds a separate project-history view without modifying the official extension. Current-project matching uses exact workspace-root directories, including multiple roots; subdirectories and worktrees remain separate groups accessible through All projects.
End-to-end verification currently covers macOS Apple Silicon; other platforms and remote workspaces are not yet verified end to end. This is an independent, unofficial project, and the grouping is for navigation, not a sandbox or access-control boundary.
I still support adding this directly to the official history UI; sharing this as an available workaround in the meantime.
onemsg commentedon Nov 12, 2026
Adding another concrete use case for this request from VS Code on macOS / Apple Silicon, with Codex extension
openai.chatgptversion26.1106.51428.When I open the chat history in Project A, conversations created in Projects B and C are also listed. I want to see only the current project's conversations while working in that project. Scanning unrelated history adds friction when switching between repositories.
A small, focused UI improvement would address this:
The key acceptance case is: with Project A open, selecting Current project hides conversations from unrelated Projects B and C; switching to All projects makes those conversations accessible again.
Posting here to support the existing tracking issue rather than opening a duplicate.
raulcarlomagno commentedon Nov 13, 2026
Hi, I think that this issue must have high priority, it's a basic feature....