Skip to content

validateRelaunchOverrides

validateRelaunchOverrides(body, repoRoot): RelaunchResult

Defined in: src/validate.ts:533

Validate a POST /api/sessions/:id/relaunch override body — the SAME fields create validates, but every one is OPTIONAL (an absent field inherits the original session’s already-validated value, so it is NOT re-checked). Closes the create/relaunch asymmetry: a present repoPath/baseBranch/model/images is run through the identical validator validateCreate uses, and unknown keys are rejected — so an override can never reach worktree.create / the --model spawn flag unguarded. Pure (only validateRepoPath / validateImages touch the fs); never throws. Mirrors validateCreate’s { ok, error } contract so the route can return the same 400 body. null → no overrides (quick relaunch).

unknown

string

RelaunchResult