codex - 💡(How to fix) Fix IDE extension: offer "Use session directory" or "Use current directory" when reopening a chat from another cwd [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openai/codex#19938Fetched 2026-04-29 06:25:07
View on GitHub
Comments
1
Participants
2
Timeline
4
Reactions
0
Timeline (top)
labeled ×3commented ×1
RAW_BUFFERClick to expand / collapse

What variant of Codex are you using?

IDE Extension

What feature would you like to see?

When reopening an existing chat in the VS Code Codex extension, if the saved session was created from a different working directory than the current workspace, please offer a directory chooser similar to the CLI.

For example, something like:

  • Use session directory
  • Use current directory

In the CLI, this kind of flow is already supported when resuming from another cwd. Bringing the same choice to the IDE extension would make it easier to continue earlier chats when switching between repositories, monorepo subfolders, or reopened workspaces.

Suggested behavior:

  1. If the saved session directory matches the current workspace, reopen normally.
  2. If it differs, show a prompt before reopening the chat.
  3. Make clear which directory will be used for file access and command execution.

This would bring the IDE extension closer to the CLI experience for session resume.

Additional information

Observed in:

  • VS Code 1.117.0
  • Codex IDE extension 26.422.30944
  • Ubuntu 24.04.4 LTS
  • Codex CLI 0.125.0

I looked for an existing issue focused on this exact IDE behavior and did not find one.

I did find related discussions about session resume/history in the IDE, but this request is narrower: when reopening a chat from another cwd, the extension should let the user choose between the saved session directory and the current workspace directory.

Thanks for considering this.

extent analysis

TL;DR

To improve the Codex IDE extension experience, consider adding a directory chooser when reopening a chat session created from a different working directory.

Guidance

  • Review the Codex IDE extension code to identify where the session directory is determined and consider adding a conditional check to compare it with the current workspace directory.
  • If the directories differ, design a prompt to offer the user a choice between using the saved session directory or the current directory for file access and command execution.
  • Ensure the prompt clearly indicates which directory will be used to avoid confusion.
  • Consider consulting related discussions about session resume/history in the IDE for potential insights or existing solutions that could be adapted.

Example

No specific code example can be provided without access to the Codex IDE extension's source code, but the solution likely involves modifying the session reopening logic to include a directory comparison and user prompt.

Notes

The exact implementation details may depend on the internal architecture of the Codex IDE extension and how it handles session management and directory interactions.

Recommendation

Apply a workaround by manually adjusting the workspace directory to match the saved session directory before reopening the chat, although implementing the suggested directory chooser feature would provide a more seamless user experience.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING