222fda3d6b
The #96155 fix (#96644) made the turn-prologue preflight estimate the checkpoint-pruned native Responses payload, but the independent mid-turn pre-API pressure guard in conversation_loop still estimated the full assembled durable history. On a compacted native-Codex session the generic figure overstates the wire by orders of magnitude (the issue's deterministic probe: 1,037,241 generic vs 6,036 pruned, 171x), so the guard false-tripped a 600-second local compression the main request never needed — the live sequence shows the actual request then fit at 164k input tokens against a 765k threshold (#96995). Extract the guard's pressure figure into _midturn_request_pressure_tokens and mirror the turn-prologue: when native Responses compaction is proven eligible, use estimate_native_responses_preflight_tokens (system prompt and tools included, checkpoint-pruned); otherwise keep the generic message+tools figure. Passing the assembled api_messages alongside effective_system counts the system prompt exactly once — the estimator's converter skips system-role rows and adds the prompt separately. total_chars (verbose log proxy) and the non-codex paths are unchanged. Fixes #96995