Skip to content

expand-hook-system#489

Open
zikajk wants to merge 1 commit into
masterfrom
expand-hook-system
Open

expand-hook-system#489
zikajk wants to merge 1 commit into
masterfrom
expand-hook-system

Conversation

@zikajk
Copy link
Copy Markdown
Member

@zikajk zikajk commented Jun 4, 2026

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
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