Skip to content

Commit 087aff7

Browse files
cnighswongerclaude
andcommitted
v1.9.2: /clear artifact strip, statusline fallback, VS Code VSIX docs
- Strip /clear command artifacts from messages[0] (#47756) - Statusline falls back to quota-status.json when claude-meter not installed (#18) - README: VSIX as primary VS Code path, manual wrapper as fallback - 7 community contributors Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent ae4c204 commit 087aff7

3 files changed

Lines changed: 29 additions & 13 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 1.9.2 (2026-04-14)
4+
5+
- **`/clear` artifact stripping** — Removes `<local-command-caveat>`, `<command-name>`, and `<local-command-stdout>` blocks that bleed into `messages[0]` after `/clear`, breaking prefix cache match vs a fresh session. Credit: [@wadabum](https://github.com/wadabum) (anthropics/claude-code#47756).
6+
- **Status line fallback to `quota-status.json`**`quota-statusline.sh` now works without `claude-code-meter` installed by reading quota data from the interceptor's `quota-status.json`. Fixes #18. Credit: [@dmurat](https://github.com/dmurat).
7+
- **VS Code extension** — VSIX extension available for one-click activation. Auto-configures `claudeProcessWrapper`. No manual wrapper scripts or C compilation needed. Credit: [@JEONG-JIWOO](https://github.com/JEONG-JIWOO), [@X-15](https://github.com/X-15) (#16). Download: [GitHub Releases](https://github.com/cnighswonger/claude-code-cache-fix-vscode/releases/latest).
8+
- **README: VS Code section rewritten** — VSIX as Option A (recommended), manual wrapper as Option B. Documents `claudeCode.claudeProcessWrapper` as the correct integration path.
9+
310
## 1.9.1 (2026-04-13)
411

512
- **Windows: URL-encode npm root in `claude-fixed.bat`** — Fixes `ERR_MODULE_NOT_FOUND` on default Windows Node.js installs where npm root contains spaces (e.g. `C:\Program Files\nodejs\node_modules`). Uses PowerShell `[System.Uri]::EscapeUriString` to encode the path; no-op on space-free paths. Credit: [@beekamai](https://github.com/beekamai) (PR #17).

README.md

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -106,11 +106,26 @@ Credit: [@TomTheMenace](https://github.com/anthropics/claude-code/issues/38335)
106106

107107
## VS Code Extension
108108

109-
The VS Code Claude Code extension spawns `claude.exe` / `claude` as a subprocess. The `claude-code.environmentVariables` setting does **not** propagate `NODE_OPTIONS` to the spawned process, so a process wrapper is required.
109+
### Option A: VSIX extension (recommended)
110110

111-
### Linux / macOS
111+
The easiest path — a VS Code extension that handles everything automatically:
112112

113-
Create a wrapper script (e.g. `~/bin/claude-vscode-wrapper`):
113+
1. Install the interceptor: `npm install -g claude-code-cache-fix`
114+
2. Download the VSIX from [GitHub Releases](https://github.com/cnighswonger/claude-code-cache-fix-vscode/releases/latest)
115+
3. Install: `code --install-extension claude-code-cache-fix-0.1.0.vsix`
116+
(or in VS Code: Extensions → `...` menu → "Install from VSIX...")
117+
4. Restart any active Claude Code session
118+
119+
The extension auto-configures `claudeCode.claudeProcessWrapper` on activation. No manual settings needed. Works on Windows, macOS, and Linux.
120+
121+
Commands available in the VS Code command palette:
122+
- **Claude Code Cache Fix: Enable** / **Disable** / **Show Status**
123+
124+
### Option B: Manual wrapper (if you prefer not to install the VSIX)
125+
126+
The VS Code Claude Code extension spawns `claude.exe` / `claude` as a subprocess. The `claude-code.environmentVariables` setting does **not** propagate `NODE_OPTIONS`, so a process wrapper is required.
127+
128+
**Linux / macOS** — create `~/bin/claude-vscode-wrapper`:
114129

115130
```bash
116131
#!/bin/bash
@@ -133,29 +148,23 @@ Add to VS Code `settings.json`:
133148
}
134149
```
135150

136-
### Windows
137-
138-
On Windows, `.bat` and `.cmd` wrappers fail because the extension uses `child_process.spawn()` without `shell: true`. A native `.exe` wrapper is required.
139-
140-
A C wrapper source (`tools/claude-vscode-wrapper.c`) is included in this package. Compile with MSVC or gcc:
151+
**Windows**`.bat`/`.cmd` wrappers fail because the extension uses `child_process.spawn()` without `shell: true`. Use the C wrapper source included in this package (`tools/claude-vscode-wrapper.c`):
141152

142153
```cmd
143154
cl tools\claude-vscode-wrapper.c /Fe:claude-vscode-wrapper.exe
144155
```
145156

146-
Then add to VS Code `settings.json`:
157+
Then set in VS Code `settings.json`:
147158

148159
```json
149160
{
150161
"claudeCode.claudeProcessWrapper": "C:\\path\\to\\claude-vscode-wrapper.exe"
151162
}
152163
```
153164

154-
See [#16](https://github.com/cnighswonger/claude-code-cache-fix/issues/16) for community testing results and pre-compiled binaries when available.
155-
156165
### Known limitations (VS Code)
157166

158-
- **Fingerprint fix**: The VS Code extension constructs `messages[0]` differently than the CLI, causing the fingerprint safety check to auto-disable. Use `CACHE_FIX_SKIP_FINGERPRINT=1` as a workaround. The relocate and TTL fixes work normally.
167+
- **Fingerprint fix auto-disables**: The VS Code extension constructs `messages[0]` differently than the CLI, causing the fingerprint safety check to trip. Use `CACHE_FIX_SKIP_FINGERPRINT=1` as a workaround. All other fixes (relocate, tool sort, TTL, /clear artifact strip) work normally.
159168

160169
Credit: [@JEONG-JIWOO](https://github.com/JEONG-JIWOO) and [@X-15](https://github.com/X-15) for the VS Code extension investigation and C wrapper ([#16](https://github.com/cnighswonger/claude-code-cache-fix/issues/16)).
161170

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "claude-code-cache-fix",
3-
"version": "1.9.1",
3+
"version": "1.9.2",
44
"description": "Fixes prompt cache regression in Claude Code that causes up to 20x cost increase on resumed sessions",
55
"type": "module",
66
"exports": "./preload.mjs",

0 commit comments

Comments
 (0)