codex-temporary-mode
v3.5.0
Published
Temporary chats and local Delta and Pipeline Mode acceleration for Codex
Maintainers
Readme
codex-temporary-mode
Temporary Codex chats, plus an optional local coding accelerator for Delta Mode and Pipeline Mode.
Unofficial project. Not affiliated with or endorsed by OpenAI.
Get started in 60 seconds
npm i -g codex-temporary-mode
cd /path/to/your/git-repository
codex-temporary-mode setup --all
codex-temporary-mode doctorsetup --all installs the bundled VS Code companion, applies the compatible Temporary Mode patch, and configures the current Git project's optional MCP accelerator. It changes the local VS Code extensions and the project's .codex/ files. setup without --all remains the existing combined-command alias. doctor is read-only and reports exactly what was found.
Want just one feature instead?
- Keep VS Code controls through Codex updates:
codex-temporary-mode companion install - Do not save a local VS Code Codex conversation:
codex-temporary-mode temporary install - Use temporary chats in the terminal: run
codex-temporary-mode - Reduce repeated file/context output and run checkpoints:
codex-temporary-mode accelerator setup
Feature and client support
| Feature | Codex CLI | VS Code Codex | ChatGPT desktop | ChatGPT web | | --- | --- | --- | --- | --- | | Temporary Mode | Yes | Yes | No | No | | Delta Mode (local MCP) | Yes | Yes | Yes | No | | Pipeline Mode (local MCP) | Yes | Yes | Yes | No |
Temporary Mode and the accelerator are separate: the VS Code patch enables temporary local chats, while the accelerator is a project-scoped local MCP server. Use codex-temporary-mode doctor --json for a support-friendly, machine-readable local report.
Use Codex without saving one-off conversations to your chat history.
Works with:
VS Code Codex — adds a Temporary mode to new chats.
Codex CLI — starts temporary terminal chats.
Codex MCP clients — expose an optional local Delta Mode accelerator.
Detailed installation
Requirements:
- Node.js 22.13+
- Codex installed and signed in
- A structurally compatible local VS Code Codex extension for Temporary Mode; run
doctorafter extension updates
Install globally:
npm i -g codex-temporary-mode
cd /path/to/your/repository
codex-temporary-mode setup --allsetup --all performs these local steps:
Installs or updates the bundled Codex Temporary Companion in VS Code.
Enables Temporary Mode in the installed VS Code Codex extension.
Adds the Delta and Pipeline MCP server to the trusted project's
.codex/config.toml.Generates
.codex/accelerator.jsonwhen standard Node.js, Cargo, or .NET validation commands can be detected.
Run setup once in each repository where you want Delta and Pipeline Mode, then restart Codex or reload VS Code once. The generated MCP configuration uses the exact repository path, so validation cannot silently move to another workspace.
On Windows, use
npm.cmdif PowerShell blocksnpm.
VS Code
If you enabled VS Code support during installation, start a new Codex chat and turn on Temporary.
The local new-chat composer and VS Code status bar both have a Temporary toggle. In the current composer, the toggle sits inside the chat box, above the text input. The composer toggle clears prewarmed threads when switching modes, so the next message uses the selected mode. Existing chats keep their original mode and temporary chats show a Temporary chat label.
Temporary conversations are not saved after VS Code restarts. The original composer layout also highlights the input in purple.
If you skipped VS Code setup during installation, run:
codex-temporary-mode temporary installThen reload VS Code once.
After an explicit install, launching a temporary terminal chat with codex-temporary-mode performs a lightweight compatibility check. Opening VS Code alone does not run this npm repair check. If a Codex extension update removed the patch and the new bundle still matches a known structural profile, the patch is restored automatically. Incompatible layouts are left untouched and reported by doctor; no background daemon is installed.
You can also inspect or retry the patch directly:
codex-temporary-mode temporary check
codex-temporary-mode temporary reapplyIf you change Temporary Mode from the status bar or Command Palette, reload VS Code before starting the next chat.
Keep controls available through Codex updates
Codex updates replace the extension files modified by Temporary Mode. The optional Codex Temporary Companion installs separately, keeping its commands and status control available when Codex updates. It checks the active Codex extension at startup and on extension changes, repairs compatible bundles after a previous explicit patch installation, and offers a temporary terminal chat when the embedded UI is unsupported.
The companion VSIX is included in the npm package. setup --all installs it automatically. Install or update just the companion without changing project configuration:
npm i -g codex-temporary-mode@latest
codex-temporary-mode companion installThe installer uses VS Code on PATH or its standard local installation. Use --code-path <absolute CLI path> for another installation and --profile <name> for a named profile; these options also work with setup. If VS Code CLI is unavailable, the installer prints the bundled VSIX path for Extensions: Install from VSIX.... The same versioned VSIX is attached to GitHub releases.
After a new npm release, rerun companion install to update the companion. This release is distributed through npm/VSIX, not the VS Code Marketplace. Codex updates do not remove the companion; substantial internal Codex changes may still require a companion update.
Reload VS Code, then use Temporary Chat: Open Controls. A first-time patch installation uses Temporary Chat: Repair Embedded Toggle. A successful repair requires another reload to load the changed Codex files. The adapter has been source-validated against Codex 26.930.51102.
The companion survives replacement of Codex's files; the embedded patch cannot guarantee support for every future internal layout. Unsupported layouts leave the patch unapplied and the terminal option available. The terminal client requires Node.js 22.13+, Codex CLI on PATH, and an existing login; it uses a read-only sandbox by default and still depends on the Codex app-server protocol. See companion setup and limitations.
Terminal
Start a temporary Codex chat:
codex-temporary-modeUseful commands:
/new Start a new temporary chat
/exit ExitBy default, Codex cannot modify your files.
To allow file changes:
codex-temporary-mode --workspace-writeSee all options:
codex-temporary-mode --helpDelta Mode (v0.1)
Delta Mode is a separate local MCP process. It does not patch Codex and it does not intercept native tools. It exposes five tools:
read_file_delta— exact full text on first read, then unchanged markers or textual diffsrun_command_delta— compact, deterministic diagnostic changes between compatible runsget_raw_output— paged access to retained stdout/stderr when compact output is insufficientreset_context_generation— forces full source rehydration after compaction, resume, or uncertaintyget_acceleration_stats— exact session byte savings for source delivery and compact command results
File responses report exact full-source, delivered-text, and saved-text byte counts. These measure transmitted source or diff text, not estimated model tokens.
The accelerator setup command adds the STDIO server automatically:
codex-temporary-mode accelerator setupcodex-temporary-mode setup --skip-vscode remains available for existing scripts. For manual setup, use a trusted project's .codex/config.toml:
[mcp_servers.codex_accelerator]
command = "codex-accelerator"
args = ["mcp", "--workspace", "."]
cwd = "/absolute/path/to/repository"
default_tools_approval_mode = "writes"
tool_timeout_sec = 1800
env_vars = ["CODEX_ACCELERATOR_EPHEMERAL"]The ChatGPT desktop app, Codex CLI, and Codex IDE extension share local MCP configuration. Restart the relevant client after adding the server, then use /mcp where available to verify the accelerator tools.
By default, SQLite state is stored in the OS-local application data directory, never inside the repository. Complete raw command output is retained outside the repository and removed when the MCP session ends. Pass --ephemeral to keep SQLite in memory as well. The codex-temporary-mode terminal client marks configured accelerator children ephemeral; the env_vars entry above allows Codex to forward that marker.
Commands are launched directly with an argument array and no shell. Delta Mode v0.1 rejects batch and PowerShell scripts; on Windows it resolves npm and npx through their JavaScript entry points.
--max-output-bytes is an explicit safety override: when set and exceeded, the command is stopped and the raw result is marked truncated. Without that option, raw output is retained in full for the session.
Pipeline Mode (v0.2)
Pipeline Mode runs deliberately requested validation checkpoints against isolated workspace snapshots. Codex can continue editing while the single local worker validates the captured workspace. Results always identify the exact workspace tested; a stale pass never validates newer code.
It adds five MCP tools:
create_checkpoint— capture and queue the current workspaceget_pipeline_status— inspect the active worker and collapsed queueget_latest_validation— retrieve a compact result with current/stale freshnesscancel_checkpoint— cancel queued or active workrun_final_validation— block until the configured final profile validates the current workspace
Validation commands come only from the trusted repository configuration .codex/accelerator.json; MCP calls cannot supply arbitrary commands:
{
"pipeline": {
"maxWorkers": 1,
"profiles": {
"targeted": [
{ "id": "tests", "executable": "npm", "args": ["test"], "parser": "vitest" }
],
"final": [
{ "id": "tests", "executable": "npm", "args": ["test"], "parser": "vitest" }
]
}
}
}Checkpointing is manual in v0.2. Queued checkpoints for the same profile collapse to the newest workspace, while a running validation is allowed to finish and is reported as historical if the live workspace changed. Raw command output remains available through get_raw_output.
For targeted profiles, Pipeline Mode deterministically derives likely tests from changed JavaScript/TypeScript files, same-name test conventions, and direct relative import consumers. Only commands explicitly configured with the vitest or jest parser receive selected test paths; every other configured command remains unchanged. The selected impact and exact resulting command plan are included in checkpoint identity and results.
Commands in a profile run in order and stop after a failure. Set "continueOnFailure": true on a command when later checks are independent and should still run.
Diagnostics
Run a read-only check before reporting an issue or after a Codex/VS Code update:
codex-temporary-mode doctor
codex-temporary-mode doctor --jsonIt checks the local Node version, Git workspace, Codex CLI (codex mcp list), installed VS Code extension and patch manifest, and the project MCP/Pipeline configuration. It does not modify extension files, configuration, authentication, or workspace data.
Uninstall
Run:
codex-temporary-mode uninstallThis:
- Restores supported VS Code Codex installations
- Removes the Temporary Mode setting
- Uninstalls
codex-temporary-mode
Then reload VS Code once.
Uninstall Codex Temporary Companion separately in VS Code's Extensions view to remove its controls and update checks. Restoring the embedded patch clears its automatic-repair opt-in.
Your normal Codex installation, saved chats, project files, and unrelated VS Code settings are not removed.
Limitations
- Temporary chats cannot be reopened later.
- Files changed during a temporary chat are not reverted.
- Temporary Mode does not guarantee zero retention by OpenAI.
- Terminal mode currently supports text chat only.
- VS Code support currently works with local chats only.
- Temporary-chat patching does not support cloud chats, remote connections, ChatGPT web, or ChatGPT desktop; Delta Mode uses the separate shared local MCP configuration.
- VS Code patching checks the extension, renderer and composer structure.
26.908.40401uses the original composer control;26.917.62051and26.930.51102use the shared Codex composer across sidebar, editor-panel and empty draft views. Installation rejects layouts without a verified composer hook.
