Skip to content

feat(session): recall saved project conversations across sessions - #1045

Open
俞小姐与茉莉清茶 (Sanikki) wants to merge 2 commits into
synthetic-sciences:mainfrom
Sanikki:feat/project-memory
Open

俞小姐与茉莉清茶 (Sanikki) wants to merge 2 commits into
synthetic-sciences:mainfrom
Sanikki:feat/project-memory

Conversation

@Sanikki

Copy link
Copy Markdown

What does this PR do, and why?

New sessions can automatically recall recent completed exchanges from the existing durable conversation store in the same project and directory, including after a restart. No remember command, extra model call, or second store is required.

Recall examines up to eight eligible sessions and 32 messages per candidate, returning up to four exchanges within 16 KiB. It excludes child, archived and reverted sessions, failed/unfinished replies, reasoning and tool output. Snapshots refresh each turn, including queued turns.

Optional .openscience/memory/**/*.md notes and recall follow local/URL instructions within the shared 64-source / 1 MiB budget. OPENSCIENCE_DISABLE_PROJECT_MEMORY=1 disables both.

Linked issue

Related to #1043. Opening as a draft for design discussion; maintainer agreement is still pending on the proposed approach. This provides recent-conversation recall, not full-history semantic summarization.

How did you verify it?

  • From backend/cli: bun test --timeout 200000 ./test/session/project-memory.test.ts ./test/session/project-memory-budget.test.ts ./test/session/project-memory-recall.test.ts ./test/session/project-memory-prompt.test.ts ./test/session/instruction.test.ts — 29 passed, 0 failed. Includes separate-process persistence, isolation, exclusions, queued-turn refresh, switches and instruction-budget precedence.
  • bun x tsc --noEmit -p backend/cli/tsconfig.json and changed-file Prettier checks passed.
  • bun run test:docs passed after temporarily normalizing checkout CRLF to LF; unrelated files were restored.
  • bun run setup --web built the workspace successfully. Staged gitleaks scan passed.
  • Full bun run check stopped at formatting warnings in 2,215 unchanged files in this Windows checkout; none were in this patch. Later full-check stages did not run. Linux-specific behavior remains unverified locally.

Checklist

  • bun run check is green (format, typecheck, backend + frontend/ui + SDK tests)
  • CHANGELOG.md has an Unreleased entry
  • Matching user documentation updated
  • No version bumps

No server API/SDK, installer or UI source changes.

Sessions start empty, so decisions reached in an earlier session in the same
project get restated every time. Read every markdown file under
.openscience/memory/ into the instruction sources, appended last so the
existing byte budget drops memory before AGENTS.md or configured
instructions.

Reading alone leaves the directory empty, so the prompt also names the file a
new note goes in: when the user asks the agent to remember something it
appends an entry there with its file tools. Nothing is captured, summarized
or written in the background.
@vercel

vercel Bot commented Nov 4, 2026

Copy link
Copy Markdown

俞小姐与茉莉清茶 (@Sanikki) is attempting to deploy a commit to the InkVell Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant