You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(deprecation): remove safetyCritical retention multiplier and type-cap bypass
- Remove SAFETY_CRITICAL_FACTOR = 6.0 from workspace-memory.ts
- Remove safetyFactor from calculateInitialStrength() - all memories now
fade according to the same rules
- Remove safetyCritical bypass from applyTypeMaxCaps() - safetyCritical
entries compete normally under TYPE_MAX caps
- Preserve safetyCritical?: boolean in LongTermMemoryEntry type for
backward compatibility (no producer sets it to true)
- Update memory-diag to show deprecation warning instead of capacity alert
- Update tests: add backward-compatibility fixture test, deprecation
strength test, normal cap competition test
- Update docs/architecture.md, RELEASE_NOTES.md, CHANGELOG.md,
docs/configuration.md
Phase 1.5 complete: safetyCritical is now a deprecated field with no
active behavior. Safety rules belong in user-controlled agent.md files.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
11
11
12
12
- Strength-based workspace memory retention using exponential decay instead of additive priority scoring.
13
13
- Per-type rendered caps for workspace memory candidates: feedback 10, decision 10, project 8, and reference 6.
14
-
- Safety-critical memory weighting and type-cap exemption so important entries survive type floods while still competing under the global rendered cap.
15
14
- Dormant-workspace effective age: after 14 days without activity, additional dormant time counts at 0.25x for retention decay.
16
15
- Reinforcement tracking for repeated memories, with same-session and one-hour guards to prevent accidental reinforcement spam.
17
16
- Memory health diagnostics for stored vs rendered counts, type caps, global cap overflow, dormancy, retention monitoring, and strength-ranked top/weakest entries.
@@ -21,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
21
20
22
21
- Workspace memory rendering now ranks entries by retention strength, not the previous priority/penalty model.
23
22
- Confidence is retained for compatibility but no longer affects retention scoring.
23
+
- Deprecated `safetyCritical` is retained for JSON compatibility but no longer affects retention strength or type-cap behavior.
24
24
- Old or stale-marked memories are no longer hard-pruned; they remain stored and only fall out of rendered context through strength and cap competition.
25
25
- Existing duplicate promotion and dedupe paths now reinforce the surviving memory instead of only absorbing the duplicate.
26
26
- Health output now separates stored active memories from rendered candidates to make cap behavior easier to understand.
Copy file name to clipboardExpand all lines: RELEASE_NOTES.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
7
7
This release changes workspace memory retention from hard stale pruning and additive priority scoring to a strength-based decay model.
8
8
9
-
Think of it like a forgetting curve: memories fade over time, but important, reinforced, and safety-critical memories decay slower. Weak entries fall out of rendered prompt context by cap competition, not hard deletion.
9
+
Think of it like a forgetting curve: memories fade over time, but importantand reinforced memories decay slower. Weak entries fall out of rendered prompt context by cap competition, not hard deletion.
10
10
11
11
> **Memory should fade, so the agent can keep learning.**
12
12
> Important memories decay slower, but every memory must leave room for newer project reality and avoid long-term memory pollution.
@@ -27,10 +27,10 @@ Think of it like a forgetting curve: memories fade over time, but important, rei
27
27
### What Changed
28
28
29
29
-**Strength-based retention**: workspace memory now uses exponential decay: initial strength × age decay.
30
-
-**Better initial strength**: type, source, user importance, and safety-critical status now determine how strong a memory starts.
30
+
-**Better initial strength**: type, source, and user importance now determine how strong a memory starts.
31
31
-**No confidence scoring**: confidence remains in stored data for compatibility, but it no longer affects retention ranking.
32
32
-**Type caps**: rendered workspace memory now caps feedback, decisions, project facts, and references separately so one type cannot monopolize all 28 slots.
33
-
-**Safety-critical protection**: safety-critical entries get stronger retention and are exempt from per-type caps, while still competing under the global rendered cap.
33
+
-**Deprecation:**`safetyCritical` field no longer affects retention strength or type-cap bypass. All system memories now fade according to the same rules. Safety rules belong in user-controlled `agent.md` files, not in system memory.
34
34
-**Dormant-aware age**: after 14 inactive days, additional dormant workspace time counts at 0.25x so paused projects do not forget too aggressively.
35
35
-**Reinforcement**: repeated matching memories reinforce the survivor and slow future decay, with same-session and one-hour guards to avoid accidental spam.
36
36
-**No hard stale pruning**: old or stale-marked memories are no longer automatically dropped by age; they lose rendered space only through cap competition.
Initial strength is based on memory type, source, optional user importance, and safety-critical status. Confidence remains stored for compatibility but is not part of retention scoring.
112
+
Initial strength is based on memory type, source, and optional user importance. Confidence remains stored for compatibility but is not part of retention scoring.
113
113
114
114
Rendered candidates are selected in this order:
115
115
116
116
1. Exclude `status: "superseded"` entries.
117
117
2. Compute current retention strength.
118
118
3. Sort by strength descending.
119
-
4. Apply per-type caps, with safety-critical entries exempt from type caps.
119
+
4. Apply per-type caps.
120
120
5. Keep the top 28 rendered entries under the workspace memory character budget.
121
121
122
122
Default type caps:
@@ -132,6 +132,10 @@ The type-cap total is 34, intentionally above the global 28-entry cap. These are
132
132
133
133
Dormant workspaces age more slowly: after 14 inactive days, additional dormant time counts at 0.25x for retention decay. Repeated duplicate memories reinforce the surviving entry and slow future decay, but same-session and under-one-hour repeats do not stack reinforcement.
134
134
135
+
### Safety-Critical Deprecation
136
+
137
+
The `safetyCritical` field on `LongTermMemoryEntry` is deprecated as of the retention v1.5.1 model update. It no longer affects retention strength or type-cap bypass. The field is preserved in the type definition for backward compatibility with existing workspace memory JSON files, but has no active behavior. Safety rules should be maintained in user-controlled files such as `agent.md` rather than in system memory.
138
+
135
139
### System Prompt Injection
136
140
137
141
Workspace memory is injected at the top of every message:
Initial strength uses type, source, user importance, and safety-critical factors. Confidence is stored for compatibility but is not used for retention scoring.
37
+
Initial strength uses type, source, and user importance factors. Confidence is stored for compatibility but is not used for retention scoring.
38
38
39
39
Rendered type caps prevent one type from filling all workspace memory slots:
40
40
@@ -45,7 +45,7 @@ Rendered type caps prevent one type from filling all workspace memory slots:
45
45
|`project`| 8 |
46
46
|`reference`| 6 |
47
47
48
-
Safety-critical memories are exempt from type caps but still compete under the global `maxEntries` limit. Old or stale-marked memories are not hard-pruned by age; they lose rendered space through strength and cap competition.
48
+
Old or stale-marked memories are not hard-pruned by age; they lose rendered space through strength and cap competition. The deprecated `safetyCritical` field is preserved for compatibility but no longer affects strength or type caps.
0 commit comments