← Back to blog

Compression Learns Three New Tricks - Tokens, Time, and Traceability

hermescompressionvoicekanbandesktop
Compression Learns Three New Tricks  -  Tokens, Time, and Traceability

X API is paywalled (402 on all endpoints). This roundup is sourced from GitHub PRs merged in the last 48 hours.

Three compression PRs from teknium1 landed together, turning auto-compaction into a configurable surface with real observability. The same window saw streaming voice TTS with barge-in from OutThisLife, a per-task model dropdown for kanban workers, and 30 other merged features.

Compression Overhaul - Tokens, Time, Traceability

#69335 adds compression.threshold_tokens, an absolute trigger that caps how much uncompressed context the model can accumulate before compaction fires. The percentage threshold (compression.target_ratio) is model-relative - a 128k-context model and a 1M-context model see different trigger points. The absolute cap means compaction never fires later than the configured token count, regardless of which model is active.

The PR adds 292 lines across 8 files, including 201 lines of tests and the core logic in agent/context_compressor.py. The two thresholds run as a first-fires-wins pair.

#69360 adds idle-triggered compaction. Set compression.idle_compact_after_seconds and a session that resumes after inactivity compacts its accumulated history before the first reply - so a gateway thread that sat idle for hours does not re-read its full stale context. The implementation lives in agent/turn_context.py (+106 lines) with 296 lines of tests across two test files.

#69338 adds structured JSON logging for every compression attempt. Each attempt writes one content-free log line to agent.log - token estimates, durations, commit/split status, failure class. The three files changed total 428 additions with zero egress and zero third-party dependencies. This makes compaction behaviour observable without instrumenting the agent code.

Combined: 1,162 additions across 21 files. These three PRs turn compression from a single-knob percentage trigger into a three-axis control surface: absolute cap, time-based trigger, and structured observability.

Streaming Voice TTS with Barge-In

#69511 by OutThisLife adds sentence-by-sentence streaming TTS while the model is still generating - using the same token-sentence-TTS pipeline as Pipecat's SentenceAggregator and LiveKit Agents. Users can interrupt the spoken reply by talking or typing.

The PR is the largest in the window at 2,395 additions and 407 deletions across 20 files. The desktop layer gets the bulk of the work: a new voice barge-in module (+238), rewritten voice playback (+333/-53), and a new streaming test file (+228). The CLI and web server also get streaming paths.

Kanban Per-Task Model Override

#69876 by teknium1 adds a model/provider dropdown to the kanban task drawer. Each worker task can override which model it runs on next dispatch without touching the worker profile's config. The tasks.model_override column has existed since May 2026 - this PR wires the UI to it.

The dashboard gets 168 lines of JavaScript for the picker, plus 292 lines of test coverage for the backend plumbing. The kanban CLI and DB layer add the query and mutation paths.

Also Merged

  • #63104 - Redirect active turns when users correct the agent mid-response. OutThisLife. +1,532/-195 in 30 files.
  • #69868 - Desktop tool call detail views. ethernet8023. Cleaner UI for failed image gen, web search, and raw payloads. +254/-49 in 9 files.
  • #69721 - Gateway typing indicators relay. benbarclay. +160/-1 in 4 files.
  • #69909 - Computer use: cap capture size and cache vision routing. OutThisLife.
  • #69655 - Consistent out-of-credits UX across CLI, TUI, and desktop. OutThisLife.
Termagotchi
_

Ryan Underdown

Autodidact. Rarely listens to advice.

Follow on X @catamarammed or GitHub @underdown