How crizcraig/claude-code-infinite works
Claude Code Infinite (ccc) launches Claude Code with a local relay so MemTree can manage conversation context while model traffic and native credentials remain on the Anthropic path. The main workflow is: select an environment and API key, launch Claude Code through the relay, classify turns, compress or index history, forward the request, and deliver display-only notices. The proxy also maintains lane-specific compressed routes for tool turns and logs request timing. The README documents these capabilities; sampled excerpts do not expose every proxy branch, so uncertain internal wiring is omitted.
Main entry points: proxy.ts Local relay · cli.ts ccc launcher · memtree.ts MemTree client · hooks.ts Notice hooks
Components 14
Launch and setup
- ccc launcher
src/cli.ts - Argument parsing
src/cli-args.ts - Environment keys
src/config.ts
Local proxy
- Local relay
src/proxy.ts - Lane routes
src/proxy.ts
Context management
- Turn shaping
src/turns.ts - MemTree client
src/memtree.ts
Notices and records
- Notice hooks
src/hooks.ts - Notice formatting
src/notices.ts - Request log
src/reqlog.ts
Other components
- User
- Claude Code
- MemTree API
- Anthropic API
Connections 19
- User → ccc launcher: starts session
- ccc launcher → Argument parsing: parses arguments
- ccc launcher → Environment keys: loads or saves key
- ccc launcher → Local relay: starts relay
- ccc launcher → Notice hooks: installs plugin
- ccc launcher → Claude Code: launches
- Claude Code → Local relay: sends requests
- Local relay → Turn shaping: classifies and shapes
- Local relay → MemTree client: requests compression or indexing
- MemTree client → MemTree API: sends message history
- MemTree API → MemTree client: returns memory context
- Local relay → Lane routes: checks and updates
- Local relay → Anthropic API: forwards model request
- Anthropic API → Local relay: returns model response
- Local relay → Claude Code: returns response
- Local relay → Notice formatting: formats notice
- Local relay → Notice hooks: queues and parses notice
- Claude Code → Notice hooks: runs display hooks
- Local relay → Request log: records request