openai/codex · error
status history thread-usage state poisoned
Error message
status history thread-usage state poisoned
What it means
Error "status history thread-usage state poisoned" thrown in openai/codex.
Source
Thrown at codex-rs/tui/src/status/thread_usage.rs:53
/// Shared state updates a committed `/status` card when its asynchronous estimate arrives.
#[derive(Clone, Debug, Default)]
pub(crate) struct StatusThreadUsage {
estimate: Arc<RwLock<Option<ThreadUsage>>>,
reserve_label_width: Arc<AtomicBool>,
}
impl StatusThreadUsage {
pub(crate) fn reserve_label_width(&self) {
self.reserve_label_width
.store(/*val*/ true, Ordering::Relaxed);
}
pub(crate) fn set_estimate(&self, estimate: Option<ThreadUsage>) {
#[expect(clippy::expect_used)]
let mut stored_estimate = self
.estimate
.write()
.expect("status history thread-usage state poisoned");
*stored_estimate = estimate;
}
pub(crate) fn push_labels(&self, labels: &mut Vec<String>, seen: &mut BTreeSet<String>) {
// Keep existing card rows stable when asynchronous billing details arrive. Reserving a
// formatter label does not emit a loading placeholder or an empty billing row.
if self.reserve_label_width.load(Ordering::Relaxed) {
push_label(labels, seen, BILLED_TOKENS_LABEL);
}
#[expect(clippy::expect_used)]
let stored_estimate = self
.estimate
.read()
.expect("status history thread-usage state poisoned");
let Some(estimate) = stored_estimate.as_ref() else {
return;
};
push_label(labels, seen, "Thread usage");View on GitHub (pinned to 339751715c)
When it happens
Trigger: Thrown at codex-rs/tui/src/status/thread_usage.rs:53 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/b62ec58ed99e50e2.
Report an issue: GitHub.