Problem
The memory inbox silently skips invalid memory patches, including malformed
patches, patches without hunks, and patches whose targets escape the allowed
root. Aggregate dismiss also only removes valid patches. However, the background
extractor's pending inbox summary reads every .patch file under the memory
inbox and feeds that content back into future extraction prompts.
Relevant code:
packages/core/src/commands/memory.ts
packages/core/src/services/memoryService.ts
Impact
- Invalid patch files can become invisible in
/memory inbox.
- Users cannot apply or dismiss those files from the UI.
- Future extraction runs can still see the hidden invalid files and may keep
trying to merge or reason about them.
- The inbox can accumulate stale, non-actionable artifacts.
Expected Behavior
Invalid memory patches should be visible and dismissible, quarantined, or
removed. The background extractor should not repeatedly receive hidden,
non-actionable patch files as pending inbox context.
Acceptance Criteria
- Malformed memory patches do not become invisible permanent artifacts.
- Invalid patches are either:
- surfaced in
/memory inbox with a clear invalid state and dismiss action,
- moved to a quarantine/diagnostics location, or
- deleted consistently with invalid skill patch handling.
buildPendingInboxSummary only includes memory patches that are visible and
actionable, or clearly marks invalid/quarantined items.
- Tests cover malformed, no-hunk, and out-of-root memory patch files.
Notes
The current listing behavior is good in that users are not asked to apply
unsafe patches. The missing piece is lifecycle management for patches that are
filtered out.
Problem
The memory inbox silently skips invalid memory patches, including malformed
patches, patches without hunks, and patches whose targets escape the allowed
root. Aggregate dismiss also only removes valid patches. However, the background
extractor's pending inbox summary reads every
.patchfile under the memoryinbox and feeds that content back into future extraction prompts.
Relevant code:
packages/core/src/commands/memory.tspackages/core/src/services/memoryService.tsImpact
/memory inbox.trying to merge or reason about them.
Expected Behavior
Invalid memory patches should be visible and dismissible, quarantined, or
removed. The background extractor should not repeatedly receive hidden,
non-actionable patch files as pending inbox context.
Acceptance Criteria
/memory inboxwith a clear invalid state and dismiss action,buildPendingInboxSummaryonly includes memory patches that are visible andactionable, or clearly marks invalid/quarantined items.
Notes
The current listing behavior is good in that users are not asked to apply
unsafe patches. The missing piece is lifecycle management for patches that are
filtered out.