Add ad-hoc memory note tool#24562
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3b14490c63
ℹ️ 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".
| } | ||
| Err(err) => return Err(err.into()), | ||
| }; | ||
| file.write_all(request.note.as_bytes())?; |
There was a problem hiding this comment.
Bound ad-hoc notes before persisting
When the model/user supplies a large note, this writes it verbatim with no byte or token cap. The new file lives under the memories tree and can later be injected back into model-visible memory context through the memory tools/consolidation flow, so one ad-hoc note can exceed the repository's hard context-size guidance (>1k/10k-token items). Please reject or truncate oversized notes at the backend boundary rather than relying on the schema hint, which is not enforced by parse_args.
Useful? React with 👍 / 👎.
Why
Codex memory updates currently rely on instructions that tell agents to create ad-hoc note files directly in the memory workspace. The memories extension already has a
MemoriesBackendabstraction for local storage and future non-filesystem backends, so the ad-hoc note writer should live behind that same interface instead of baking local filesystem assumptions into the tool shape.What
memories/add_ad_hoc_notetool to the existing memories tool bundle.MemoriesBackendwithadd_ad_hoc_noteplus request/response types so remote memory stores can implement the same operation later.extensions/ad_hoc/notes.YYYY-MM-DDTHH-MM-SS-<slug>.md), rejects path-like filenames, rejects empty notes, and uses create-new semantics so existing notes are never overwritten.Test Plan
just test -p codex-memories-extension