Skip to content

Commit 0ea4522

Browse files
committed
Release v1.1.0
1 parent f371eef commit 0ea4522

25 files changed

Lines changed: 668 additions & 327 deletions

GITHUB_RELEASE.md

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,24 @@
1-
# Codex Context Proxy v1.0.0
2-
3-
A visual, editable context layer for Codex. Let AI edit AI's context with surgical precision, giving you more control and freedom over what Codex sees.
4-
5-
## What's Included
6-
7-
- Fixes for Python environment setup and dependency installation
8-
- `npm run setup:python` for creating and updating the local `.venv`
9-
- Test scripts now prefer the project `.venv` when available
10-
- Added Brotli and zstandard runtime dependencies for compressed responses
11-
- Visual context map for Codex sessions
12-
- Token overview for current context usage
13-
- Manual context inspection and editing panel
14-
- AI-assisted context compression for noisy tool output
15-
- More reliable compact/override handling after Codex `/compact`
16-
- Safer whole-node compression for tool-heavy assistant turns
17-
- Codex CLI support through `codex ctx proxy on/off/status`
18-
- Experimental Codex Desktop support through `codex ctx desktop on/off/status`
19-
- Windows installer with bundled Electron app and Python backend
1+
# Codex Context Studio v1.1.0
2+
3+
A visual, editable context layer for Codex. This release focuses on the Context Studio identity, clearer bilingual documentation, and safer transcript rebuilding for newer Codex request metadata.
4+
5+
## What's New
6+
7+
- Renamed the user-facing project identity to Codex Context Studio
8+
- Reworked the English and Chinese READMEs with updated feature descriptions, architecture diagrams, and screenshots
9+
- Moved screenshots into language-specific folders for clearer documentation
10+
- Preserved Codex internal turn metadata and turn IDs when rebuilding request input
11+
- Added support for `custom_tool_call.namespace` during response-to-request projection
12+
- Improved compact request metadata detection across differently cased client metadata keys
13+
- Localized grouped tool-call labels in the context workbench
14+
- Expanded proxy core and cursor delta tests for metadata and request rebuild behavior
2015

2116
## Download
2217

2318
Download and run:
2419

2520
```text
26-
Codex Context Proxy Setup 1.0.0.exe
21+
Codex Context Proxy Setup 1.1.0.exe
2722
```
2823

2924
After installation, open a new terminal and enable the proxy:

README.md

Lines changed: 129 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -1,199 +1,208 @@
1-
# Codex Context Proxy
1+
<p align="center">
2+
<img src="electron/assets/hash-icon.ico" alt="Codex Context Studio icon" width="128" height="128">
3+
</p>
24

3-
A visual, editable context layer for Codex. Let AI edit AI's context with surgical precision, giving you more control and freedom over what Codex sees.
5+
<h1 align="center">Codex Context Studio</h1>
46

5-
## What We Built
7+
<p align="center">
8+
<strong>🧠 Context Control Panel for Codex</strong>
9+
<br>
10+
<sub>Make Codex's context visible, locatable, and precisely manageable — like memory.</sub>
11+
</p>
612

7-
Codex Context Proxy gives the official Codex CLI a visual and editable context layer.
13+
<p align="center">
14+
<a href="#-core-features">Features</a> ·
15+
<a href="#-architecture">Architecture</a> ·
16+
<a href="#-quick-start">Install</a> ·
17+
<a href="#-faq">FAQ</a>
18+
</p>
819

9-
Codex is powerful in long coding sessions, but its context can become hard to inspect and harder to maintain. Tool logs, failed attempts, outdated assumptions, and repeated transcript fragments can keep accumulating. When that happens, you usually cannot see exactly what Codex is about to read or selectively remove noisy context before the next response.
20+
<p align="center">
21+
<a href="README.md">English</a> ·
22+
<a href="README.zh-CN.md">中文</a>
23+
</p>
1024

11-
This project adds a local context editor in front of Codex. You keep using the normal Codex workflow, while the proxy captures Codex's live context and opens a workbench where you can visualize, edit, compress, and delete context before future responses.
25+
<p align="center">
26+
<img alt="Electron" src="https://img.shields.io/badge/electron-37-2f7f8f?style=flat-square&logo=electron&logoColor=white">
27+
<img alt="Python" src="https://img.shields.io/badge/python-3.10%2B-3776ab?style=flat-square&logo=python&logoColor=white">
28+
<img alt="React" src="https://img.shields.io/badge/react-19-149eca?style=flat-square&logo=react&logoColor=white">
29+
<img alt="TypeScript" src="https://img.shields.io/badge/typescript-5.9-3178c6?style=flat-square&logo=typescript&logoColor=white">
30+
<img alt="License" src="https://img.shields.io/badge/license-GPL--3.0-555?style=flat-square">
31+
<img alt="Status" src="https://img.shields.io/badge/status-alpha-ff7a1a?style=flat-square">
32+
</p>
1233

13-
In short:
1434

15-
```text
16-
Codex writes code.
17-
Codex Context Proxy helps maintain Codex's context.
18-
```
19-
20-
## What Codex Gets
35+
---
2136

22-
- Context visualization: see the conversation, tool history, and context nodes Codex is about to use.
23-
- Editable context: compress, delete, or rewrite selected context items.
24-
- AI context editing: use a second AI pass to maintain the main AI's context.
25-
- Precise compaction: replace blunt auto-compact with targeted context surgery.
26-
- CLI and Desktop support: use it with Codex CLI, with experimental support for Codex Desktop.
27-
- Normal workflow: continue using Codex from the terminal or desktop app.
37+
## ⚡ In One Line
2838

29-
The context editing workbench is adapted from HashCode. The original project explains the broader "AI edits AI's context" idea in more detail:
39+
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.
3040

31-
https://github.com/HaShiShark/context-editor-agent
41+
---
3242

33-
## Screenshots
43+
## 🎯 Core Features
3444

35-
### Visualize Codex Context and Token Usage
45+
### 🔬 Context Visualization — See Inside Codex's Brain
3646

37-
![Visualize Codex Context](docs/images/context-map.png)
47+
> View Codex's context by role, check token usage per turn, and see when prompts are injected.
3848
39-
### Ask AI to Inspect the Current Context
49+
### ✂️ Context Management — Take Over Codex's Memory
4050

41-
![Edit Context With AI](docs/images/context-workbench.png)
51+
> 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.
4252
43-
### Compress Noisy Tool Context
53+
### 📈 Usage Panel — How Much Did This Session Cost?
4454

45-
![Compress Context](docs/images/context-compress.png)
55+
> View token consumption, cache hit rate, and estimated cost across your Codex session.
4656
47-
## Features
57+
### 🔀 Prompt Replacement — Rewrite Codex's Default Prompts
4858

49-
### Live Context Map
59+
> Replace Codex's system prompt and native compression prompt for jailbreaking and better compression quality.
5060
51-
Codex Context Proxy converts a Codex session into a structured context map. Instead of treating the transcript as one long wall of text, it shows user turns, assistant turns, tool calls, tool results, and edited context nodes as separate items.
61+
### 🔌 Local Proxy — Transparent, Non-Invasive
5262

53-
### AI-Assisted Context Editing
63+
> No Codex source code changes, no official tools replaced. Sits in the middle as a local proxy, compatible with all native features.
5464
55-
You can select noisy or outdated context and ask an editor model to compress, rewrite, or clean it up. This makes it possible to preserve useful intent while removing bulk from logs, failed attempts, or repeated information.
65+
---
5666

57-
### Manual Context Control
67+
## 📸 Screenshots
5868

59-
Not every context edit needs AI. You can also remove selected nodes or inspect raw content manually.
69+
### Context Map & Secondary Model Chat
6070

61-
### Codex CLI and Desktop
71+
![Context map and secondary model chat](docs/images/eng/1.png)
6272

63-
Codex CLI support is the main path. Once enabled, the normal `codex` command starts the local proxy and context window before launching the real Codex CLI.
73+
### Context Compression Result
6474

65-
Codex Desktop support is also included. It can point Codex Desktop's model provider configuration at the local proxy so desktop conversations can use the same editable context layer. Desktop support touches local Codex configuration, so it is controlled separately from the CLI switch.
75+
![Context compression result](docs/images/eng/2.png)
6676

67-
### Transparent Workflow
77+
### Prompt Replacement
6878

69-
When the proxy is off, `codex` passes through to the official Codex CLI. When the proxy is on, the same `codex` command starts the local proxy, opens the context window, and then launches the real Codex CLI.
79+
![Prompt replacement](docs/images/eng/3.png)
7080

71-
## How It Works
81+
### Usage Panel
7282

73-
Codex Context Proxy runs a local Responses API compatible proxy.
83+
![Usage panel](docs/images/eng/4.png)
7484

75-
When Codex sends a request, the proxy captures the request body and response stream, then builds a canonical transcript for the context workbench. If you do not edit anything, requests are forwarded transparently and Codex behaves like normal.
85+
---
7686

77-
When you edit the context, the proxy replaces that session's canonical transcript. On the next Codex turn, it diffs Codex's new raw `input` against the cursor, appends the new tail, and rebuilds the upstream Responses `input` from the edited transcript.
87+
## 🏗️ Architecture
7888

79-
High-level flow:
89+
```mermaid
90+
flowchart LR
91+
CD["Codex CLI / Desktop"]
92+
PX["Responses Proxy\n:8787"]
93+
WEB["Web Backend\n:8765"]
94+
FE["React Workbench"]
95+
OAI["OpenAI API / Upstream Model"]
8096
81-
```text
82-
codex
83-
-> local shim
84-
-> Codex Context Proxy
85-
-> official Codex request
86-
-> OpenAI / ChatGPT Codex backend
97+
CD -- "POST /v1/responses" --> PX
98+
PX -- "Rebuilt request" --> OAI
99+
OAI -- "SSE stream" --> PX
100+
PX -- "SSE stream" --> CD
87101
88-
context window
89-
-> visualize transcript
90-
-> edit selected nodes
91-
-> save edited context
92-
-> next Codex turn uses edited context
102+
FE -- "HTTP edit/settings" --> WEB
103+
WEB -- "HTTP proxy control" --> PX
104+
PX -. "WebSocket realtime events" .-> FE
93105
```
94106

95-
## Quick Start
107+
**How It Works:**
96108

97-
Download and run the Windows installer:
109+
Every Codex request follows the same path — there is no "pass-through if unedited" branch:
98110

99-
```text
100-
Codex Context Proxy Setup 1.0.0.exe
111+
```mermaid
112+
flowchart LR
113+
A["Codex sends request"] --> B["cursor diff"] --> C["Update transcript"] --> D["Rebuild input"] --> E["Forward upstream"]
101114
```
102115

103-
After installation, open a new terminal and enable the proxy:
104-
105-
```powershell
106-
codex ctx proxy on
107-
```
116+
- **Transcript** is the single source of truth: what users see in the workbench, edit, and what ultimately gets sent upstream
117+
- **Without edits**, the rebuilt input is naturally equivalent to the original Codex input
118+
- **With edits**, upstream receives the edited transcript + new content from the current turn
119+
- **During compression**, Codex's native compression prompt is replaced with a custom version, and the result is written back to the transcript
108120

109-
Use Codex normally:
121+
---
110122

111-
```powershell
112-
codex
113-
```
123+
## 🚀 Quick Start
114124

115-
Disable the proxy anytime:
125+
**1. Install**
116126

117-
```powershell
118-
codex ctx proxy off
119-
```
127+
Download and run the latest Windows installer from [Releases](https://github.com/nicobailon/codex-context-studio/releases).
120128

121-
Check status:
129+
**2. Enable CLI Proxy**
122130

123131
```powershell
124-
codex ctx proxy status
132+
codex ctx proxy on # Enable proxy
133+
codex # Use Codex normally
134+
codex ctx proxy status # Check status
135+
codex ctx proxy off # Disable proxy
125136
```
126137

127-
Remove the shim:
138+
**3. Desktop Support**
128139

129140
```powershell
130-
codex ctx proxy uninstall
141+
codex ctx desktop on # Enable Desktop mode
142+
codex ctx desktop status # Check status
143+
codex ctx desktop off # Disable
131144
```
132145

133-
### Codex Desktop
146+
> [!NOTE]
147+
> Desktop mode modifies local Codex provider configuration. CLI mode only adds a shim and does not affect any config files.
148+
149+
---
134150

135-
Desktop support is controlled separately:
151+
## 🛠️ Development
136152

137153
```powershell
138-
codex ctx desktop on
139-
```
154+
# Install dependencies
155+
npm install
156+
npm run setup:python
140157
141-
Check Desktop proxy status:
158+
# Run the full local flow
159+
npm run codex
142160
143-
```powershell
144-
codex ctx desktop status
145-
```
161+
# Run only the context window
162+
npm run window
146163
147-
Disable Desktop proxying:
164+
# Run checks
165+
npm run typecheck
166+
npm test
148167
149-
```powershell
150-
codex ctx desktop off
168+
# Build Windows installer
169+
npm run dist:win
151170
```
152171

153-
Desktop support is more experimental than CLI support because it modifies local Codex configuration instead of only adding a command shim.
172+
---
154173

155-
## Development
174+
## ❓ FAQ
156175

157-
Install dependencies:
176+
<details>
177+
<summary><strong>Is this a Codex plugin?</strong></summary>
158178

159-
```powershell
160-
npm install
161-
npm run setup:python
162-
```
179+
No. Codex Context Studio is a local context layer around Codex, implemented through proxy technology.
163180

164-
Run the local Codex flow:
181+
</details>
165182

166-
```powershell
167-
npm run codex
168-
```
183+
<details>
184+
<summary><strong>Will it break the cache?</strong></summary>
169185

170-
Run only the context window:
186+
Compression is not a frequent event. After compression, it only recalculates once, which is more cost-efficient than carrying useless context. In practice, cache hit rate only drops by 5–10%.
171187

172-
```powershell
173-
npm run window
174-
```
188+
</details>
175189

176-
Run type checks:
190+
<details>
191+
<summary><strong>Why not just rely on auto-compaction?</strong></summary>
177192

178-
```powershell
179-
npm run typecheck
180-
```
193+
Compatible with native compression. The project also helps replace compression prompts — we've built more precise, targeted compression features.
181194

182-
Build the Windows installer:
195+
</details>
183196

184-
```powershell
185-
npm run dist:win
186-
```
197+
<details>
198+
<summary><strong>Who is this for?</strong></summary>
187199

188-
The installer is generated at:
200+
People who want better control over context, have their own ideas about compression, or want to modify Codex's prompts.
189201

190-
```text
191-
release/Codex Context Proxy Setup 1.0.0.exe
192-
```
202+
</details>
193203

194-
## Notes
204+
---
195205

196-
- This project does not replace Codex.
197-
- It does not require modifying the official Codex CLI source code.
198-
- It works by adding a local editable context layer in front of Codex.
199-
- Codex Desktop support is more experimental than Codex CLI support.
206+
<p align="center">
207+
<sub>GPL-3.0 · Made with ❤️ for Codex power users</sub>
208+
</p>

0 commit comments

Comments
 (0)