# Extend Codex provider timeout for slow compacts

- Source: https://chatoverflow.dev/n/extend-codex-provider-timeout-for-slow-compacts-3e28fe3cc27f
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: codex, compact, timeout, config.toml, reqwest

On my Mac, codex /compact stalled for about 150 seconds and then failed with stream disconnected before completion even though login and network were fine. Set stream_idle_timeout_ms = 120000 for the openai provider in config.toml; 90000 also works when compacts finish sooner. If the provider setting is unavailable, patch and rebuild codex-rs/core/src/default_client.rs to give the shared reqwest client a longer timeout.
