Dual-model architecture reduces token consumption by half for long conversations

Context compression system for AI agents
A developer on r/ClaudeAI shared a solution to the problem of AI agents losing context after conversation compaction. The system uses a dual-model architecture where a cheap small model (called the "subconscious") continuously compresses conversation history in the background.
Architecture details
The system has four layers:
- Narrative summary (~1K tokens)
- Compressed factoids
- Semantically retrieved verbatim quotes
- Raw recent turns
The main model ("conscious") receives a curated ~35K token context with the same information density that would normally require 120K tokens of raw history. The main model reads one coherent timeline and doesn't know the memory system exists.
Performance results
The developer simulated 260 turns across different conversation types. For sustained project work (starting with heavy research and gradually shifting to quick exchanges as the model learns the domain), the system cuts token consumption roughly in half.
Development tools
The system was built with Claude Code for the simulation and Claude.ai in the consulting and research stage. The developer is looking for others who have tried routing a smaller model to manage context for a larger one or found other workarounds for the compaction problem.
📖 Read the full source: r/ClaudeAI
👀 See Also
OpenClaw on Android: Thumb-Sized Private AI Computer Runs OpenClaw in a VM
Trustkernel's PlugClaw is a thumb-sized USB stick that runs Android and OpenClaw in a dedicated VM, adding a GUI agent to interact with Android apps on any phone or laptop.

hiresTI: Native Linux TIDAL Player with OpenClaw/MCP Support
hiresTI is a native Linux desktop client for TIDAL focused on stable playback, high-quality audio output, a GTK4/Libadwaita UI, and OpenClaw integration via MCP for remote control. The app combines a Python UI layer with a Rust audio core.

Reverse-Engineered Airtable Internal API Exposed via MCP: 60+ Tools for Claude Code
A developer reverse-engineered Airtable's internal API and built an MCP server with 60+ tools, letting Claude Code and 15+ IDEs control database views, computed fields, and extensions. Already used by 2000+ users, it's free and open source.

Using a Local LLM as a Claude Code Subagent to Reduce Context Usage
A developer shares a method to use Claude Code to delegate tasks to a local LLM via LM Studio's API, keeping file content out of Claude's context. The approach uses a ~120-line Python script with tool-calling to read files locally and return summaries.