Patches the OpenAI Codex VS Code extension so thread/list requests are filtered by the current VS Code workspace folders.
- Workspace open: Recent Tasks and native session picker surfaces show sessions for the current workspace folder or folders.
- No workspace open: Codex keeps showing the normal global
~/.codexhistory. - Existing sessions stay in the shared Codex home.
codexCLI usage is unchanged.
Codex already records cwd for sessions, and thread/list already accepts a cwd filter as a string or an array of strings.
This extension patches three thread/list call sites in the OpenAI Codex VS Code extension:
- Main Codex Recent Tasks webview bridge.
- Native VS Code ChatSession provider.
- Conversation preview loader.
The injected filter uses the Codex extension's existing workspace-root helper, so it follows the same path normalization behavior as Codex itself.
On patch, this extension writes an exact backup next to the Codex extension entrypoint:
out/extension.js.codex-workspace-filter.bak
If this extension is disabled or uninstalled, the injected bootstrap restores that backup and restarts the extension host.
Important: use only global Enable/Disable for this extension. Do not use workspace-specific Enable/Disable. The extension must run in the workspace/remote extension host, but the patch itself affects the installed OpenAI Codex extension in that extension host.
The patch is reapplied after Codex extension updates overwrite out/extension.js.