Skip to content

feat: seed ad-hoc memory extension instructions#20606

Merged
jif-oai merged 2 commits into
mainfrom
jif/extension-module
May 1, 2026
Merged

feat: seed ad-hoc memory extension instructions#20606
jif-oai merged 2 commits into
mainfrom
jif/extension-module

Conversation

@jif-oai

@jif-oai jif-oai commented May 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

Ad-hoc memory notes are written under memories/extensions/ad_hoc/, but the consolidation agent only knows how to interpret an extension when the extension folder has an instructions.md. Seed those instructions from the memories write pipeline so an enabled memories startup creates the expected ad-hoc extension layout automatically.

This also moves extension-specific write behavior behind a dedicated memories/write/src/extensions/ module. ad_hoc owns the seeded instructions template, while the existing resource-retention cleanup lives in its own prune module so future memory extensions can add their own write-side setup without growing a flat helper file.

Changes

  • Seed memories/extensions/ad_hoc/instructions.md during eligible memory startup without overwriting an existing file.
  • Store the ad-hoc instructions template under memories/write/templates/extensions/ad_hoc/, keeping ownership in codex-memories-write.
  • Split memory extension support into extensions::ad_hoc and extensions::prune.
  • Keep the existing old-resource pruning behavior unchanged.

Verification

  • cargo test -p codex-memories-write
  • bazel build //codex-rs/memories/write:write

@jif-oai jif-oai changed the title feat: add extension module to memories feat: seed ad-hoc memory extension instructions May 1, 2026
@jif-oai

jif-oai commented May 1, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

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

Copy link
Copy Markdown
Contributor

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: de0dfe629e

ℹ️ 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 codex-rs/memories/write/src/extensions/ad_hoc.rs Outdated
Co-authored-by: chatgpt-codex-connector[bot] <199175422+chatgpt-codex-connector[bot]@users.noreply.github.com>
@jif-oai

jif-oai commented May 1, 2026

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown
Contributor

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

ℹ️ 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".

@jif-oai jif-oai merged commit ff27d01 into main May 1, 2026
25 checks passed
@jif-oai jif-oai deleted the jif/extension-module branch May 1, 2026 12:44
@github-actions github-actions Bot locked and limited conversation to collaborators May 1, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant