alibaba/open-code-review · error

resume session %q closed without a run manifest, so its inpu

Error message

resume session %q closed without a run manifest, so its input identity cannot be verified — it either predates run manifests or failed before recording one; %s

What it means

validateInputIdentity rejects resuming a cleanly-closed session that carries no run manifest. Unlike an interrupted session, this one closed with session_end but never recorded one — either it predates the run-manifest feature or its run failed before freezing a manifest — so its input identity cannot be verified against the current request.

Source

Thrown at internal/session/resume_identity.go:95

// pins the run to the commit endpoints this comparison was made against (see
// agent.SealedInput), so a second comparison could only ever confirm the first.
func (s *ResumeState) validateInputIdentity(id RunIdentity) error {
	if s == nil {
		return nil
	}

	m := s.Manifest
	switch {
	case m == nil && !s.Closed:
		// Distinguishing all of these from "manifest present, zero completed
		// items" is the whole point: that one is resumable, none of these are.
		return fmt.Errorf("resume session %q was interrupted before it closed, so it never recorded a run manifest and its input identity cannot be verified; %s", s.SessionID, resumeHint)
	case m == nil:
		// It closed cleanly, so blaming an interruption would send the user
		// looking for a crash that never happened. A session_end with no manifest
		// is a session older than run manifests, or a run that failed before
		// freezing one.
		return fmt.Errorf("resume session %q closed without a run manifest, so its input identity cannot be verified — it either predates run manifests or failed before recording one; %s", s.SessionID, resumeHint)
	case m.SchemaVersion != ManifestSchemaVersion:
		return fmt.Errorf("resume session %q carries manifest schema %q, but this build can only verify %q; %s", s.SessionID, m.SchemaVersion, ManifestSchemaVersion, resumeHint)
	case m.Operation != OperationReview:
		return fmt.Errorf("resume session %q recorded operation %q, not %q; %s", s.SessionID, m.Operation, OperationReview, resumeHint)
	case len(m.Coverage.Selected) == 0:
		// Without this, an empty parent and an empty child would both hash to the
		// canonical empty digest, pass every comparison, and produce a run that
		// reuses nothing and dispatches nothing.
		return fmt.Errorf("resume session %q selected no input, so it has nothing to resume; %s", s.SessionID, resumeHint)
	}

	if m.Input.Mode != id.Mode {
		// Mode feeds item_id derivation, so parent and child items cannot even be
		// put side by side.
		return fmt.Errorf("resume rejected: input mode changed from %q to %q; %s", m.Input.Mode, id.Mode, resumeHint)
	}
	// Both sides empty means a repository with no remote, which is unchanged.
	if m.Repository.IdentitySHA256 != id.RepositorySHA256 {

View on GitHub (pinned to 5cf97d0d15)

Solutions

  1. Start a new review instead of resuming the legacy/failed session
  2. Upgrade-check both sides: if the session predates manifests, no resume is possible — re-run the review
  3. Inspect the session store to confirm the manifest is truly absent (not a storage/path issue)
Defensive patterns

Strategy: validation

Validate before calling

// Only attempt resume on sessions that closed with a manifest
if sess.Closed && sess.Manifest == nil {
    return fmt.Errorf("session %s has no run manifest (legacy or failed run); re-run the review", sess.SessionID)
}

Type guard

func hasVerifiableManifest(s *session.State) bool {
    return s != nil && s.Manifest != nil
}

Try / catch

if err := ValidateResume(s, req); err != nil {
    if strings.Contains(err.Error(), "closed without a run manifest") {
        return startNewReview(req) // legacy/failed session cannot be resumed
    }
    return err
}

Prevention

When it happens

Trigger: ValidateResume on a session where s.Manifest == nil and s.Closed == true — e.g. resuming a session created by an older build without manifest support, or a run that errored before the manifest was written.

Common situations: Upgrading open-code-review and trying to resume sessions created by a pre-manifest version; a parent run that failed early (e.g. provider auth error) leaving a closed but manifest-less session.

Related errors


AI-assisted analysis of alibaba/open-code-review@5cf97d0d15 (2026-09-02). Data as JSON: /api/errors/fcb595b5ebd10dd3. Report an issue: GitHub.