Skip to content

fix(pi): scope memory_save memories to the current project - #1185

Open
hejiawow wants to merge 1 commit into
rohitg00:mainfrom
hejiawow:fix/pi-remember-project-scope
Open

fix(pi): scope memory_save memories to the current project#1185
hejiawow wants to merge 1 commit into
rohitg00:mainfrom
hejiawow:fix/pi-remember-project-scope

Conversation

@hejiawow

@hejiawow hejiawow commented Aug 13, 2026

Copy link
Copy Markdown

The server's mem::remember only stamps a memory with a project when project is passed explicitly; otherwise the memory is stored as global (project: null). Every other official integration passes its project, so pi was the odd one out: all memories saved from pi landed in the global bucket while observations from the same session were project-scoped.

Pass currentProject so memory_save results are queryable under the same project bucket as the session's observations. Search stays global either way (smart-search is not project-filtered), so cross-project recall is unaffected.

Summary by CodeRabbit

  • Bug Fixes
    • Memory saves now include the currently selected project, improving project-specific memory handling.

The server's mem::remember only stamps a memory with a project when project is passed explicitly; otherwise the memory is stored as global (project: null). Every other official integration passes its project, so pi was the odd one out: all memories saved from pi landed in the global bucket while observations from the same session were project-scoped.

Pass currentProject so memory_save results are queryable under the same project bucket as the session's observations. Search stays global either way (smart-search is not project-filtered), so cross-project recall is unaffected.

Signed-off-by: hejia <hejia@ahu.com>
Signed-off-by: hejiawow <16770133+hejiawow@users.noreply.github.com>
@vercel

vercel Bot commented Aug 13, 2026

Copy link
Copy Markdown

@hejiawow is attempting to deploy a commit to the rohitg00's projects Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 276d34e7-0fd7-4f64-8abc-0abebd341a9e

📥 Commits

Reviewing files that changed from the base of the PR and between 2973e4e and fa9b552.

📒 Files selected for processing (1)
  • integrations/pi/index.ts

📝 Walkthrough

Walkthrough

memory_save now sends the resolved currentProject to agentmemory. This adds project scope to the existing memory content and type payload.

Changes

Memory save project scope

Layer / File(s) Summary
Add project scope to memory save payload
integrations/pi/index.ts
The memory_save request body now includes project: currentProject.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Mergeability Score: ⚪ Minimal · up to fa9b5

This localized change scopes pi-saved memories to the current project without changing global search behavior; no actionable merge-blocking risk remains after normal checks and review.

Possibly related PRs

Suggested reviewers: rohitg00

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the project-scoping fix for pi integration memory_save operations.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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