Skip to content

[BUG] Stop hook with "type": "prompt" causes JSON validation error (regression from #531) #587

@ryanstraight

Description

@ryanstraight

The Stop hook in basic-memory-plugins v0.2.1 still causes a JSON validation error on every session stop in Claude Code. Issue #531 fixed the unsupported "matcher": "*" field, but the underlying problem persists: "type": "prompt" hooks on the Stop event fail validation.

Current hooks.json (v0.2.1)

"Stop": [
  {
    "hooks": [
      {
        "type": "prompt",
        "prompt": "If this conversation contained valuable insights..."
      }
    ]
  }
]

Error

● Ran 1 stop hook
  ⎿  Stop hook error: JSON validation failed

This fires on every /exit or session end.

Workaround

Removing the entire Stop section from hooks/hooks.json eliminates the error. The /remember prompt behavior is still available via CLAUDE.md instructions.

Environment

  • Claude Code (latest, Feb 2026)
  • basic-memory 0.18.4
  • basic-memory-plugins v0.2.1
  • Windows 11

Notes

  • The plugins repo (basicmachines-co/basic-memory-plugins) was archived on Feb 15, 2026, so filing here instead.
  • "type": "prompt" works fine on PreToolUse hooks (e.g., the mcp__basic-memory__write_note validation prompt). The issue appears specific to the Stop event.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions