claude-code - 💡(How to fix) Fix Auto-memory write template should emit lifecycle frontmatter fields (status / superseded_by / last-reviewed) [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#54621Fetched 2026-04-30 06:40:37
View on GitHub
Comments
0
Participants
1
Timeline
2
Reactions
0
Author
Participants
Timeline (top)
labeled ×2

Claude Code auto-memory writes memory files with frontmatter containing name, description, type. We've extended our memory governance with three lifecycle fields that drive automated retirement sweeps. The upstream auto-memory template doesn't know about them, so they only get written when an agent remembers to add them by hand.

Root Cause

Claude Code auto-memory writes memory files with frontmatter containing name, description, type. We've extended our memory governance with three lifecycle fields that drive automated retirement sweeps. The upstream auto-memory template doesn't know about them, so they only get written when an agent remembers to add them by hand.

Fix Action

Fix / Workaround

Workaround in the meantime

Code Example

---
name: <memory name>
description: <one-line hint>
type: <user|feedback|project|reference>
status: active
superseded_by: null
last-reviewed: <ISO date of write>
---
RAW_BUFFERClick to expand / collapse

Context

Claude Code auto-memory writes memory files with frontmatter containing name, description, type. We've extended our memory governance with three lifecycle fields that drive automated retirement sweeps. The upstream auto-memory template doesn't know about them, so they only get written when an agent remembers to add them by hand.

Desired behaviour

The auto-memory write template should emit:

---
name: <memory name>
description: <one-line hint>
type: <user|feedback|project|reference>
status: active
superseded_by: null
last-reviewed: <ISO date of write>
---

Why

  • Removes the "agent forgot the field" failure mode entirely
  • Makes lifecycle queryable from day one rather than after a back-fill sweep
  • Forward-compatible: consumers without the new fields see them as inert frontmatter

Workaround in the meantime

A periodic sweep parses missing fields with documented defaults, so the absence is non-blocking. But the sweep is a band-aid — fixing the template removes the gap.

extent analysis

TL;DR

Update the auto-memory write template to include the lifecycle fields (status, superseded_by, last-reviewed) in the frontmatter.

Guidance

  • Identify the current auto-memory write template and modify it to include the required lifecycle fields.
  • Verify that the updated template correctly emits the desired YAML frontmatter, including the new fields.
  • Test the updated template with different input scenarios to ensure it produces the expected output.
  • Consider adding validation to ensure the template is correctly populated with the required fields.

Example

---
name: example-memory
description: Example memory description
type: user
status: active
superseded_by: null
last-reviewed: 2023-03-01T12:00:00Z
---

Notes

The exact implementation details of the template update may vary depending on the underlying technology and framework used. It is essential to consult the relevant documentation and test the changes thoroughly to ensure correct functionality.

Recommendation

Apply workaround: Update the auto-memory write template to include the lifecycle fields, as this will remove the "agent forgot the field" failure mode and make the lifecycle queryable from the start.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix Auto-memory write template should emit lifecycle frontmatter fields (status / superseded_by / last-reviewed) [1 participants]