Codex Context Studio
A visual, editable context management panel for Codex. Better context compression, smarter compression strategies, automatic context organization suggestions, and system prompt…
Install
git clone https://github.com/HaShiShark/codex-context-studioInstall command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →Codex Context Studio
🧠 Context Control Panel for Codex
Make Codex's context visible, locatable, and precisely manageable — like memory.
Features · Architecture · Install · FAQ
English · 中文
⚡ In One Line
This project lets you see Codex's context consumption, what's retained after compression, and edit it yourself. It also lets you replace Codex's system prompt to break through Codex's limitations, and replace Codex's compression prompt for better compressed output.
🎯 Core Features
🔬 Context Visualization — See Inside Codex's Brain
View Codex's context by role, check token usage per turn, and see when prompts are injected.
✂️ Context Management — Take Over Codex's Memory
Chat with a dedicated secondary model to analyze, edit, compress, and manage the main Codex's context. You can plug in a cheap secondary model.
💡 Automatic Context Maintenance — Stay Focused Without Losing Memory
Automatically maintain Codex's context by compressing completed or unrelated history while preserving key decisions, constraints, current task state, and useful working memory. Codex stays focused without losing important context.
📈 Usage Panel — How Much Did This Session Cost?
View token consumption, cache hit rate, and estimated cost across your Codex session.
🔀 Prompt Replacement — Rewrite Codex's Default Prompts
Replace Codex's system prompt and native compression prompt for jailbreaking and better compression quality.
🔌 Local Proxy — Transparent, Non-Invasive
No Codex source code changes, no official tools replaced. Sits in the middle as a local proxy, compatible with all native features.
📸 Screenshots
Context Map & Secondary Model Chat
Context Compression Result
Automatic Context Maintenance
Prompt Replacement
Usage Panel
🏗️ Architecture
flowchart LR
CD["Codex CLI / Desktop"]
PX["Responses Proxy\n:8787"]
WEB["Web Backend\n:8765"]
FE["React Workbench"]
OAI["OpenAI API / Upstream Model"]
CD -- "POST /v1/responses" --> PX
PX -- "Rebuilt request" --> OAI
OAI -- "SSE stream" --> PX
PX -- "SSE stream" --> CD
FE -- "HTTP edit/settings" --> WEB
WEB -- "HTTP proxy control" --> PX
PX -. "WebSocket realtime events" .-> FE
How It Works:
Every Codex request follows the same path — there is no "pass-through if unedited" branch:
flowchart LR
A["Codex sends request"] --> B["cursor diff"] --> C["Update transcript"] --> D["Rebuild input"] --> E["Forward upstream"]
- Transcript is the single source of truth: what users see in the workbench, edit, and what ultimately gets sent upstream
- Without edits, the rebuilt input is naturally equivalent to the original Codex input
- With edits, upstream receives the edited transcript + new content from the current turn
- During compression, Codex's native compression prompt is replaced with a custom version, and the result is written back to the transcript
🚀 Quick Start
1. Install
Download and run the latest Windows installer from Releases.
2. Enable CLI Proxy
codex ctx proxy on # Enable proxy
codex # Use Codex normally
codex ctx proxy status # Check status
codex ctx proxy off # Disable proxy
3. Desktop Support
Similar plugs
CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies
Bash is all you need - A nano claude code–like 「agent harness」, built from 0 to 1
Documented system prompts from Anthropic - Claude Fable 5.1, Opus 5.5, Claude Design, Claude Code. OpenAI - ChatGPT GPT-6-Astra, Codex. Google - Gemini 3.8 Flash, 3.1 Pro,…
Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build, Muse Code, Devin as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini…