mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-07-15 21:11:08 +02:00
feat(core): elide oversized historic tool results from model context
Tool results from prior turns (skill loads, file reads, HTTP fetches) dominate resent context and are rarely needed verbatim. A decorator over the context resolver now replaces prior-turn tool results above a size threshold with a short placeholder telling the model to re-run the tool if it needs the output. The current turn's in-flight results are always sent verbatim, the durable log is untouched, and elision is a pure per-message function so resolved prefixes stay byte-stable for provider prefix caching. Policy lives in config/context.json (elideHistoricToolResults, default on; elideHistoricToolResultsThresholdChars, default 10000). The inspect CLI composes through the same decorated resolver so debug output still matches transmitted bytes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
26e2fde0a8
commit
99f196e16c
5 changed files with 393 additions and 4 deletions
|
|
@ -390,6 +390,18 @@ Rules:
|
|||
It rejects the execution and does not append `turn_failed`.
|
||||
- The reducer treats `context` as opaque data and never resolves references.
|
||||
|
||||
The app wires the resolver through a decorator (`context-elision.ts`) that
|
||||
applies transmit-time elision to the materialized prefix: tool results from
|
||||
prior turns above a size threshold are replaced with a short placeholder
|
||||
telling the model to re-run the tool if it needs the output. The durable log
|
||||
is untouched; only the transmitted bytes change. Elision is a pure function
|
||||
of each message, so resolved prefixes stay byte-stable across calls (provider
|
||||
prefix caches keep working), and the current turn's own in-flight tool
|
||||
results never pass through the resolver, so they are always sent verbatim.
|
||||
Policy lives in `config/context.json` (`elideHistoricToolResults`, default
|
||||
true; `elideHistoricToolResultsThresholdChars`, default 10000). The inspect
|
||||
CLI composes through the same decorated resolver.
|
||||
|
||||
### 6.7 Agent snapshot inheritance
|
||||
|
||||
Session turns whose resolved system prompt and tool set are byte-identical
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue