DocsConfigure
Token optimisations
Configure how Rusty reduces repeated context and command output, and inspect the savings.
Rusty can reduce the text sent to a model and keep more of a conversation eligible for provider prompt caching. Open Settings → Token optimisations to enable or disable each optimisation. They are enabled by default. Changes apply from the next command.
Available optimisations
| Setting | What it does |
|---|---|
| Condense command output | Removes routine progress and passing-test output while keeping errors, failures and summaries. Applies to run_command, run_check, install_dependencies and job_output progress. |
| Keep full output recallable | Keeps condensed command output in memory so the agent can retrieve it with job_output rather than rerun the command. The last 30 outputs are held until Rusty quits. |
| Don't resend what the agent already has | Replaces identical tool results in the same conversation with a pointer; a changed file can be returned as changed lines instead of another full copy. Separate workflow steps and sub-agents get their own copy. |
| Limit very large tool reports | Shortens reporting-tool results over 12,000 characters, retaining the beginning and end and a job_output reference to the full text. File reads and spec documents are not cut. |
| Carry the working set across turns | Gives the next agent in a chat a short list of files read or changed and searches run, helping it avoid repeating exploration. It lists locations, not file contents. |
| Cache-friendly chat history | Moves the history cutoff in steps rather than on every turn, so the prefix is more likely to match the provider's prompt cache. Some additional older messages may be omitted; pinned messages and the opening request remain. |
| Keep the model on a warm cache | Avoids switching a cached conversation to a cheaper model mid-run, which would require paying for the conversation again. A step up to a more capable model can still happen. |
A shortened result identifies the saved output when recall is available. Ask the agent to read it back if it needs more detail. Cached output is temporary, not a permanent archive.
Safeguards and measurements
Rusty skips an optimisation if it would not make text smaller or if the optimisation fails. Shortened output is marked so it is not condensed again.
The What it saved section shows command-output characters in and out, the percentage saved, and how often retained output was read back. A high read-back rate may mean a filter leaves out useful detail. Prompt-cache statistics are shown there too. These figures are not a guarantee of token or cost savings: tokenisation, provider caching and pricing vary. Use Reset to clear the displayed statistics.
Smart tools are a separate, opt-in way to use a selector model to return focused excerpts. Their selector calls have their own token costs. See Observability & metrics for usage tracking.