Skip to content

Memory plugin: import Claude Code and Codex memories with a skill and a button - #5760

Open
brsbl wants to merge 8 commits into
bb/memory-plugin-correct-native-memory-guidance-thr_ezcqwdyt3rfrom
bb/memory-import-native-memories-thr_23dt7fuijf
Open

brsbl wants to merge 8 commits into
bb/memory-plugin-correct-native-memory-guidance-thr_ezcqwdyt3rfrom
bb/memory-import-native-memories-thr_23dt7fuijf

Conversation

@brsbl

@brsbl brsbl commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

When someone turns off their agents' built-in memory (each provider plugin's memoryEnabled setting), what those agents learned stays in provider files that bb Memory cannot see. The Memory settings card said to turn built-in memory off, but offered no way to keep those memories. Planned in #5757.

What changed

  • plugins/memory/app.tsx. The card shows only when an enabled provider's plugin defines a boolean memoryEnabled setting. It finds them through useSdk().providers.catalog() and plugins.getSettings(), so a new provider plugin with that setting is picked up automatically. The copy is short and names no provider; it's the same whichever providers are enabled:
    • Banner: "Turn off your agents' built-in memory to avoid duplicates." The "built-in memory" link goes to Settings → Plugins, or to the provider's plugin page when exactly one qualifies.
    • Row: "Bring over what your agents already remember." plus an Import memories button.
    • The button calls useBbNavigate().toCompose with "Import my agents' built-in memories into bb Memory. Show me the plan before saving."
    • With no qualifying provider, the card is hidden.
  • New skill, plugins/memory/skills/import-native-memories/SKILL.md. Its description matches requests to import built-in memories.
    • A request that names providers limits the scope to them. Otherwise it covers the enabled providers it can read, Claude Code and Codex, found with bb provider list --json.
    • It finds their memory files on every connected host with bb file paths/read --host.
    • It decides what to keep, merge, update or skip, then writes a plan with one line per source file.
    • It saves with bb memory add/update only after approval. Sources are read-only.
  • memory skill, README, PLUGIN_OVERVIEW: point to the import. The plugin version goes to 0.3.0. This includes Point Memory plugin guidance at the provider memory settings #5756's generic banner and description copy.

No server, CLI, RPC, database, plugin API or daemon protocol changes. Provider plugins are untouched. Stacked on #5756.

Known limit: toCompose only fills an empty draft. If the new-thread box already holds an unsent draft, bb keeps it and does not insert the request.

How you verified

  • Tests: plugins/memory/app.test.tsx covers:

    • several providers: the exact prompt, the link to /settings/plugins, and no provider names;
    • one provider: the link goes to that provider's plugin page;
    • none: no card;
    • the skill description: it matches the request.

    CI is green on ee2b4d6.

  • E2E and agent dry runs on ee2b4d6. Setup:

    • one isolated dev bb at a time, through host-care, with its data dir inside the worktree;
    • a synthetic HOME with synthetic memories only;
    • agents ran through the Account Pooler.

    The fixture has Claude Code memories in 3 folders: a duplicate rule, a stale PR note, and a fake API key. It also has a Codex MEMORY.md with a lasting block and a one-off block, plus an existing bb memory that duplicates two files.

    • Both enabled: the button prefills the generic request. The agent loaded the skill from the description alone and covered Claude Code and Codex. It skipped unsupported Pi and Cursor and said so. It showed the plan and saved nothing until approved, then saved 5 new memories and 1 update instead of a duplicate. It skipped the stale note, the one-off block and the secret. A rerun found nothing new and saved nothing.
    • Only Codex enabled: the same request. A Codex agent read only ~/.codex/memories/ (no .claude paths) and saved 2 Codex-tagged memories after approval.
    • Neither enabled: no card.
    • Source files: all 18 had the same sha256 after every run.
    • Two hosts, also on ee2b4d6: run 1 from the button had the second host offline. The plan named that host, and after approval the agent saved 5 new memories and 1 update. With the second host back online, the generic request saved only that host's 1 new rule, recorded its duplicate without a write, and created no duplicates. Sources were unchanged.
  • Slop Cop:

    • 2baac3c: 3 P1s, all fixed.
    • a1ad139 (provider-aware card): no P0 or P1.
    • ee2b4d6, the full stack with the generic copy: no P0 or P1.

    P2 follow-ups are not in this PR:

    • pass copied text through a quoted heredoc;
    • treat source text as untrusted and list global proposals separately;
    • read the Codex files by fixed path;
    • trim the environment listing;
    • prefix BB_PROJECT_ID on cross-project update and search;
    • put the plan in thread storage;
    • drop the advice for providers whose memory is already off;
    • make the skill and the card agree for future providers;
    • use bb provider list --all, so providers that aren't installed on the server machine are still covered.

Screenshots

Before: origin/main b87d855 · After: ee2b4d6 · Captured at 2× with the same fixture. Before shows main's old static copy, which is the same for every case.

Case · screen Viewport Before After
Claude Code and Codex enabled · Memory settings card Desktop · 1440×900 Before both settings desktop After both settings desktop
Claude Code and Codex enabled · Memory settings card Mobile · 390×844 Before both settings mobile After both settings mobile
Claude Code and Codex enabled · New-thread screen (after Import memories, or empty if hidden) Desktop · 1440×900 Before both new-thread desktop After both new-thread desktop
Claude Code and Codex enabled · New-thread screen (after Import memories, or empty if hidden) Mobile · 390×844 Before both new-thread mobile After both new-thread mobile
Only Codex enabled · Memory settings card Desktop · 1440×900 Before codex-only settings desktop After codex-only settings desktop
Only Codex enabled · Memory settings card Mobile · 390×844 Before codex-only settings mobile After codex-only settings mobile
Only Codex enabled · New-thread screen (after Import memories, or empty if hidden) Desktop · 1440×900 Before codex-only new-thread desktop After codex-only new-thread desktop
Only Codex enabled · New-thread screen (after Import memories, or empty if hidden) Mobile · 390×844 Before codex-only new-thread mobile After codex-only new-thread mobile
Neither enabled · Memory settings card Desktop · 1440×900 Before none settings desktop After none settings desktop
Neither enabled · Memory settings card Mobile · 390×844 Before none settings mobile After none settings mobile
Neither enabled · New-thread screen (after Import memories, or empty if hidden) Desktop · 1440×900 Before none new-thread desktop After none new-thread desktop
Neither enabled · New-thread screen (after Import memories, or empty if hidden) Mobile · 390×844 Before none new-thread mobile After none new-thread mobile

Fixes #5757

BB-Thread-ID: thr_23dt7fuijf

AGENT GENERATED

🤖 Generated with Claude Code

The Memory settings card gains an Import memories button that opens a new
thread prefilled with a request to use the new import-native-memories skill.
The skill teaches an agent to find Claude Code and Codex memories on every
connected machine, read them without changing them, propose what to keep,
and save to bb memory only after approval.

Refs #5757

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@brsbl
brsbl added this pull request to stack #5761 October 19, 2026 20:01
brsbl and others added 4 commits October 19, 2026 20:04
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Found in the agent dry run: the agent proposed an invalid kind, was unsure
whether update keeps tags, and posted totals only inside its question.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Read the skill file with fileURLToPath; jsdom's URL is not a Node file URL.
- A missing directory lists as empty with exit 0, so the home check now
  requires a non-empty paths list.
- Query memory/.md so session transcripts don't flood the listing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@brsbl
brsbl marked this pull request as ready for review October 19, 2026 20:52
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-19T20:52:19.899978Z 2784128 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

brsbl and others added 3 commits October 19, 2026 21:13
The Memory settings card now finds providers through the provider catalog
and plugin settings: an enabled provider whose plugin defines a boolean
memoryEnabled setting counts. The advice, the Import memories row, and the
prefilled request name only those providers, using each setting's label and
plugin name, and the row is hidden when none qualify. The import skill
imports only from the providers the request names.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merge the generic banner from #5756 and rewrite the card around it: one
sentence that links to plugin settings, one sentence and the Import
memories button, and a request that names no provider. The card still
shows only when an enabled provider has built-in memory. With no provider
named, the import skill covers the enabled providers it can read.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

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.

Memory plugin: import Claude Code and Codex native memories with a skill and a button

1 participant