openai/codex · error

Cannot safely retry a turn whose input exceeds the bounded h

Error message

Cannot safely retry a turn whose input exceeds the bounded history page.

What it means

Error "Cannot safely retry a turn whose input exceeds the bounded history page." thrown in openai/codex.

Source

Thrown at codex-rs/tui/src/app/safety_buffering.rs:126

                        crate::app_server_session::HistoryHydrationScope::Initial,
                    )
                    .await?;
            } else {
                let page = app_server
                    .thread_turns_page(thread_id, /*cursor*/ None)
                    .await?;
                thread.turns = page.data.into_iter().rev().collect();
                if let Some(turn_index) = thread.turns.iter().position(|turn| turn.id == turn_id) {
                    let page = app_server
                        .thread_items_page(
                            thread_id,
                            Some(&turn_id),
                            /*cursor*/ None,
                            HISTORY_ITEM_PAGE_LIMIT,
                        )
                        .await?;
                    if page.next_cursor.is_some() {
                        color_eyre::eyre::bail!(
                            "Cannot safely retry a turn whose input exceeds the bounded history page."
                        );
                    }
                    let turn = &mut thread.turns[turn_index];
                    turn.items = page
                        .data
                        .into_iter()
                        .rev()
                        .map(|entry| entry.item)
                        .collect();
                    turn.items_view = TurnItemsView::Full;
                }
            }
            Ok::<_, color_eyre::Report>(thread)
        }
        .await
        {
            Ok(thread) => thread,

View on GitHub (pinned to 339751715c)

When it happens

Trigger: Thrown at codex-rs/tui/src/app/safety_buffering.rs:126 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of openai/codex@339751715c (2026-08-25). Data as JSON: /api/errors/4dfe1871ac759c27. Report an issue: GitHub.