Caveman 4.2.0 adds a QuickJS Code-Mode MCP gateway (caveman codemode / caveman wrap --codemode) with multi-agent overlays, multi-harness tool-envelope unwrapping in the compression engine, cache-safe proxy optimizations (local turn-effort gating, duplicate-read collapsing, canonical tool ordering, and defer_loading), @caveman-ai/middleware/codemode, opt-in Code-Mode support in @caveman-ai/pi 0.4.0, and a native Codex CLI provider for caveman-compress.
New
QuickJS Code-Mode MCP gateway (#1559)
caveman-mcp codemodeandcaveman codemodecollapse large upstream stdio and HTTP MCP catalogs into a static, prefix-cache-safe set of Code-Mode tools (codemode_search_tools,codemode_execute,codemode_mutate) backed by an embedded pure-Go QuickJS sandbox (modernc.org/quickjs) plus built-in repo and PR helpers (batch_read,symbol_outline,pr_read,ci_logs).caveman wrap --codemodeinstalls temporary per-session Code-Mode overlays for Claude Code, Codex, OpenCode, Gemini CLI, Qwen Code, Kilo, OpenClaw, Pi, and Hermes (includingconfig.yamlsync-back of in-session Hermes edits; Cursor MCP configs are discovered bycaveman codemode).- Workspace MCP discovery is explicit: workspace-local MCP definitions are loaded only when
--trust-workspace-mcporCAVEMAN_TRUST_WORKSPACE_MCP=1is set. - Exact recovery and non-text fidelity: Code-Mode execution outputs and built-in tools store originals in CCR before elision; upstream HTTP and stdio MCP decoding preserves integers above
2^53and non-text attachment blocks (images, audio, resources), streams HTTP SSE replies incrementally, and strips auth/custom headers across cross-origin redirects.
Cache-safe proxy optimizations (#1559)
--turn-effortapplies cache-safe per-turn effort gating across Anthropic (including Opus 4.7 / adaptive reasoning models), OpenAI/Codex, and Gemini without breaking prefix caches, replaying Codex/ChatGPT effort marks across substantive turns.- Duplicate-read collapsing, canonical
tools[]ordering (--canonical-tools), MCP tool deferral (--defer-mcp-tools), and tool catalog shrinking (--shrink-tools) keep provider prompt prefixes byte-stable while trimming redundant input context. MCP-disabled streaming OpenAI Responses requests remain byte-identical.
Multi-harness engine envelopes (#1559)
- The compression engine unwraps tool-result envelopes emitted by Claude Code, Codex, OpenCode, and Hermes so code, search results, and test reports compress cleanly across harnesses while preserving Go build and setup failure diagnostics in verbose
go testoutput.
Framework middleware and Pi (#1559)
@caveman-ai/middleware1.2.0 adds@caveman-ai/middleware/codemode(createCodeModeToolset), a zero-dependency in-process Code-Mode toolset with BM25 discovery, structured pipelines, and read/write separation.@caveman-ai/pi0.4.0 adds opt-in Code-Mode tools (CAVEMAN_PI_CODEMODE=1) backed by a lazyCodemodeClient, honorsCAVEMAN_MCP_PREFIX_ARGS, and extends RPC timeouts past caller script deadlines.
caveman-compress
Fixed
- Engine and proxy: guard
unwrapFileWrapperagainst whitespace-only input; recover per segment so an engine panic fails open while still re-raisinghttp.ErrAbortHandler(#1518). - OpenCode: preserve whitespace in configured
OPENCODE_CONFIG_DIR(#1518). - CLI: remove stale
devanddeploy awscommands that referenced removed targets. - Python SDK: restore the TLS byte budget after HTTP
CONNECTreads (#1502).
Maintenance
- Go toolchain bumped to Go 1.26.11 (#1532).
- Documentation consolidated around
AGENTS.mdanddocs/WHY.md, with public benchmark sample sizes stated alongside published figures. - Binaries:
bin-v4.2.0. CLI:@caveman-ai/cli4.2.0. Middleware:@caveman-ai/middleware1.2.0. Pi:@caveman-ai/pi0.4.0.