Blog FEATURE
openleash/how-token-saver-trims-context

How Token Saver trims repeated context

A look at duplicate file dumps, stale tool output, and why agents re-read the same file eleven times.

Token saving is cost control, but it is also observability into how agents build and reuse context.

1.env + logs + tickets
2Context scan
3Mask / deny
4Model request
Secrets should be detected before context is sent to a model.
token-savercostprompt.beforeSubmit

The short version

Token compression matters because agents are no longer just suggesting changes. They read files, call tools, run commands, and move context between systems.

Leash keeps that power visible. Every built-in Feature can inspect an event, make a decision, and leave an audit trail you can understand later.

What Leash watches

Prompts, tool calls, sessions, skills, logs, and startup inventory all flow through the same event model. Features can block, mask, rewrite, compress, export, or simply observe.

That keeps the workflow fast when the agent is safe and explicit when the blast radius changes.