Skip to content

Convert turn-halting prompt hooks to a non-blocking command hook; release v0.7.1#18

Merged
samtalki merged 1 commit into
mainfrom
fix/hooks-no-halt
Jun 8, 2026
Merged

Convert turn-halting prompt hooks to a non-blocking command hook; release v0.7.1#18
samtalki merged 1 commit into
mainfrom
fix/hooks-no-halt

Conversation

@samtalki

@samtalki samtalki commented Jun 7, 2026

Copy link
Copy Markdown
Owner

The plugin's three hooks were all type: prompt, so each matching tool call (eval, Write/Edit) spent a separate decision-model call and ended the turn with "stopped continuation", even for scalar results. The prompts were also written as instructions to the main agent rather than the allow/deny criteria a prompt hook expects, so the contract was malformed on top of being wasteful.

What changed

  • Removed the two prompt hooks that only restated skill guidance (display code before eval; expand results for color plots). The always-on julia-evaluation/julia-plot skills already carry that guidance.
  • Rewrote the post-edit revise hook as a non-blocking type: command hook (claude-plugin/hooks/revise-nudge.sh). On a Write/Edit of a .jl file it prints {"hookSpecificOutput":{"hookEventName":"PostToolUse","additionalContext":"…call revise…"}} and nothing otherwise. PostToolUse cannot block, so the nudge never halts the turn; non-.jl edits are a clean no-op (exit 0). No jq/python dependency.
  • Updated test/test_plugin_validation.sh: the old PreToolUse grep would now fail, so it checks hooks.json is valid JSON, has a PostToolUse hook, references revise-nudge.sh, and that the script exists (26 checks, 0 failed).
  • Fixed stale docs: README advertised an auto-triggering julia-language skill that no longer exists (now julia-plot); reworded every "automatically calls revise" hook overclaim across README/CLAUDE.md/plugin README to describe the non-blocking reminder.
  • Bumped 0.7.0 → 0.7.1 (Project.toml, plugin.json, marketplace.json ×2, both SKILL.md).

Verification

  • revise-nudge.sh emits valid additionalContext JSON for .jl, nothing for .md, exit 0 both.
  • bash test/test_plugin_validation.sh → 26 passed, 0 failed, version 0.7.1.
  • julia --project=. -e "using Pkg; Pkg.test()" → 339/339 pass.

🤖 Generated with Claude Code

…ease v0.7.1

All three plugin hooks were `type: prompt`, so each matching tool call (`eval`,
`Write`/`Edit`) spent a separate decision-model call and ended the turn with
"stopped continuation", even for scalar results. The prompts were also written as
instructions to the main agent rather than the allow/deny criteria a prompt hook
expects.

The two prompt hooks that only restated skill guidance (display code before `eval`;
expand results for color plots) are removed; the `julia-evaluation`/`julia-plot`
skills already carry that guidance. The post-edit revise hook is rewritten as a
non-blocking `type: command` hook (`hooks/revise-nudge.sh`) that injects an
`additionalContext` reminder to call `revise` after a `.jl` edit, so the auto-revise
nudge survives without a per-edit model call or a turn halt.

Also updates the plugin validation test (it asserted the now-removed `PreToolUse`
hook), fixes stale README references to a removed `julia-language` skill, and bumps
0.7.0 -> 0.7.1.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@samtalki samtalki merged commit dfa934e into main Jun 8, 2026
5 checks passed
@samtalki samtalki deleted the fix/hooks-no-halt branch June 8, 2026 00:06
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