Hmbown/CodeWhale · error · std::io::Error

Offline queue schema v{} is newer than supported v{}

Error message

Offline queue schema v{} is newer than supported v{}

What it means

The persisted offline_queue.json in checkpoints/ declares an offline-queue schema version newer than this build understands. Like the session/checkpoint readers, the loader fails closed to avoid corrupting an unrecognized queue format written by a newer release.

Source

Thrown at crates/tui/src/session_manager.rs:1400

            .map_err(|e| std::io::Error::new(std::io::ErrorKind::InvalidData, e))?;
        write_atomic(&path, content.as_bytes())?;
        Ok(path)
    }

    /// Load offline queue state if present.
    pub fn load_offline_queue_state(&self) -> std::io::Result<Option<OfflineQueueState>> {
        let path = self
            .sessions_dir
            .join("checkpoints")
            .join("offline_queue.json");
        if !path.exists() {
            return Ok(None);
        }
        let content = fs::read_to_string(&path)?;
        let state: OfflineQueueState = serde_json::from_str(&content)
            .map_err(|e| std::io::Error::new(std::io::ErrorKind::InvalidData, e))?;
        if state.schema_version > CURRENT_QUEUE_SCHEMA_VERSION {
            return Err(std::io::Error::new(
                std::io::ErrorKind::InvalidData,
                format!(
                    "Offline queue schema v{} is newer than supported v{}",
                    state.schema_version, CURRENT_QUEUE_SCHEMA_VERSION
                ),
            ));
        }
        Ok(Some(state))
    }

    /// Remove persisted offline queue state.
    pub fn clear_offline_queue_state(&self) -> std::io::Result<()> {
        let path = self
            .sessions_dir
            .join("checkpoints")
            .join("offline_queue.json");
        if path.exists() {
            fs::remove_file(path)?;

View on GitHub (pinned to 0c42157ee5)

Solutions

  1. Upgrade Codewhale to a build that supports the newer offline-queue schema
  2. Archive the offline_queue.json file and rebuild the queue if its contents are reproducible
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/tui/src/session_manager.rs:1400 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of Hmbown/CodeWhale@0c42157ee5 (2026-08-20). Data as JSON: /api/errors/f9165e51a45858f5. Report an issue: GitHub.