Skip to content

feat(profile): extract preferences from sessions - #11

Merged
happycastle114 merged 2 commits into
mainfrom
feat/profile-memory-quality-v0-6
Aug 6, 2026
Merged

feat(profile): extract preferences from sessions#11
happycastle114 merged 2 commits into
mainfrom
feat/profile-memory-quality-v0-6

Conversation

@happycastle114

Copy link
Copy Markdown
Owner

Extract direct, explicit preferences across an entire session at digest time while retaining conservative profile safety gates. Release v0.6.3.

Soungmin and others added 2 commits August 6, 2026 21:19
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e3cc9c326e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/index.ts
.map((message) => getText(message.parts)),
);
for (const [index, preference] of preferences.entries()) {
await graphitiClient.addMemory(preference.content, tags.user, {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Deduplicate preferences before writing them on idle

With the default autoSaveTurns and autoSavePreferences settings, message.updated already stores an explicit preference through saveFinishedTurnMemories and its remote duplicate check; the following session.idle then writes the same content again through this unconditional addMemory. Every later idle also replays the entire preference list before the digest refresher can decide that the digest is unchanged, creating redundant profile episodes and potentially distorting Graphiti's temporal profile. Route these writes through the existing distinct-memory persistence path or track which session preferences were already saved.

Useful? React with 👍 / 👎.

Comment thread src/index.ts
Comment on lines +189 to +192
const preferences = extractSessionProfileMemories(
messages
.filter((message) => message.info?.role === "user")
.map((message) => getText(message.parts)),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Sanitize session text before extracting profile memories

When a non-synthetic user part contains a durable preference followed in the same sentence by a <system-reminder> block, passing raw getText(...) output here causes extractExplicitProfileMemory to include and persist that internal block in the cross-project user profile. The existing turn and digest persistence paths deliberately call sanitizeTextForStorage to remove these blocks; apply that sanitation before session profile extraction as well.

Useful? React with 👍 / 👎.

@happycastle114
happycastle114 merged commit 863a7d1 into main Aug 6, 2026
2 checks passed
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