Skip to content

SessionStart hook should also match 'clear' to archive conversations on /clear #50

@ntroutman

Description

@ntroutman

Problem

When a user runs /clear in Claude Code, the current session is not archived/indexed because the SessionStart hook only matches startup|resume:

"matcher": "startup|resume"

However, /clear fires both:

  • SessionEnd with reason clear
  • SessionStart with source clear

This means conversations cleared with /clear don't get archived until the next full CLI restart.

Expected Behavior

Running /clear should archive the just-cleared conversation immediately, so it's searchable in the new session.

Proposed Fix

Update hooks/hooks.json to include clear in the matcher:

"matcher": "startup|resume|clear"

This is a one-line change that would make /clear behave consistently with CLI restart for archiving purposes.

Workaround

Users can manually edit their cached plugin at:
~/.claude/plugins/cache/superpowers-marketplace/episodic-memory/<version>/hooks/hooks.json

But this gets overwritten on plugin updates.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions