openai/codex · error
Cannot safely retry a turn whose input exceeds the bounded…
Error message
Cannot safely retry a turn whose input exceeds the bounded history page.
What it means
Guard in retry_safety_buffered_turn: the turn being retried has input larger than the bounded history page fetched from the app server, so the TUI cannot faithfully reconstruct and resubmit it. This is a sentinel bail protecting against silently truncating the user's original input.
Solutions
- Reduce the size of the retry input or split the work into smaller turns
- Retry by re-typing/pasting the full input rather than using the buffered retry path
- Increase the history page size bound if the deployment routinely handles large inputs
Defensive patterns
Strategy: validation
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.
Appendix: 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)