Prefex: A Local Proxy for Claude Code That Automates Prompt Caching and Session Memory

Prefex is a local proxy tool designed to reduce API costs when using Claude Code. It addresses two specific cost inefficiencies: Anthropic's beta prompt caching feature requires manual header injection, and Claude Code sends full conversation history with every request.
How It Works
Prefex runs entirely on your local machine as a proxy between Claude Code and Anthropic's API. It automatically injects the specific header needed to activate Anthropic's prompt caching feature, which reduces costs for repeated input tokens by 90%. Without this header, all requests including your CLAUDE.md and project context are billed at full price.
The tool also implements session memory, preventing Claude Code from resending the entire conversation history with each turn. Additionally, it includes a model router that can route simpler queries to cheaper models, though this feature wasn't active during the initial testing period.
Performance and Installation
In a 4-day test with normal usage:
- 1,338 requests processed
- $49.60 actual cost with Prefex
- $348 estimated cost without Prefex
- 86% savings achieved (with caching only, no model routing)
The developer provides a benchmark that runs 5 questions on karpathy/nanoGPT with cold and warm starts, costing approximately $0.03. Cost calculations use Anthropic's actual billing fields.
Installation requires one curl command and adding one line to settings.json. The package includes an uninstall script. The tool operates locally with no external servers, no telemetry, and API keys go directly to Anthropic.
📖 Read the full source: r/ClaudeAI
👀 See Also

Claude Code Hook Monitors WIP Accumulation in AI Coding Workflows
A developer built a UserPromptSubmit hook for Claude Code that surfaces work-in-progress accumulation across four queues: uncommitted changes over 200 lines, three or more unpushed commits, pushed commits without changeset files, and release PRs open longer than 24 hours.

cc+ Desktop App for Claude Code: Multi-Session Management and Fleet Orchestration
cc+ is an open-source desktop application for Claude Code built on the Claude Agent SDK, available for macOS and Linux. It provides multi-session tabs, live activity tree visualization, security scoring, workflow enforcement, and fleet orchestration capabilities.

Claude-Code v2.1.63 adds HTTP hooks, slash commands, and fixes memory leaks
Claude-Code v2.1.63 introduces HTTP hooks for JSON-based external calls, adds /simplify and /batch slash commands, and fixes multiple memory leaks in long-running sessions. The release also improves MCP server handling and VSCode integration.

Vibeyard Adds Kanban Board for Managing Multiple Claude Code Sessions
An open-source IDE called Vibeyard now includes a Kanban board that lets you spin up Claude Code agent sessions directly from cards. Cards auto-move to Done when the agent finishes.