docs/tui-stream-chunking-validation.md
This document records the process used to validate adaptive stream chunking and anti-flap behavior.
The goal is to verify two properties from runtime traces:
Chunking observability is emitted by:
codex_tui::streaming::commit_tickTwo trace messages are used:
stream chunking commit tickstream chunking mode transitionRun Codex with chunking traces enabled:
RUST_LOG='codex_tui::streaming::commit_tick=trace,codex_tui=info,codex_core=info,codex_rmcp_client=info' \
just codex --enable=responses_websockets
Tip: for one-off measurements, run with -c log_dir=... to direct logs to a fresh directory and avoid mixing sessions.
~/.codex/log/codex-tui.log as a start offset.This avoids mixing earlier sessions with the current measurement window.
For each measured window:
commit_ticksmode_transitionssmooth_tickscatchup_ticksSingle, Batch(n))max, p95, p99)max, p95, p99)Smooth -> CatchUp transitions within 1 second of a
CatchUp -> Smooth transitionThis section captures the major tuning passes so future work can build on what has already been tried.
Current state combines:
CatchUp