feat: add Claude-style memory recall#102
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR redesigns iac-code memory around a Claude Code-style workflow.
Users now manage long-lived instruction memory through
/memory, while auto-memory topic files are recalled in the background only when relevant. The old memory folder manager remains available as a hidden compatibility command, but it is no longer the primary user experience.User-Facing Changes
New
/memoryexperience/memorynow opens an interactive memory screen instead of the old memory-folder command UI.Users can:
Project and user memory are edited in a full-screen Vim-like editor. The editor supports the core operations users expect for this flow, including insert/normal mode, cursor movement, save-and-quit, and quit-without-saving. Saving only writes the file when content actually changed.
Instruction memory uses
AGENTS.mdInstruction memory now defaults to
AGENTS.md.IAC_CODE_INSTRUCTION_MEMORY_FILE.make runandmake devset that override toIAC-CODE.md, preserving the local development workflow.This means released/default behavior aligns with
AGENTS.md, while local development can still useIAC-CODE.md.Auto-memory is recalled, not always injected
Auto-memory topic files are no longer permanently inserted into the main system prompt.
Instead, iac-code performs a small background recall query using:
When relevant topic files are selected, their content is added as hidden conversation context. This keeps topic memory available in later turns without exposing it in the normal transcript.
Duplicate memory injection is reduced
Once a topic memory file has been recalled into the current conversation, it is not recalled again unless it disappears from retained conversation context after compaction.
Topic files explicitly read through
read_memoryare also treated as already surfaced, so auto-memory does not immediately duplicate them./statusshows memory recall only in debug modeMemory recall diagnostics are hidden from normal
/statusoutput.In debug mode,
/statusnow reports:This makes background memory behavior observable during debugging without adding noise for regular users.
Provider compatibility
For Anthropic models, consecutive same-role messages are normalized inside the Anthropic provider before sending the request. This avoids provider errors when hidden recalled-memory messages create adjacent user-role messages, without changing the global conversation structure.
Hidden diagnostic and compatibility commands
This PR adds or keeps hidden commands that are intentionally not shown in
/suggestions or public docs:/memory-folder: compatibility path for the old memory folder UI/prompt: exports an HTML prompt snapshot for debugging system prompt, provider messages, and toolsCompatibility Notes
/memory-foldercommand.read_memoryandwrite_memorycontinue to work./memory.Validation
Validated locally with:
make translatemake lintmake testmake -C website buildFull test result from the latest run:
4610 passed, 244 warnings