BigPizzaV3/CodexPlusPlus · error

session_id cannot be empty

Error message

session_id cannot be empty

What it means

Thrown by SessionRef::new when the provided session_id string is empty. SessionRef is the universal session handle passed across the bridge/data layer, so the constructor refuses to mint an un-addressable reference; the offending input is the caller-supplied session_id (empty string/blank).

Source

Thrown at crates/codex-plus-core/src/models.rs:14

#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub struct SessionRef {
    pub session_id: String,
    pub title: String,
}

impl SessionRef {
    pub fn new(
        session_id: impl Into<String>,
        title: impl Into<String>,
    ) -> anyhow::Result<SessionRef> {
        let session_id = session_id.into();
        if session_id.is_empty() {
            anyhow::bail!("session_id cannot be empty");
        }

        Ok(SessionRef {
            session_id,
            title: title.into(),
        })
    }
}

#[derive(Debug, Clone, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "snake_case")]
pub enum DeleteStatus {
    ServerDeleted,
    LocalDeleted,
    Partial,
    Failed,
    Undone,
}

View on GitHub (pinned to f2074595a2)

Solutions

  1. 传入非空的会话 id
  2. 调用前先过滤空 session_id
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/codex-plus-core/src/models.rs:14 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BigPizzaV3/CodexPlusPlus@f2074595a2 (2026-08-23). Data as JSON: /api/errors/956d69cc1e3e08e4. Report an issue: GitHub.