Skip to content

Commit f94e4ed

Browse files
randclaude
andcommitted
fix: remove prompt hooks that blocked operations, export CLAUDE_PLUGIN_ROOT
Prompt hooks (UserPromptSubmit, PostToolUse, PreCompact) caused Claude to treat workflow guidance as hard gates, blocking normal user messages. Replaced with command-only hook architecture: hooks provide dynamic state data, CLAUDE.md provides static workflow instructions. Also fixed hook-dispatch.sh not exporting CLAUDE_PLUGIN_ROOT, which caused Go binaries to fail with "plugin root not found". Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 39e426a commit f94e4ed

7 files changed

Lines changed: 19 additions & 40 deletions

File tree

.claude-plugin/marketplace.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"name": "rlm-claude-code",
1111
"source": "./",
1212
"description": "Recursive Language Model integration for Claude Code - Go binary hooks (~5ms startup), cross-plugin event coordination (DP/RLM), version-aware config migration, and intelligent multi-provider routing",
13-
"version": "0.6.0"
13+
"version": "0.6.1"
1414
}
1515
]
1616
}

.claude-plugin/plugin.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "rlm-claude-code",
33
"description": "Recursive Language Model integration for Claude Code - intelligent multi-provider routing and unbounded context handling",
4-
"version": "0.6.0",
4+
"version": "0.6.1",
55
"author": {
66
"name": "Rand",
77
"url": "https://github.com/rand"

CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,19 @@
11
# Changelog
22

3+
## [0.6.1] - 2026-02-02
4+
5+
### Fixed
6+
- **hook-dispatch.sh**: Export `CLAUDE_PLUGIN_ROOT` env var so Go binaries can find plugin root (fixes "plugin root not found" error)
7+
8+
### Removed
9+
- `UserPromptSubmit` prompt hook — caused Claude to block normal messages; RLM guidance now lives in CLAUDE.md
10+
- `PostToolUse` catch-all prompt hook — fired on every tool use adding cost/latency; redundant with PreToolUse complexity-check
11+
- `PreCompact` prompt hook — low value; trajectory-save on Stop handles persistence
12+
13+
### Changed
14+
- All hooks are now command-type only (no prompt hooks remain) — eliminates invisible gating behavior
15+
- Hook architecture: command hooks provide dynamic state data, CLAUDE.md provides static workflow instructions
16+
317
## [0.6.0] - 2026-02-02
418

519
### Added

hooks/hooks.json

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,6 @@
1313
]
1414
}
1515
],
16-
"UserPromptSubmit": [
17-
{
18-
"matcher": ".*",
19-
"hooks": [
20-
{
21-
"type": "prompt",
22-
"prompt": "You have access to RLM (Recursive Language Model) for complex tasks. If the user's request involves multi-file analysis, debugging complex issues, architectural decisions, or exhaustive searches, consider activating RLM with `/rlm mode balanced` or `/rlm mode thorough`. For simple tasks, RLM micro mode runs automatically. Do not mention RLM unless the task complexity warrants it.",
23-
"description": "RLM activation guidance based on task complexity"
24-
}
25-
]
26-
}
27-
],
2816
"PreToolUse": [
2917
{
3018
"matcher": ".*",
@@ -38,30 +26,6 @@
3826
]
3927
}
4028
],
41-
"PostToolUse": [
42-
{
43-
"matcher": ".*",
44-
"hooks": [
45-
{
46-
"type": "prompt",
47-
"prompt": "If the tool output reveals unexpected complexity (large error traces, many files affected, cross-module dependencies), consider suggesting RLM escalation to the user. RLM mode should align with the current DP phase: spec/review phases warrant thorough mode, orient/decide/test/implement phases warrant balanced mode.",
48-
"description": "Post-tool RLM escalation check with DP phase awareness"
49-
}
50-
]
51-
}
52-
],
53-
"PreCompact": [
54-
{
55-
"matcher": ".*",
56-
"hooks": [
57-
{
58-
"type": "prompt",
59-
"prompt": "Before compaction, ensure any active RLM context (trajectory, memory state, orchestration state) has been externalized. If RLM is active, save trajectory with `/rlm save`.",
60-
"description": "Externalize RLM context before compaction"
61-
}
62-
]
63-
}
64-
],
6529
"Stop": [
6630
{
6731
"matcher": ".*",

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "rlm-claude-code"
3-
version = "0.6.0"
3+
version = "0.6.1"
44
description = "Recursive Language Model integration for Claude Code"
55
readme = "README.md"
66
requires-python = ">=3.12"

scripts/hook-dispatch.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ set -e
1010

1111
# Determine plugin root
1212
PLUGIN_ROOT="${CLAUDE_PLUGIN_ROOT:-$(cd "$(dirname "$0")/.." && pwd)}"
13+
export CLAUDE_PLUGIN_ROOT="$PLUGIN_ROOT"
1314
HOOK_NAME="$1"
1415

1516
if [ -z "$HOOK_NAME" ]; then

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)