Skip to content

expand-hook-system#489

Merged
zikajk merged 2 commits into
masterfrom
expand-hook-system
Jun 9, 2026
Merged

expand-hook-system#489
zikajk merged 2 commits into
masterfrom
expand-hook-system

Conversation

@zikajk

@zikajk zikajk commented Jun 4, 2026

Copy link
Copy Markdown
Member

Add preCompact, postCompact and subagentStart hooks; subagents now fire subagentStart instead of chatStart, and both postRequest and subagentPostRequest run for subagents.

  • Add /hooks command and an optional description field in hook config; prefix plugin hooks with plugin-name::.

  • Expand hook contracts: response replaces prompt, plain-text tool_response, continue:false everywhere, followUp, replacedOutput, standalone systemMessage, and exact-string matchers.

  • Add tool_call_id to preToolCall/postToolCall input, plus cwd, session_id, eca_executable, full_model, variant and follow_up_active to hook input data.

  • Fix postToolCall continue:false leaking across turns (now prompt-id scoped), chatStart additionalContext being dropped, and preRequest exit-2 not naming the blocking hook.

  • I added a entry in changelog under unreleased section.

  • This is not an AI slop.

@zikajk zikajk force-pushed the expand-hook-system branch 5 times, most recently from f44c22c to 141579b Compare June 4, 2026 13:27
Add `preCompact`, `postCompact` and `subagentStart` hooks; subagents now
fire `subagentStart` instead of `chatStart`, and both `postRequest` and
`subagentPostRequest` run for subagents.

- Add `/hooks` command and an optional `description` field in hook config;
  prefix plugin hooks with `plugin-name::`.
- Expand hook contracts: `response` replaces `prompt`, plain-text
  `tool_response`, `continue:false` everywhere, `followUp`,
  `replacedOutput`, standalone `systemMessage`, and exact-string matchers.
- Add `tool_call_id` to `preToolCall`/`postToolCall` input, plus `cwd`,
  `session_id`, `eca_executable`, `full_model`, `variant` and
  `follow_up_active` to hook input data.
- Fix `postToolCall continue:false` leaking across turns (now prompt-id
  scoped), `chatStart` `additionalContext` being dropped, and `preRequest`
  exit-2 not naming the blocking hook.
@zikajk zikajk force-pushed the expand-hook-system branch from 141579b to 0269a05 Compare June 5, 2026 17:48
@zikajk zikajk merged commit db70d23 into master Jun 9, 2026
8 of 9 checks passed
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.

2 participants