doctor: detect Claude Code plugin-hooks load state (refs #212)#214
doctor: detect Claude Code plugin-hooks load state (refs #212)#214
Conversation
Adds a check to `agentmemory doctor` that scans the latest Claude Code debug log (~/.claude/debug/latest) for the `Loaded hooks from standard location for plugin agentmemory` line. When the plugin manifest is enabled but the hooks never auto-register, users see no error -- the plugin silently does nothing. Doctor now surfaces this with a remediation hint (reinstall + restart, require CC >= 2.1.x). States: - loaded: ✓ shows manifest path resolved by CC - not-loaded: ✗ hints reinstall + restart - no-debug-log: ✗ hints to run claude --debug once - no-cc-dir: skipped (user may not use Claude Code) Refs #212.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Caution Review failedPull request was closed or merged during review 📝 WalkthroughWalkthroughThe doctor command now performs local verification of Claude Code plugin hook registration by inspecting Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.Comment |
Summary
agentmemory doctorgains a check that verifies whether Claude Code actually loaded the plugin's hooks~/.claude/debug/latestfor theLoaded hooks from standard location for plugin agentmemorylog lineWhy
#212 reports plugin hooks not auto-registering after
/plugin install. Bug does not reproduce on macOS + CC 2.1.120 + agentmemory 0.9.3 (verified via debug log + injected probe), but when it does happen the user gets no signal — hooks silently do nothing. This adds a diagnostic so doctor can flag the failure mode and point at a remediation (reinstall + restart, CC version floor).Check states
hooks/hooks.json~/.claude/debugexists, no.txtlog yet~/.claude/debug— user likely doesn't use Claude CodeTest plan
npm run build)checkClaudeCodeHooks()against current~/.claude/debug/latest— returnsloadedwith manifest pathagentmemory doctorend-to-end with server up (manual)Summary by CodeRabbit
doctorcommand now includes enhanced verification for Claude Code plugin registration, checking local debug logs to report loading status and provide remediation guidance when issues are detected.