pbakaus/impeccable · info

[impeccable] Ignoring saved live session from another projec

Error message

[impeccable] Ignoring saved live session from another project (

What it means

Before adopting a saved session from localStorage, the script compares the saved session's appRoot against the current APP_ROOT. localStorage is per-origin, and two projects routinely reuse the same localhost port, so a session stamped with another project's appRoot is that project's leftover and can never be completed by this server. The script logs this warning, clears the saved session, and returns null so the picker starts fresh.

Source

Thrown at skill/scripts/live-browser.js:9236

      pageUrl: location.pathname,
      paramValues: { ...paramsCurrentValues },
      parameterState: parameterGenerationState,
      insertPlaceholder: insertPlaceholderSnapshot || undefined,
      pickedAnchor: pickedAnchorSnapshot || undefined,
      pickedAnchorViewportTop: Number.isFinite(pickedAnchorViewportTop) ? pickedAnchorViewportTop : undefined,
      pageHash: location.hash || undefined,
      pageSearch: location.search || undefined,
    });
  }

  function loadSession() {
    const saved = sessionState.loadSession();
    // localStorage is per-origin, and two projects routinely reuse the same
    // localhost port. A saved session stamped with another project's appRoot
    // is that project's leftover, never a session this server can complete;
    // resuming it freezes the picker behind an unfinishable banner.
    if (saved?.appRoot && APP_ROOT && saved.appRoot !== APP_ROOT) {
      console.warn('[impeccable] Ignoring saved live session from another project (' + saved.appRoot + ').');
      sessionState.clearSession();
      return null;
    }
    return saved;
  }

  function clearSession() {
    sessionState.clearSession();
  }

  /** Mark session as handled (accepted/discarded). The agent will clean up
   *  the source, but until it does the wrapper is still in the HTML. This
   *  prevents resumeSession from picking it up again after reload. */
  function markSessionHandled() {
    if (!currentSessionId) return;
    sessionState.markHandled(currentSessionId);
  }

View on GitHub (pinned to 2bc2879276)

Solutions

  1. Nothing needed — the stale session is cleared automatically; just pick an element.
  2. Give each project a distinct dev port so their localStorage namespaces do not collide.
  3. Manually clear localStorage for the origin if you want to remove leftovers proactively.
  4. Avoid restoring another checkout's browser profile/storage into this project.
Defensive patterns

Strategy: validation

Validate before calling

const saved = sessionState.loadSession();
if (saved?.appRoot && APP_ROOT && saved.appRoot !== APP_ROOT) {
  sessionState.clearSession();
  return null; // leftover from another project on the same origin
}

Type guard

function isOwnSession(saved, currentAppRoot) {
  return Boolean(saved) && (!saved.appRoot || saved.appRoot === currentAppRoot);
}

Prevention

When it happens

Trigger: Page load resumes a saved session when saved?.appRoot is set and differs from the current APP_ROOT — i.e. a different project previously saved a live session on the same origin (same host:port).

Common situations: Two dev projects sharing localhost:3000/5173; copying localStorage between environments; switching repos without clearing browser storage; running the same port for frontend and a different app previously used with impeccable.

Related errors


AI-assisted analysis of pbakaus/impeccable@2bc2879276 (2026-09-08). Data as JSON: /api/errors/0b07d9950ebc8f8a. Report an issue: GitHub.