Repository navigation
✨ agents: CLI auto-memory off by default; clear_memory_on_kick wipes per-agent memory before each kick - #17089
Conversation
…per-agent memory before each kick
Adds agents.cli_memory {auto_memory, clear_on_kick} with per-agent override,
seeds the vendor off-switches (Claude env var, Codex [features] memories,
Copilot settings.json memory) and removes the agent's own memory stores next
to the /clear kick when clear_on_kick is set.
Fixes #17032
Signed-off-by: Andrew Anderson <andy@clubanderson.com>
… cli_memory in agent-knowledge-and-memory.md Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Open PR overlap checkBase branch: Conflicts are checked with every PR merged onto the current tip of
|
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. @clubanderson this PR is held at Failing checks:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. |
…tingsparity tool fixture gains the two cli_memory leaves Signed-off-by: Andrew Anderson <andy@clubanderson.com>
|
Thank you for your contribution! Your PR has been merged. We'd love to hear how your experience was: share feedback |
Fixes #17032
Why
Even with per-agent homes (#17039), each subscription CLI keeps a hidden long-lived notebook (Claude auto-memory
MEMORY.md, Codexmemories/, Copilotmemory) that accumulates stale one-off inferences and survives every/clear—clear_on_kickonly resets the conversation. Hive agents get durable context from beads/knowledge/kick prompt, so the default should be off, with an opt-in and a per-kick wipe.Config
CLIMemoryConfig(crux/config/cli_memory.go), stamped onto each agent likesession_recycle;AutoMemoryEnabled()is nil-safe (default false). Settings-parity leaves + dashboard allowlist updated.Exact vendor switches (seeded only when
auto_memoryis false;truepins the opposite so an operator's own setting is never shadowed)CLAUDE_CODE_DISABLE_AUTO_MEMORY=1in the agent env (per-process → per-agent override works)[features] memories = falsemerged into$CODEX_HOME/config.toml(codexConfigSeed, alongside the update-check pin)"memory": falsein the per-agent~/.copilot/settings.json(the key `/memory onclear_on_kickmanager_kick.go: before every non-resume kick, right before the/clearblock,clearCLIMemoryForKickremoves this agent's~/.claude/projects/*/memory/,$CODEX_HOME/memories*/,~/.gemini/GEMINI.md(RemoveAll, su-execrm -rffallback on EPERM). Skipped for uid 0 /HIVE_SHARED_AGENT_HOME=1(would touch the shared tree). Copilot memory is server-side — no local store.Tests (
-race, no sleeps)crux/agent/cli_memory_test.go: env pin default + opt-in; Codex TOML merge cases incl. existing[features]table andcodexConfigSeed(nil,false); Copilot settings seed + owns-the-key; kick wipe removes only this agent's stores and leaves the sibling/shared trees; off-by-default and shared-home skip.pkg/config/cli_memory_test.go: YAML parse, defaults, per-agent override stamping.internal/settingsparityleaves;manager_test.goenv-count adjusted for the Claude pin.Docs:
docs/agent-configuration.md—cli_memoryin the per-agent YAML example and a new "CLI auto-memory (agents.cli_memory)" section with the table above. Changelogchangelog.d/added-agent-cli-memory-config.md.