Confirmed opt-in context-accounting defect
Reviewed master at 886c36d8ebe861aa987059a1744d45b78797baae (v4.7.0). Suggested priority: P2.
Compatible reasoning replay with reasoning_dialect="glm_thinking", glm_clear_thinking=false, and reasoning_content_feedback_policy="preserve" adds reasoning_content blocks to agent history and sends that field on the provider wire. The shared character estimator and truncator omit this field.
Sources: agent history, wire replay, estimator, truncation.
Isolated reproduction
A synthetic agent transcript includes a 10,000-character preserved reasoning block and a paired tool cycle. A fake provider raises a context-overflow error, exercising the real recovery ladder and wire converter with small test rungs.
all 3 attempts: estimated_chars=41, reasoning_wire_chars=10000
recovery rung 1: target=500, compressed_chars=41, fits=True
recovery rung 2: target=250, compressed_chars=41, fits=True
final state: failed
Three reviewers reproduced/verified this using fake provider errors, not live provider calls. The payload component causing the undercount remains unchanged while recovery claims it fits.
Acceptance criteria
- Count every replayed reasoning field in context measurement.
- Apply only transformations valid under the selected provider's reasoning replay contract; do not blindly strip or fabricate native reasoning.
- A recovery report must not claim fit based on excluding bytes that will still be sent.
- Cover preserve and default do-not-echo modes, normal compaction and overflow recovery.
Scope: explicit preserve mode only; this is not claimed to affect default configuration. Behavior change: accurate budgeting/recovery for that mode. No source changes were made.
Confirmed opt-in context-accounting defect
Reviewed
masterat886c36d8ebe861aa987059a1744d45b78797baae(v4.7.0). Suggested priority: P2.Compatible reasoning replay with
reasoning_dialect="glm_thinking",glm_clear_thinking=false, andreasoning_content_feedback_policy="preserve"addsreasoning_contentblocks to agent history and sends that field on the provider wire. The shared character estimator and truncator omit this field.Sources: agent history, wire replay, estimator, truncation.
Isolated reproduction
A synthetic agent transcript includes a 10,000-character preserved reasoning block and a paired tool cycle. A fake provider raises a context-overflow error, exercising the real recovery ladder and wire converter with small test rungs.
Three reviewers reproduced/verified this using fake provider errors, not live provider calls. The payload component causing the undercount remains unchanged while recovery claims it fits.
Acceptance criteria
Scope: explicit preserve mode only; this is not claimed to affect default configuration. Behavior change: accurate budgeting/recovery for that mode. No source changes were made.