Skip to content

Stop hook loops infinitely due to {"continue":true} response #1288

Description

@MistySun19

Bug Description

The stop hook (worker-service.cjs hook claude-code summarize) causes an infinite loop at session end. Claude Code keeps re-triggering the stop hook, requiring manual interruption (Ctrl+C).

Environment

  • Claude Code version: latest (as of 2026-03-05)
  • Plugin version: 10.4.1 (manifest) / 10.4.3 (package.json)
  • OS: macOS (Darwin 24.6.0)
  • Node: available, Bun: available

Steps to Reproduce

  1. Enable claude-mem plugin
  2. Use Claude Code normally
  3. When the session ends or Claude stops responding, observe the stop hooks

Observed Behavior

The stop hook fires repeatedly in an infinite loop:

⏺ Ran 3 stop hooks (ctrl+o to expand)
  ⎿ Stop hook error: [...worker-service.cjs hook claude-code summarize]: No stderr output

⏺ Ran 3 stop hooks (ctrl+o to expand)
  ⎿ Stop hook error: [...worker-service.cjs hook claude-code summarize]: No stderr output

(repeats indefinitely until interrupted)

Root Cause Analysis

Running the hook manually shows it returns:

{"continue":true,"suppressOutput":true}

The "continue":true field appears to signal Claude Code that the session should continue, which triggers another round of stop hooks, creating an infinite loop.

Expected Behavior

The stop hook should return {"continue":false} (or omit the field) so Claude Code terminates cleanly after the summarize hook completes.

Workaround

Disable the plugin in ~/.claude/settings.json:

"enabledPlugins": {
  "claude-mem@thedotmack": false
}

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