f860d1b8af
A successful file_write/file_edit echoes the whole file body (+ diff) back in its tool result — up to ~30k chars, which pushed the traced Gemma4 request past its context window. The write already happened and its full output is durable in the event log/CAS; the model only needs a receipt that it landed. Replace each exit=0 write result with a one-line receipt (path + elision marker) in the context builder; reads, gate output, and nonzero-exit writes stay verbatim. Derived-only pass over the transcript — authoritative events are untouched, so it's replay-safe. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>