openai/codex · error · anyhow::Error
reasoning item in payload
Error message
reasoning item in payload {} had non-string encrypted_content What it means
A reasoning item carried an `encrypted_content` field that was neither null nor a JSON string (e.g. an object or number), so it cannot be stored as an encoded conversation part.
Solutions
- Fix the payload so encrypted_content is a string or null
- Coerce or reject non-string values at the trace producer
Defensive patterns
Strategy: type-guard
When it happens
Trigger: Thrown at codex-rs/rollout-trace/src/reducer/conversation/normalize.rs:262 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/091ffc039c5ff0e7.
Report an issue: GitHub.
Appendix: source
Thrown at codex-rs/rollout-trace/src/reducer/conversation/normalize.rs:262
"content",
ReasoningPartKind::Content,
raw_payload,
&mut parts,
)?;
append_reasoning_parts(
item,
"summary",
ReasoningPartKind::Summary,
raw_payload,
&mut parts,
)?;
if let Some(encrypted_content) = item.get("encrypted_content") {
let encrypted_content = match encrypted_content {
Value::Null => None,
Value::String(encrypted_content) => Some(encrypted_content),
_ => {
bail!(
"reasoning item in payload {} had non-string encrypted_content",
raw_payload.raw_payload_id
);
}
};
if let Some(encrypted_content) = encrypted_content {
parts.push(ConversationPart::Encoded {
label: "encrypted_content".to_string(),
value: encrypted_content.to_string(),
});
}
}
if parts.is_empty() {
bail!(
"reasoning item in payload {} contained no content, summary, or encrypted_content",
raw_payload.raw_payload_id
);View on GitHub (pinned to 339751715c)