Skip to content

Memory backfill attributes foreign sessions to the project where backfill runs #425

Open

Description

@DivyamTalwar

Problem

The default backfill traverses multiple projects, but its stager receives one project name derived from the invoking cwd. The same name is placed in every summary prompt and pending manifest entry, mislabeling sessions from other projects.

Reproduction and expected behavior

Stage a synthetic transcript recorded under /srv/other-repo while the supplied fallback project is install-repo. Capture the generated prompt and inspect the pending manifest. Both should identify other-repo, rather than the invoking project.

Reproduced against ce30de7ca94115cb73fa991538c6d2595ac2622a using repository-native tests and isolated fixtures. A focused correction is implemented and independently validated; I will link its PR here.

Proposed scope

Use the first usable cwd recorded in each transcript, supporting Claude top-level cwd and Codex session_meta/turn_context payload cwd. Reuse the existing project-name helper and retain the provided project only as a fallback. Preserve literal spaces and dollar replacement characters in project names.

Already-staged manifest rows are not migrated. A session that changes directories keeps its first recorded project. Foreign-platform path parsing retains the existing helper behavior. This does not alter authentication, workspace routing, or cloud access.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions