openai/codex · error · anyhow::Error

reasoning item in payload {} had non-string encrypted_conten

Error message

reasoning item in payload {} had non-string encrypted_content

What it means

Error "reasoning item in payload {} had non-string encrypted_content" thrown in openai/codex.

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)

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.