Skip to content

Releases: BlockRunAI/runcode

v2.4.0 — Context Compression (15-40% Token Savings)

04 Apr 14:12
fbc7137

Choose a tag to compare

7-Layer Context Compression

Integrated BlockRun's compression library directly into the agent loop. Saves 15-40% tokens automatically:

Layer Method Savings
1 Deduplication 2-5%
2 Whitespace normalization 3-8%
3 Dictionary encoding (41 codes) 4-8%
4 Path shortening 1-3%
5 JSON compaction 2-4%
6 Observation compression 15-97%
7 Dynamic codebook 5-15%

How it works:

  • Runs automatically when conversation has >10 messages
  • Adds a header explaining codes to the model
  • Layer 6 (observation) is the biggest win — summarizes large tool results to ~300 chars
  • All layers are LLM-safe (model can still understand compressed text)

This is the same compression used by BlockRun's backend, now running client-side for immediate token reduction.

v2.3.2

04 Apr 14:21
efa3cd6

Choose a tag to compare

Token reduction: added deduplication pass (removes consecutive duplicate messages from retry/loop scenarios). Now 4 passes: aging → whitespace → assistant trim → dedup.

v2.3.1

04 Apr 14:17
d03052f

Choose a tag to compare

Reverts copied compression lib. New original token reduction: tool result aging (10KB→60 chars for old results), whitespace normalization, old assistant message trimming.

v2.3.0 — Token Management Overhaul

04 Apr 13:53
f368794

Choose a tag to compare

Token Reduction Improvements

Based on deep comparison with Claude Code's token management:

Smarter Pipeline

  • Microcompact only runs when history >15 messages (was every loop)
  • Circuit breaker: 3 failures → stop retrying compaction
  • Token estimation padded 33% for conservatism (was under-counting)

Selective Thinking

  • Keeps last 2 turns' thinking blocks (was only latest)
  • Preserves recent reasoning while reducing old bloat

Per-Model Budgets

  • Default max_tokens: 8K → 16K
  • Model-specific caps: Opus 32K, Sonnet 64K, Haiku 16K, etc.

Cheaper Compaction

  • Tiers down further: haiku → Gemini Flash
  • Free models as compaction target

New: /tokens command

Estimated:  ~45,200 tokens (API-anchored)
Context:    200k window (22.6% used)
Messages:   47
Tool results: 12 (340KB)
Thinking:   3 blocks
✓ Healthy

v2.2.7

04 Apr 13:39
d608e2c

Choose a tag to compare

Fix: time-based cleanup now accurately tracks activity within multi-tool turns (was using stale timestamp from turn start).

v2.2.6

04 Apr 12:59
e8e0742

Choose a tag to compare

  • Proxy: parse SSE JSON properly for token extraction (was regex)
  • LLM: wallet cache refreshes after 30min TTL
  • Grep: native fallback handles nested glob patterns better
  • Optimize: clock skew protection on time-based cleanup
  • WebFetch: strip SVG and form elements from HTML
  • Config: version fallback updated to 2.0.0
  • Index: cleaner default command detection

v2.2.5

04 Apr 12:51
f173225

Choose a tag to compare

Built-in @blockrun/mcp only activated when blockrun-mcp binary is installed (skips slow npx). Users who installed via npm -g get zero-config MCP, others unaffected.

v2.2.4

04 Apr 12:50
ab59bc7

Choose a tag to compare

Fix TS error: /doctor handler marked async for dynamic MCP import.

v2.2.3

04 Apr 12:49
8fd4a87

Choose a tag to compare

/context: warning when >80% context used. /doctor: checks MCP server status. /help: available in both Ink UI and terminal via command registry.

v2.2.2

04 Apr 12:47
5256b26

Choose a tag to compare

Markdown: blockquote (> ) and strikethrough support. Bash: SIGKILL delay 3→5s for graceful shutdown. Edit: similar-line search threshold lowered (catches shorter strings). Minor polish.