v1.0.134
Critical hotfix that finally makes the per-conversation stats bar populate with real bytes — the v1.0.133 wiring was correct in source but the runtime never read the right session_id, so every chunk landed without attribution.
Fixes
Stats bar now populates with real indexed bytes (cross-adapter). v1.0.133 wired chunks.session_id foreign keys at the indexer, but currentAttribution() only checked process.env.CLAUDE_SESSION_ID — that env var is not propagated to MCP servers. Result: every chunk stored an empty session_id, and getContentBytesForSession() returned 0 for every session. v1.0.134 falls back to reading the most recent session_id from the active project's session DB. Works for all 15 adapters (claude-code, cursor, gemini-cli, codex, kiro, opencode, zed, kilo, openclaw, qwen-code, vscode-copilot, jetbrains-copilot, omp, pi, antigravity) since each adapter's hooks already write session_events with their session_id.
Bar ratio no longer reports degenerate 100%. When bytes_returned was 0 (the design decision documented in STATS-DEEP-DIVE-VERDICT) but bytes_avoided > 0, the formula convBytesWith = max(1, bytes_returned) produced "Without 30 MB / With 1 byte / 100% kept out" — accurate numbers, dishonest ratio. v1.0.134 uses eventDataBytes as the denominator floor: convBytesWith = max(1, bytes_returned + eventDataBytes). Ratios now reflect the real proportion of indexed-content vs event-metadata bytes.
Lifetime tier now sums all chunks across all adapter content DBs. The "All your work" line previously only counted session_events.LENGTH(data) — about 14 MB for a heavy user. v1.0.134 also sums LENGTH(content) + LENGTH(title) over every chunks row in every adapter's content DB. Heavy users typically jump from ~14 MB to 40+ MB lifetime kept-out (the indexed content was always there; it just wasn't surfaced).
Behavior change
After upgrade and Cmd+Q + reopen:
- Lifetime "kept out of context" jumps to its real value immediately (chunks summed retroactively, no FK required for lifetime aggregate).
- Per-conversation bar populates from this point forward as you call
ctx_fetch_and_index,ctx_index,ctx_execute(with large/medium output), orctx_batch_execute. Subagent calls share the parent MCP server, so they attribute correctly. - Sessions whose chunks were indexed before v1.0.134 (FK empty) won't contribute to the per-conversation bar — only to lifetime.
Tests
3242+ pass on full suite (8 OpenCode pre-existing baseline + lifecycle env-dependent). Targeted: 540/540 on touched files.
Compatibility
15 adapters, 3 OS. No schema migration. engines.node >= 22.5.0 from v1.0.132 preserved.
Upgrade
npm install -g context-mode@latest
# Restart Claude Code (Cmd+Q + reopen) to load the new MCP server.