Skip to main content

resolve_active_deployment

Function resolve_active_deployment 

Source
pub async fn resolve_active_deployment(
    storage: &Storage,
    project: &Project,
    home: &Path,
) -> Result<(SessionVariant, ConfigId, Option<ExperimentId>)>
Expand description

Figure out which variant + config_id a new session should be tagged with.

  1. If a per-project deployment-state file exists from a SessionStart hook that just ran, use that — it tells us exactly which variant was deployed for this session.
  2. Otherwise: if an experiment is running, mark as challenger (full traffic fallback); else champion. This path is hit when Claude Code’s SessionStart hook didn’t fire.