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

Session goal schema v{} is newer than supported v{}

Error message

Session goal schema v{} is newer than supported v{}

What it means

Forward-compatibility guard in SessionGoalState::validate: the persisted goal sidecar declares a schema_version greater than CURRENT_SESSION_GOAL_SCHEMA_VERSION, meaning it was written by a newer Codewhale version and this build cannot safely interpret it.

Source

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

        };
        let state = Self {
            schema_version: CURRENT_SESSION_GOAL_SCHEMA_VERSION,
            objective: objective.to_string(),
            status,
            token_budget: snapshot.token_budget,
            tokens_used: snapshot.tokens_used,
            time_used_seconds: snapshot.time_used_seconds,
            continuation_count: snapshot.continuation_count,
            elapsed_seconds: snapshot.elapsed_seconds.unwrap_or_default(),
            pause_reason: snapshot.pause_reason,
        };
        state.validate()?;
        Ok(Some(state))
    }

    pub fn validate(&self) -> io::Result<()> {
        if self.schema_version > CURRENT_SESSION_GOAL_SCHEMA_VERSION {
            return Err(io::Error::new(
                io::ErrorKind::InvalidData,
                format!(
                    "Session goal schema v{} is newer than supported v{}",
                    self.schema_version, CURRENT_SESSION_GOAL_SCHEMA_VERSION
                ),
            ));
        }
        let objective = self.objective.trim();
        if objective.is_empty() || objective.chars().count() > MAX_SESSION_GOAL_OBJECTIVE_CHARS {
            return Err(io::Error::new(
                io::ErrorKind::InvalidData,
                format!(
                    "Session goal objective must contain 1..={MAX_SESSION_GOAL_OBJECTIVE_CHARS} characters"
                ),
            ));
        }
        Ok(())
    }

View on GitHub (pinned to 0c42157ee5)

Solutions

  1. Upgrade Codewhale to a version supporting the newer goal schema.
  2. Remove or archive the newer-format goal sidecar if continuing on the old version is required.
  3. Avoid manually editing schema_version fields in goal files.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/tui/src/session_manager.rs:593 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/97fd3ffb41e6c2fd. Report an issue: GitHub.