Skip to content

Ignore claude-mem observer sessions - #6

Merged
cloudstudio merged 1 commit into
cloudstudio:mainfrom
sergiogonzalez298:ignore-claude-mem-observers
Aug 7, 2026
Merged

cloudstudio merged 1 commit into
cloudstudio:mainfrom
sergiogonzalez298:ignore-claude-mem-observers

Conversation

@sergiogonzalez298

@sergiogonzalez298 sergiogonzalez298 commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The claude-mem plugin compresses conversations into its memory store by running headless "observer" Claude sessions in the background. They write real transcripts under ~/.claude/projects and fire real hooks, so every NotchFlow feed surfaced them as phantom agents — one lighting up the notch every time a real session did any work.

All observers run from ~/.claude-mem/observer-sessions, which stamps both the hook event's cwd and the munged project directory the transcript lands in. Those two signals become a shared predicate (MemoryObserverSessions in NotchFlowCore), applied at every entry point:

  • Hook (notchflow-hook): exits before contacting the app, so Claude Code proceeds as if no hook were installed.
  • Transcript scan (ClaudeTranscriptMonitor): skips the observer project directory entirely — no parse cost for the memory system's chatter.
  • Event ingestion (AppModel.applyOne): last-line guard for anything that slips past (e.g. an older hook binary still installed).
  • Snapshot load: previously persisted observer sessions are discarded, so they disappear immediately on update.

A checkout of the plugin itself (a project directory literally named claude-mem) is not filtered — only the hidden .claude-mem data directory matches, and there's a test pinning that.

Testing

  • 6 new unit tests in MemoryObserverSessionsTests (cwd match, transcript match, project-directory match, and the negative cases).
  • Full suite: 89 tests, 0 failures.
  • Verified live against a machine running claude-mem 12.2.0: observer transcripts land in …/projects/-Users-…--claude-mem-observer-sessions/ with cwd ~/.claude-mem/observer-sessions, and no longer appear in the notch.

The claude-mem plugin compresses conversations into its memory store by
running headless observer Claude sessions in the background. They write
real transcripts and fire real hooks, so every feed surfaced them as
phantom agents that woke whenever a real session did.

All observers run from ~/.claude-mem/observer-sessions, which stamps
both the hook event's cwd and the transcript's munged project
directory. A shared predicate now drops them at every entry point: the
hook exits before contacting the app, the transcript scan skips their
project directory entirely, event ingestion guards against anything
that slips past, and persisted observer sessions are discarded on
snapshot load.

Co-Authored-By: Octupus Technologies S.L.

@cloudstudio cloudstudio left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved for integration via #7, which preserves this contribution and includes the review hardening: exact home-bound observer path matching, exact transcript project-directory matching, Claude-only gating, and regression coverage for lookalike paths/projects and non-Claude agents. The corrected integration head passed SwiftLint, build, and the full test suite on macOS/Xcode 16.4.

cloudstudio added a commit that referenced this pull request Aug 7, 2026
Preserve PR #6 and tighten observer matching to the exact per-user claude-mem observer paths, with regression coverage for lookalikes and non-Claude agents.
@cloudstudio
cloudstudio merged commit e786851 into cloudstudio:main Aug 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants