feat: add user_steering_messages_submit and user_followup_submit hooks#3000
Merged
dgageot merged 2 commits intoJun 4, 2026
Merged
Conversation
Fires each time the runtime drains the steering queue (mid-turn, after the model stops, or while idle before the first model call). Mirrors user_prompt_submit: passes the drained messages to the handler via steering_messages, can block the run, and contributes transient additional_context spliced into the steered turn only (never persisted). Wired into drainAndEmitSteered so it covers all three drain sites, unlike turn_end+reason=steered which misses the idle drain.
|
❌ PR Review Failed — The review agent encountered an error and could not complete the review. View logs. |
Fires each time the runtime dequeues a follow-up message at the end of a turn and starts a fresh turn for it. Follow-ups (the FollowUp API/queue) previously had no hook coverage: user_prompt_submit fires only for the first interactive prompt. Mirrors user_prompt_submit: passes the follow-up text via prompt, can block the run, and contributes transient additional_context spliced into the follow-up turn only (never persisted).
dgageot
approved these changes
Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds two hooks that close the coverage gaps around queued user messages, both modelled on
user_prompt_submit.user_steering_messages_submitsteering_messages.drainAndEmitSteered(the single drain chokepoint) so it covers all three cases — unliketurn_end+reason=steered, which misses the idle drain.user_followup_submitprompt.user_prompt_submitonly fires for the first interactive prompt.Both can block the run (
decision: block/continue: false/ exit 2) and contribute transientadditional_context(spliced into the steered/follow-up turn only, never persisted — same asuser_prompt_submit). The user messages themselves are persisted as normal.Changes
pkg/config/latest; events + input fields inpkg/hooks; dispatch inpkg/runtime.agent-schema.json,examples/hooks.yaml, anddocs/configuration/hooks/index.mdupdated (event tables, payload fields, context lists, dedicated sections).Testing
go build, package tests (hooks/runtime/config/teamloader),golangci-lint(0 issues), and the custom./lintall pass.