-
Stefy Lanza (nextime / spora ) authored
With compaction on, a long conversation's streamed reply began with coderai's own progress log -- "
🗜 Compacting context (~45406+300 tok > 120% of 32768) using 'summarize'…", the slice notice, the per-chunk summarizer lines -- and only then the answer. Those went into `delta.content`, which is the text a client stores, displays and builds its next turn on. Observed on the install the moment compaction was switched on. Compaction can take a minute, so the client does need to hear something. The wait keepalive had already answered where that goes: `wait_status_mode`, silent | invisible | visible, per model or globally. Compaction now follows the same setting instead of inventing a second one -- invisible by default (the notice rides the reasoning channel when thinking is on, else an empty-content chunk with `x_compaction` metadata), silent emits an SSE comment that holds the connection without giving the client anything to render, and visible is the old behaviour for someone watching a chat UI. The same block also reported a failure as a successful answer: when compaction could not make the request fit, the error was emitted as assistant content with `finish_reason: "stop"`. The client was told the request had succeeded and handed the error as the model's reply. It is a structured error event now, like every other failure on that path. Co-Authored-By:Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01S8LAP3ueNzQJtwzhgVbq66
90cf60a4