Skip to content

fix(plugin): stop bundled hooks from auto-capturing on every tool call (0.14.4)#31

Merged
Shahinyanm merged 1 commit into
mainfrom
fix/plugin-hooks-no-autocapture
Jun 12, 2026
Merged

fix(plugin): stop bundled hooks from auto-capturing on every tool call (0.14.4)#31
Shahinyanm merged 1 commit into
mainfrom
fix/plugin-hooks-no-autocapture

Conversation

@Shahinyanm

Copy link
Copy Markdown
Member

Problem

A user saw "Task Journal backlog forming" printed ~30 times in a row in a project, and a live hook reminder reported a 44-entry pending queue, classifier behind.

Root cause

The 0.14.0 redesign moved realtime auto-capture to opt-in — but only in the settings.json hooks written by install-hooks. The plugin's own bundled plugin/hooks/hooks.json was never updated and still wired:

  • PostToolUse → TJ_ASYNC_REWAKE=1 task-journal ingest-hook with asyncRewake: true + rewakeSummary: "Task Journal backlog forming"
  • PreCompact + Stopingest-hook

So enabling the plugin re-armed exactly what the redesign removed. With no classifier backend (the claude -p drainer is gone by design), every tool call enqueued a pending/ chunk that never drained; once the queue crossed PENDING_OVERFLOW_THRESHOLD the asyncRewake signal exit(2)'d on every PostToolUse (main.rs:2251) → the repeated "backlog forming" lines.

Fix

Empty the bundled plugin/hooks/hooks.json. The enabled plugin is now quiet by default — resume + nudge + MCP tools come from install-hooks (settings.json), unchanged. Realtime capture stays available, explicitly, via install-hooks --auto-capture.

The CLI asyncRewake / pending code is untouched (dormant unless TJ_ASYNC_REWAKE=1); its 3 tests still pass. No Rust changed.

Recovery for an existing backed-up queue: task-journal pending-gc --days 0.

Tests

  • asyncrewake_* (3) still green — CLI behaviour unchanged.
  • JSON validated; fmt clean; build green.

🤖 Generated with Claude Code

…l (0.14.4)

The 0.14.0 redesign made realtime auto-capture opt-in, but only in the
settings.json hooks written by install-hooks. The plugin's own bundled
plugin/hooks/hooks.json still wired PostToolUse -> task-journal ingest-hook
(asyncRewake + rewakeSummary "Task Journal backlog forming"), plus PreCompact
and Stop capture. So merely enabling the plugin re-armed exactly what the
redesign removed: every tool call enqueued a pending/ chunk, nothing drained
it (the claude -p backend is gone by design), the queue grew unbounded, and
past the overflow threshold the asyncRewake signal fired on every PostToolUse
-> "Task Journal backlog forming" surfaced dozens of times in a row.

Empty the bundled hooks file. The enabled plugin is now quiet by default;
resume + nudge + MCP tools come from install-hooks. Realtime capture remains
available explicitly via install-hooks --auto-capture. The CLI asyncRewake /
pending machinery is untouched (now dormant unless TJ_ASYNC_REWAKE=1 is set).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Shahinyanm Shahinyanm merged commit ef6b457 into main Jun 12, 2026
7 checks passed
@Shahinyanm Shahinyanm deleted the fix/plugin-hooks-no-autocapture branch June 12, 2026 12:49
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.

1 participant