Skip to content

Releases: GodsBoy/lossless-code

v1.1.1 — fix claude --print cwd pollution across install paths

14 Apr 18:20
9e5bd0a

Choose a tag to compare

Patch release bundling every main-branch delta accumulated since the v1.1.0 marketplace artifact, headlined by the claude --print CWD fix that closes the claude --resume pollution bug.

Marketplace users: upgrade to pick up the fix. Manual installs are already covered by re-running install.sh.

Fixed

  • claude --print subprocess CWD pollution (PR #11). The summariser's claude --print calls now pin cwd= to ~/.lossless-code/.cli-cwd, so Claude Code files internal summarisation sessions in their own bucket instead of polluting the user's claude --resume list with hundreds of "Summarise the following conversation turns concisely…" entries. Includes scripts/check_summariser_pollution.py regression detector.
  • Installer + README sync for fingerprint feature (PR #10). install.sh now copies the new PreToolUse / PostToolUse hooks and the scripts/file_context.py, scripts/hook_store_tool_call.py files added by the fingerprint feature; README documents the new fileContextEnabled flag and the hook surface.

Added — fingerprint file context (default off, PR #9)

  • fileContextEnabled config flag (default false) gates all new behavior. Flip to true in ~/.lossless-code/config.json to opt in.
  • Schema additions: messages.file_path, summaries.kind, plus idx_messages_file_path (partial) and idx_summary_sources_source composite. Migrations are idempotent.
  • PostToolUse hook (hook_store_tool_call.py) records which file a Read | Edit | Write | MultiEdit | NotebookEdit tool call touched.
  • Polarity classification (summarise.classify_chunk_polarity) tags summaries as created | edited | discussed | mixed.
  • db.get_summaries_for_file walks summary_sources upward from a message's file_path via recursive CTE (hop ceiling 16) and excludes consolidated nodes.
  • inject_context.format_file_fingerprint renders a compact 200-token fingerprint with a truncation ladder.
  • PreToolUse hook (pre_tool_use.sh + scripts/file_context.py) injects the fingerprint as additionalContext before file-touching tools run. JSON cache under cache/ with 60s TTL, file-locked reads/writes, atomic replace, single-flight stampede guard. Cold path opens vault.db read-only so it never blocks the writer.
  • lcc_expand --file <path> (CLI) and {"file": "..."} (MCP) drill from a file path to the recent summaries that reference it.
  • lcc status surfaces tagged message count, distinct tagged files, and cached fingerprint count when the flag is on.

Changed

  • scripts/db.py split into scripts/db/ package (PR #8). Single 745-line module replaced with focused submodules: config, schema, messages, summaries, sessions, embeddings, search, dream_log. Public import surface is preserved; existing call sites unchanged.
  • BM25 prompt-aware context eviction (PR #7). Context injection now scores candidate summaries against the live prompt with BM25 instead of a flat recency cut.

Added — earlier in the v1.1.0 → v1.1.1 window

  • Session filtering for lossless-claw v0.7.0 parity: stateless session gate, stop-hook filtering, plus DB-layer tests.
  • Circuit breaker + dynamic chunk sizing for summarisation.
  • Vault bloat protection: summary size caps and dream pagination.
  • claude-cli provider for Claude Max / Pro subscription users (no API key path). ANTHROPIC_API_KEY is stripped from the subprocess env so the CLI falls back to OAuth.
  • Custom Anthropic-compatible providers (MiniMax and others) via openaiBaseUrl, plus provider auto-detection and structured error handling.
  • dream --status flag for inspecting dream-cycle state.
  • scripts/check_summariser_pollution.py stdlib regression detector for the cwd pollution bug.

Upgrade

Plugin marketplace users: restart Claude Code so the marketplace cache re-fetches ~/.claude/plugins/cache/lossless-code/lossless-code/1.1.1/. Verify with python3 ~/.claude/plugins/cache/lossless-code/lossless-code/1.1.1/scripts/check_summariser_pollution.py — exit 0 means clean.

Manual install users: cd lossless-code && git pull && ./install.sh.