Repository navigation
Description
Problem
A bounded post-#1485 Responses compaction observation found one GLM helper that continued streaming without producing recorded summary text until its initial preparation budget expired. Fallback then allowed the main Response to proceed, but that logical main ultimately reached its overall deadline. Track helper streaming behavior, fallback latency, durable main outcomes, and the evidence needed to distinguish an isolated provider/model event from a systemic compaction regression.
This is a sanitized aggregate report. No account, conversation, Response, execution or infrastructure identifiers, exact request timestamps, content, raw logs, credentials, or private operational links are included.
Observed timeout sequence
- Planning selected approximately 199k estimated source tokens for one bounded summary. Context metadata/source loading took less than one second; this was not five minutes of database fetch work.
- The helper stream opened after 21,078 ms, with its first chunk at the same point.
- 12,275 chunks were observed; the last arrived at 299,354 ms.
first_text_ms=0, which the instrumented source defines as the text stage never being reached. - The helper stopped at 299,380 ms with
initial_preparation_budget, stageawaiting_provider. No fresh checkpoint was published by this attempt. advisory_failed/fitting_fallbackfollowed. Initial preparation took 300,168 ms; cumulative preparation across the logical main's six preparation calls was 301,306 ms.- The main continued through additional work after fallback, then failed its overall deadline at 600,016 ms. Stored failed status was independently verified.
Interpretation: the helper received an active stream but no recorded summary text. Prolonged reasoning or other non-text streaming is a hypothesis, not a proven explanation of those chunks. The logs do not establish the outcome the main would have had without compaction. Same-model non-compaction traffic also exhibited capacity and deadline failures. The observed preparation time nevertheless consumed about half the main's deadline.
Other compaction observations
The same bounded observation exercised only three helper attempts, so account count and elapsed observation time should not be confused with a large sample of compactions.
- Two helpers completed, in approximately 96.3 s and 12.9 s, and published fresh checkpoints.
- One publication's main completed and was verified stored completed. Its prepared-context estimate fell from approximately 257k to 26k tokens. No later request in that same thread was observed during the window; that is not evidence of user dissatisfaction.
- The other publication's main failed with a capacity/rate-limit category, independently verified in storage. A subsequent main reused that checkpoint and completed, also verified stored completed.
- Reuse counters appeared across multiple preparation/tool steps, but represented two distinct logical mains, not fifteen independent successful Responses. One was the capacity-failed publication main and one was the successful follow-up.
- Helper completion or checkpoint publication alone therefore does not establish a durable successful main answer or client receipt.
Aggregate outcomes and persistence uncertainty
Across the fixed observation window, deduplicated accepted logical mains had 1,179 logged completed, 18 failed, and 6 cancelled outcomes. Eight preaccept denials were tracked separately. At the final read, 1,135 completed, 16 failed, and 5 cancelled rows were present with matching statuses; there were no unresolved log terminals or stored in-progress rows.
47 accepted terminal rows were absent at the final read: 44 logged completed, two failed, and one cancelled. Of those, 23 completed rows had previously been independently read as stored completed. The other 21 logged completions lack an independent durable-read receipt. The missing-row set had no compaction helper/reuse/fallback involvement and also included traffic with compaction disabled. Cleanup/deletion is plausible but unconfirmed; neither user deletion nor a compaction integrity defect has been established. Track this discrepancy separately rather than counting log completion as proof of current persistence.
Median accepted-main elapsed time was approximately 12.4 s, p95 88.9 s, with a maximum around the ten-minute deadline. These aggregate latencies mix models and workloads and do not isolate compaction overhead. A legacy-only baseline already contained deadline failures. Contemporaneous controls excluded all experimental/internal accounts; exact provider/input/load matching was not established. Client receipt, answer quality and sentiment were not measured.
Investigation and acceptance criteria
- Determine whether helper chunks contain reasoning, heartbeats, usage-only updates or other non-text events using bounded metadata counters; never log payload/content.
- Separate stream-open, first chunk, first reasoning, first summary text, last progress and helper completion timing. Preserve timing on cancellation/budget expiry.
- Verify how summary helpers inherit model/reasoning/generation settings, and assess whether a bounded summary-specific configuration can improve latency without reducing summary correctness.
- Evaluate a helper progress/budget policy that leaves useful time for the main after fallback, including multi-step/tool-using mains. Increasing the overall timeout alone is not an established fix.
- Test active non-text streams, silent stalls, cancellation, preparation-budget exhaustion, fitting fallback, subsequent main success/failure and checkpoint reuse as separate outcomes.
- Keep main-level and helper-level denominators separate; report rates per actual helper-involved logical main, with repeated steps/retries deduplicated.
- Distinguish isolated incidents from repeated failures across independent users/requests or sustained excess failure rates versus comparable controls. Retain immediate intervention for confirmed corruption, cross-user leakage or runaway work.
- Reconcile missing stored outcomes with lifecycle/cleanup/replica evidence using metadata-only reads, preserving earlier durable receipts; do not infer deletion or write success from absence.
- Require representative natural/synthetic validation across relevant models and context sizes, durable main success and subsequent reuse; do not infer satisfaction from continued use.
Related design correction: #1459 and #1485. Timing fields were checked against public source revision 4090b9be0fe3c1ff1e6f889071e72da71d3813fe, particularly services/opensecret/src/web/responses/compaction/executor.rs. This issue records observations and follow-up work; it does not claim that one timeout proves a systemic regression.
Activity
AnthonyRonning commentedon Nov 15, 2026
Follow-up: “preparation” includes the summary LLM call; upstream helper latency dominates
A subsequent bounded observation provides more evidence for this issue. All figures below are rounded aggregate metadata; no content, request/account/conversation identifiers, exact request timestamps, infrastructure details, or operational configuration are included.
Terminology correction:
preparation_msis cumulative prompt-preparation time across the logical main Response, including compaction summary generation. It is not a timer for work that happens before invoking the summary LLM. Preparation can run more than once during a tool-using main.The code starts the preparation observation around
prepare_prompt, adds each observation to the main's preparation total, and awaitsSummaryExecutor::summarizewithin that work. The helper's separate timer covers upstream invocation and stream collection. Consequently, helper duration is nested within preparation; the two must not be added together.Additional observed sample
There were eight distinct helper-involved logical mains, each with one helper attempt:
What source and metadata establish
The helper request builder retains the selected model's normal Responses model/thinking policy, enables streaming, and removes the caller's
max_tokensfield so the main answer's caller-supplied cap does not become a separate summary cap. That is not evidence that provider generation is unlimited, nor does it reveal a particular request's effective reasoning setting.first_text_msadvances only when the summary accumulator gains visible text. Zero means that stage was not reached. Stream chunks without visible summary text are observed, but their type is not counted by this instrumentation. Extended reasoning/non-text generation is a plausible explanation, not a confirmed root cause. Provider startup/prefill, non-text streaming, and terminal-processing time are not fully separated by the existing counters. No summary, reasoning, message, or tool payloads were read for this assessment.Source references at the inspected revision:
Focused next steps
AnthonyRonning commentedon Nov 15, 2026
Interpretation and optimization follow-up
Slow but successful summary generation on larger reasoning models is an accepted latency tradeoff, not by itself evidence of a compaction defect or a reason to block rollout. Keep helper elapsed time separate from failed logical main outcomes; an active stream with delayed visible text does not prove a stall or runaway work.
A useful, non-blocking improvement to investigate is turning thinking off or lowering reasoning effort specifically for the compaction summary helper, where the selected model/provider supports it. The current helper retains the selected model's normal thinking policy. Evaluate supported settings rather than assuming a uniform API or disabling reasoning globally for main answers.
Acceptance checks for that investigation should cover summary fidelity, preservation of constraints and tool state, subsequent checkpoint reuse, helper latency, and durable main outcomes. Use controlled validation before changing production behavior, and keep all instrumentation payload-free. This follow-up does not establish a root cause or implement a configuration change.