# HarnessLink 17.16.0 release notes

8 changes, released Nov 9, 2026.

### Added

- **Old tool results and screenshots become stubs in long conversations (ADR-90).** Tool results the model has moved past (a file read or command run again, a file edited since, anything over 4 KB) and screenshots a newer one replaced become one-line stubs naming the tool, the target and the size. The original stays on this machine; `context_expand` returns it, and images come back as images. User and assistant text, the system prompt, harness context and the last 12 turns are never touched. The boundary moves in 32-turn steps, and only when the saving outweighs rewriting the provider's prompt cache. Replaying 340 local transcripts: about 9% fewer input tokens and 3.2% lower estimated input cost after the extra cache rewrites. Settings: `gateway.compress.staleResults` (default on) and `gateway.compress.staleKeepTurns` (12); also off under `gateway.compress.enabled: false` and `x-hnl-cache: bypass`. Savings count in the existing compression totals, priced at the cache-read rate.
- **Oversized source files and stack traces are cut along their structure (ADR-93).** When a tool result is over `gateway.compress.maxBlockChars`, a source file the agent read is outlined instead of cut head and tail: - **What stays:** imports, declarations and class/interface members, with function bodies folded to `… N lines (L1–L2) …`. That covers file-read tools, `cat`/`sed -n`/`nl` prints and fenced code; TS/JS, Python, Go, Rust, Java, Kotlin, C/C++, C#, Swift, PHP, Scala and Dart. - **Stack traces** keep their error and first app frames and fold repeated, recursive and library frames with counts. - **Shown lines are unchanged,** including the harness's line numbers, so edits still line up. The full text stays on the machine for `context_expand`. - **Fallback:** anything it can't read structurally is cut as before. - **Turning it off:** `gateway.compress.codeOutline: false`.
- **`code_map` MCP tool in every harness (ADR-91):** `overview` (files with their top-level symbols, or a per-directory summary), `outline` (one file's symbols with line ranges and signatures; `name` narrows it to one class), `find` (definitions, `Class.method` works) and `refs` (uses, definitions excluded), within a token budget (default 1,000) with `offset` paging. It reads a local per-project index under `~/.hnl/agent/cache/codemap/` that is refreshed incrementally on every call and never synced. `.gitignore` d, vendored, generated, binary, files over 1 MB and credential-named files (`.env*`, keys, `credentials`, …) are never indexed. Symbols for TS/JS, Python, Go, Rust, Java, Kotlin, C#, Ruby, PHP, Swift and C/C++; other files are listed and searched. The session-start context now tells agents to use it before reading whole files.
- **Codex runs HarnessLink's read-only tools without asking.** HarnessLink's read-only MCP tools (memory and session lookups, `context_brief`, `context_expand`, `code_map`, `kb_search`, `mcp_list_servers`), and forwarded tools a server marks read-only, now carry MCP `readOnlyHint`, so Codex no longer prompts for them (or blocks them in `codex exec`). Tools that write or start work (`memory_bank`, `cloud_sync`, `kb_ingest`, `delegate`, `delegate_status` with `cancel`, `more_tools`) still ask.
- **Where your tokens go (ADR-92).** The gateway splits each model call's input into system prompt, tool definitions, tool results per tool, your messages, assistant history, images and earlier context. The split is scaled to the provider-reported tokens, separated into cached and uncached, and priced. It also flags identical tool results or calls repeated within a request. `hnl gateway status` shows today's top items with a hint, and Usage on the dashboard gets a "Where your tokens go" section per harness, with share, estimated dollars and a suggested fix. Only category and tool names and counts are stored or synced, never text.
- **MCP hub tools a repository never uses are no longer sent to its sessions (ADR-94).** On first start the hub learns, in the background and read-only, from the last 60 days of omp, pi, Claude Code and Codex transcripts. It records which repository each past session ran in and which `mcp__hnl_*` tools it called, and dates each server from `mcp.json` backups. So pruning works from day one. - A proxied tool is left out once its server has been on the machine 7 days and the tool has gone unused in the repository's last 10 sessions and 7 days. The decision is made once per session, so the cached prompt stays put. New repositories follow machine-wide use. - The new `more_tools` tool searches hidden tools, enables them (kept listed from then on) or runs them directly. `hnl tools` shows what is listed and hidden per repository and how many past sessions it learned from. `--restore` lists tools again; `--off` turns pruning off (`mcp.prune.enabled`, `mcp.prune.sessions`, `mcp.prune.graceDays`). - It also suggests Claude Code `permissions.deny` and omp `<tool>.enabled` lines for built-in tools a repository never uses; it never writes them. - Measured on this machine's 447-tool hub once pruning settles: Codex 155k → 5.8k tokens per call, omp 9.9k → 1.5k, Claude Code 4.5k → 0.2k. On day one, the superpi repo would hide 357 of 429 hub tools.
- **Loop guard (ADR-95).** When one turn keeps hitting the same failure (the same error 3 times, or a few errors cycling, with no new file read or edited, no new passing check, no more tests passing), HarnessLink adds one short note to the agent's context to step back and try another way. If it still repeats, you get a one-line note on how to interrupt (Esc). It works in Claude Code (new `PostToolUseFailure` hook), Codex, omp and pi; not Cursor. No model calls. `hnl gateway status` shows the week's counts and where it works; `context.loopGuard: false` turns it off.
- **Repo facts (ADR-96).** The service learns from finished sessions of the autobank's harnesses how each folder is built and tested (test, check, build, install commands, the package manager, invocations that keep failing and what replaced them), with no model call and only from repeated evidence. The context brief opens with them (≤ 300 tokens, inside its existing budget) wherever they save more than they cost. `hnl facts` lists them with their evidence; `drop`, `pin`, `reset`, `show`, `learn`, and `off` (`memory.repoFacts`). Local only.

Update HarnessLink and every installed harness to its current release:

hnl update

New machine? Install with:

curl -fsSL https://harnesslink.sh/install.sh | bash

[Newer: 17.17.0](https://harnesslink.sh/releases#v17.17.0) · [Older: 17.15.2](https://harnesslink.sh/releases/17.15.2) · [All releases](https://harnesslink.sh/releases) · [Atom feed](https://harnesslink.sh/releases.atom)
