You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refresh: the tools as they actually are — checker fix, successions, shape watch, hardened sweep
The branch was cut before an afternoon in which the daily sweep and its
own findings changed these tools materially; as opened, the PR shipped
a safety checker with a known bug (the declared-injection exemption
filtered the output side only — an input carrying an injection-shaped
message, e.g. a chained proxy feeding the pipeline its own output, read
as a message drop nobody made; caught by the first stamped sweep and
fixed with a both-ways bite).
What this refresh brings, each with its tests:
- safetyViolation filters declared injections on BOTH sides;
- findSuccessions: conversation-boundary classification (compaction /
resume-shaped / fork) with opener pricing; interleaves structurally
suppressed (never-returns + first-appearance conditions, both
bite-proven — the one-shot-sidecar phantom was caught by its own
test);
- census edit rows carry lastHumanAt/anchorDelta (the relation that
attributed the mid-history edit population to reminder anchoring),
with far-from-anchor rows flagged and their bytes excerpted to local
stdout only;
- harvest: shape watch counters (dormant thinking classes, baseline
prefix sizes) and growth-step snapshots (evidence frozen, scrubbed,
before capture rotation eats it); shape-verdicts.mjs is the consumer
so the new ledger fields are never orphan telemetry;
- gate-live: --census on every sweep, rows that compared zero pairs
marked proves-nothing (ok requires a proving row), and the status
file stamps the proxy/tools source fingerprints it exercised —
a verdict that names its config but not its code stays "fresh"
across code changes it never saw.
proxy/source-fingerprint.mjs is included for the stamp; identical file
ships in the capture PR — merges cleanly in either order, same
precedent as the shared fixtures. docs: dev-loop's closing-gate
section and the consumer setup page ride along.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
[#78660](https://github.com/anthropics/claude-code/issues/78660)) — an
17
+
edit deep in the history re-bills everything after it.
18
+
2.**The tools list changes when a tool loads mid-session**
19
+
([#81967](https://github.com/anthropics/claude-code/issues/81967)) — the
20
+
tools list heads the cached prefix, so one late tool load re-bills the
21
+
entire context.
22
+
3.**Byte drift in already-sent messages** (stray whitespace, block
23
+
re-serialization —
24
+
[#48734](https://github.com/anthropics/claude-code/issues/48734)) — any
25
+
2-byte wobble invalidates the whole prefix.
26
+
27
+
The extensions below hold the forwarded bytes stable across all three, and
28
+
a last-line guard makes sure no mitigation can ever corrupt a conversation:
29
+
on any structural mismatch it forwards the original untouched.
30
+
31
+
## The switches
32
+
33
+
Bake these into the service at install time (see the README's
34
+
`install-service` section — flags set at install time land in the unit):
35
+
36
+
```sh
37
+
CACHE_FIX_FORWARD_PROXY=on \
38
+
CACHE_FIX_INSERTION_NORMALIZE=1 \
39
+
CACHE_FIX_VOLATILE_PIN=1 \
40
+
CACHE_FIX_TOOL_REWRITE=1 \
41
+
CACHE_FIX_OUTPUT_GUARD=1 \
42
+
cache-fix-proxy install-service
43
+
```
44
+
45
+
| switch | what it does |
46
+
|---|---|
47
+
|`FORWARD_PROXY=on`| transport mode — Claude Code connects through the proxy with no `ANTHROPIC_BASE_URL` change |
48
+
|`INSERTION_NORMALIZE=1`| recognizes messages by content, so relocated/re-shaped history is forwarded in its first-seen form |
49
+
|`VOLATILE_PIN=1`| pins reminder blocks to their first serialization — CC's re-stamps stop reaching the wire |
50
+
|`TOOL_REWRITE=1`| freezes the tools list; late-loaded tools are announced at the tail instead of re-writing the prefix (auto-limited to models measured to support it — everywhere else it degrades to stock behavior, never an error) |
51
+
|`OUTPUT_GUARD=1`| the safety net: validates structure after all mitigations and restores the original on any violation |
52
+
53
+
Everything upstream ships enabled by default stays enabled — those handle
54
+
further stabilization (fingerprint stripping, sort stabilization, etc.).
55
+
56
+
**Deliberately NOT enabled** (development/telemetry, not protection):
0 commit comments