A worked sequence of instructions shows how to preserve durable preferences, handle exceptions, replace outdated rules, and forget precisely.

“Reply in Chinese by default” and “write this email in English” can both be valid. One is a durable preference; the other applies to a task. Replacing the old record with the latest sentence would turn an exception into a permanent rule.

Start by identifying which future tasks the information applies to and whether the user intends it to persist. Repetition is a useful signal, but one explicit durable instruction can be enough.

How preferences change with new instructions

Suppose a user gives the following instructions in sequence. The memory should change as shown:

New input Action Retained rule
“Use Chinese by default and keep answers concise.” Save a durable preference Chinese and concise by default
“Explain reasoning and tradeoffs in technical proposals.” Add a condition Concise by default; sufficient detail for technical proposals
“Write this customer email in English.” Apply to this task The Chinese default remains
“Use English for all future replies.” Replace the language default English by default; other preferences remain
“Forget my preference about answer length.” Remove the specified preference Length preference removed; language and unrelated rules remain

Identify the dimension being changed. A language update should not remove the requirement to explain technical decisions. Forgetting a length preference should not clear all personal memory.

Preserve the conditions of a lesson

The same reasoning applies to coding experience. “Use this test command in the web workspace of this repository” carries repository and workspace conditions. Compressing it to “use this test command” loses its scope.

A concise record should preserve the subject, conditions, and a reference to the evidence. Later tasks can check it when configuration changes. A record saying only that an approach worked before gives little support for reuse in another project.

Check sources, time, and scope before replacing a rule

An explicit durable user preference can become a preference record. An inference drawn from one interaction should remain distinguishable from an instruction. Project facts need support from configuration, commits, or completed work.

A newer record does not necessarily supersede an older one. It may apply to a different project or only to the current task. When a rule is actually replaced, preserve that relationship so retrieval does not present both versions as equally current.

Handle duplication, obsolescence, and rarity separately

Equivalent preferences can be consolidated while retaining useful sources. An explicitly obsolete operational rule should stop guiding current work. Historical project decisions can remain available for investigation.

Rarely used information needs a different judgment. A rollback condition may only matter during a release, after months without retrieval. Deleting it for inactivity would remove a potentially important constraint. Retention should consider validity, applicability, and the consequence of losing the information.

Verify that an update took effect

Test defaults and exceptions in fresh sessions. After saving the Chinese preference, ordinary requests should follow it. After one English email, a new task should return to the default. After a permanent change to English, check whether the old rule is still retrieved incorrectly.

For forgetting, inspect the saved state and later behavior. Confirm that the specified preference no longer controls the answer while unrelated preferences remain. These checks reveal updates that did not take effect, exceptions that replaced a default, and unrelated preferences that were deleted by mistake.

The corresponding MemoraX Code behavior

The official documentation places communication preferences in User Profile and reusable working rules in Procedure Memory. It describes avoiding equivalent duplicate writes, updating matching entries for durable revisions, leaving one-time instructions out of persistent preferences, and limiting explicit forgetting to the named content.

Use the sequence above to inspect preference maintenance in your own setup. Compare the saved state before and after the change, then inspect its use in a fresh session.

References https://github.com/memorax-ai/memorax-code/blob/935993230853c8bf56f610afda50f9ef57307558/README.md