Repository navigation
Memory: nightly cleanup as a skill and a gated trigger - #123
Conversation
`~/.agent/memory schedule --model M` adds the trigger `memory-cleanup`: at 03:30 it starts an agent in `~/.agents/memory` that follows the new `memory-cleanup` skill, gated by `memory changed` so a quiet night costs no turn. `cleanup start` and `cleanup finish` commit to a local git repository in the memory folder; `finish` reverts a cleanup that removed more than a quarter of the facts (two at least). The daemon is unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019xtP72bEUJnpaJshaUzKwG
|
You have reached your Codex usage limits for security reviews. Please try again later. |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b545207ddb
ℹ️ 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".
`changed` counts an open cleanup, so a run cut short is finished the next night. A new memory repository commits its `.gitignore` alone, so a night with no facts costs no turn. The skill and docs say git keeps memory as it was at each cleanup, not every version. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019xtP72bEUJnpaJshaUzKwG
|
@codex review Generated by Claude Code |
|
You have reached your Codex usage limits for security reviews. Please try again later. |
1 similar comment
|
You have reached your Codex usage limits for security reviews. Please try again later. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9e1ffecfd2
ℹ️ 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".
git for memory clears a hook's GIT_DIR and the like, as triggers' git does, and pins line endings so a restored fact is byte for byte. The repository is initialized shared 0600, and files a loss-guard revert writes back are made 0600 again, as the facts are. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019xtP72bEUJnpaJshaUzKwG
|
You have reached your Codex usage limits for security reviews. Please try again later. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fdb6457dfe
ℹ️ 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".
`schedule` without `--model` keeps the memory-cleanup agent it started, so moving the time after `trigger rm` works; with `--model` while that agent exists, the refusal says how to keep or replace it. Memory's git ignores the person's global excludes and attributes, so every fact is snapshotted and restored byte for byte. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_019xtP72bEUJnpaJshaUzKwG
|
You have reached your Codex usage limits for security reviews. Please try again later. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 306ff8718e
ℹ️ 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".
…-k9p3ok # Conflicts: # app/src-tauri/src/memory.rs
|
You have reached your Codex usage limits for security reviews. Please try again later. |
Before: memory only grows. Agents save facts, nothing merges duplicates or drops superseded ones, and the 4 KiB index eventually refuses saves with
memory_full.After:
~/.agent/memory schedule --model PROVIDER/MODELadds a nightly trigger,memory-cleanup. At 03:30 (--cronmoves it) it starts an agent in~/.agents/memorythat follows the newmemory-cleanupskill: merge duplicates, drop superseded facts, date relative ones, using onlysaveandrm. A night when nothing was saved or removed costs no turn, because the trigger's--ifrunsmemory changed.The daemon is unchanged. The cleanup is a skill plus a T1 trigger plus three script verbs:
memory changedexits 0 only when the folder differs from the last commit.memory cleanup startmakes~/.agents/memorya local git repository (never pushed) and commits what agents saved. It returns the facts saved and removed since the last cleanup, which the agent reads first instead of every fact.memory cleanup finishcommits the cleanup and returns what it removed, added and changed. If the cleanup removed more than a quarter of the facts (and more than two),finishreverts it with a new commit (loss_guard). Memory goes back to how it was, and the refused cleanup stays in history.Plan picks and departures
schedule, it is on from then on. M3's memory panel could offer it as a toggle.inbox/, removing facts for staleverifieddates (the skill forbids removing a fact for age alone), and posting the diff to the app (the agent's reply carries it, and M3 owns the app side).For M3 (Rich rendering thread)
~/.agents/memorynow holds.git/,.gitignoreand, during a cleanup,.cleanup. None of them are.md, so fact listing andcheckignore them. A panel listing the folder should skip dot entries too.Checks
cargo fmt --checkandcargo clippy -D warningsare clean (workspace and app).remote::tests::no_ssh_config_changes_what_the_app_forces, and it fails the same way on main in this Linux container (its ssh probe).node --test app/tests/*.cjs: 218 pass.saved/removedlists, the loss-guard revert and the trigger arguments.schedulehasn't been run against launchd, since triggers only run on macOS.🤖 Generated with Claude Code