> ## Documentation Index
> Fetch the complete documentation index at: https://docs.synti.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Performance & Token Optimization

> Reduce token usage on command-heavy sessions by compressing verbose output before it reaches the model.

Long-running coding and repository sessions burn tokens on output the model rarely needs in full — sprawling diffs, directory listings, search results, and build logs. Synti can hand that output to a local optimizer that compresses it before it ever reaches the model, so more of your context budget stays available for code and reasoning.

## How token optimization works

The optimizer is a separate command-line tool that runs on your machine. When enabled, Synti routes eligible command output through it: the tool strips repetitive noise and condenses verbose text, then passes the compact result to the model. It changes what the model *reads*, not how fast the command *runs* — execution time is unaffected.

<Note>
  Optimization only touches the **output path**. Synti still shows you the original command and asks for permission on the original command, so nothing about the security review changes. See [Permissions](/core-concepts/permissions).
</Note>

### What it optimizes

The tool is most effective on commands that produce bulky, structured output:

* Diffs
* Directory listings
* Search results
* Test logs
* Package-manager output
* Build output

It offers little benefit for commands that are already concise, so the wins concentrate in coding and repo-maintenance work.

## Requirements

* The optimizer installed as an executable on your system `PATH`.
* A current Synti release (the `0.11.x` line).

The optimizer is **not bundled** with Synti. Synti detects an existing installation and invokes it — there's no separate initialization step.

<Warning>
  On Windows, place the executable on the Windows `PATH`, not on a Git Bash-only `PATH`, or Synti won't find it.
</Warning>

## Enabling it

<Steps>
  <Step title="Install the optimizer">
    Install the command-line tool for your operating system (macOS, Linux, or Windows).
  </Step>

  <Step title="Let Synti detect it">
    Open **Settings → AI → Performance** and click **Re-check** so Synti finds the executable on your `PATH`.
  </Step>

  <Step title="Turn on Token Optimization">
    Enable the **Token Optimization** toggle.
  </Step>

  <Step title="Run a command-heavy session">
    Work as usual on a coding or repository task so the tool has output to compress.
  </Step>

  <Step title="Review the savings">
    Return to **Settings → AI → Performance** to see saved-token counts and efficiency statistics.
  </Step>
</Steps>

## Reading the statistics

After the optimizer has processed some commands, the Performance settings show how many tokens it saved and an overall efficiency figure. Use those numbers to decide whether a given kind of session benefits enough to keep the feature on.

## Other ways to save context

Token optimization is one lever. You can also:

* **Choose the right model.** Match the model to the task — see [LLM connections](/reference/config/llm-connections).
* **Keep sessions focused.** Start a fresh session for a new task rather than letting one grow unbounded.
* **Write large results to files.** Ask the agent to save big datasets to disk instead of printing them inline.

## Related

<CardGroup cols={2}>
  <Card title="LLM connections" icon="plug" href="/reference/config/llm-connections">
    Pick the model that fits the task.
  </Card>

  <Card title="Rich output" icon="table-cells" href="/go-further/rich-output">
    Large results render as files, not inline dumps.
  </Card>
</CardGroup>
