You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
userPromptTransformed hook is skipped for steering messages #4640
When a session receives a user message while the agent is already processing, the message is delivered to the model as steering, but the userPromptTransformed hook is not invoked. Hooks that inject standing instructions therefore apply to ordinary and queued turns but not to corrections or redirections delivered mid-turn.
Affected version
GitHub Copilot CLI 1.0.80
Steps to reproduce the behavior
Configure a userPromptTransformed command hook that adds a unique marker to modifiedTransformedPrompt and logs each invocation.
Start a session and send an ordinary prompt. Confirm that the hook runs and the marker reaches the model context.
Start a long-running tool call, then send another user message before the tool call completes.
Inspect the session events and hook log.
The second message is recorded with delivery: "steering", but it has no userPromptTransformed hook events, the hook log has no corresponding invocation, and the marker is absent from the model context.
Expected behavior
userPromptTransformed should run before every user message is added to a model request, including messages delivered while the session is processing.
Additional context
In a clean Windows x64 reproduction, the ordinary prompt invoked the hook while the in-flight steering prompt did not. In a larger sample of 984 user-message turns, the injected marker was present on 96.6% of idle deliveries and 100% of queued deliveries, but only 4.9% of steering deliveries; the hook's own 1,859-entry log contained no failures.
The installed implementation has separate paths: ordinary turn construction calls userPromptTransformed, while an in-flight send() queues the message through addImmediateMessagesIfProcessing() and runImmediatePromptPreRequest() later appends it directly to the model request without applying the hook.
We can reproduce this too, and it isn't limited to userPromptTransformed: userPromptSubmitted is also skipped for steering messages.
Environment: VS Code 1.143.1 (Copilot sessions on the Agent Host, bundled @github/copilot-sdk 1.0.23-preview.5), macOS arm64. The behavior is identical in VS Code 1.140.
What we see in ~/.copilot/session-state/<id>/events.jsonl:
Messages with delivery: "idle" or "queued" are preceded by hook.start / hook.end for userPromptSubmitted and userPromptTransformed.
Messages with delivery: "steering" (sent while a turn is running) have no hook events at all, but they still reach the model.
Why it matters:userPromptSubmitted is the hook that policy, audit and data-loss-prevention tooling relies on to inspect or block prompts. Because VS Code's default chat.requestQueuing.defaultAction is "steer", any message typed while the agent is busy reaches the model without passing through those hooks. Organizations that rely on hooks for compliance get no signal that some prompts were never evaluated.
Current workaround: set "chat.requestQueuing.defaultAction": "queue" in VS Code. Queued messages do trigger the hooks. The setting has no policy key, though, so organizations can't enforce it.
Expected: every user message that is added to a model request, steering included, should go through userPromptSubmitted (with the ability to block) and userPromptTransformed. Alternatively, there could be a documented hook for steering messages. Separately, it would help to have a policy-enforceable way to disable immediate steering.
This appears to be resolved as of GitHub Copilot CLI v1.0.115. Please update to that release or a newer stable version. We're closing this as completed. If it still happens, please comment with your version and reproduction steps.
Activity
davidcirianeuraltrust commentedon Nov 2, 2026
We can reproduce this too, and it isn't limited to
userPromptTransformed:userPromptSubmittedis also skipped for steering messages.Environment: VS Code 1.143.1 (Copilot sessions on the Agent Host, bundled
@github/copilot-sdk1.0.23-preview.5), macOS arm64. The behavior is identical in VS Code 1.140.What we see in
~/.copilot/session-state/<id>/events.jsonl:delivery: "idle"or"queued"are preceded byhook.start/hook.endforuserPromptSubmittedanduserPromptTransformed.delivery: "steering"(sent while a turn is running) have no hook events at all, but they still reach the model.Why it matters:
userPromptSubmittedis the hook that policy, audit and data-loss-prevention tooling relies on to inspect or block prompts. Because VS Code's defaultchat.requestQueuing.defaultActionis"steer", any message typed while the agent is busy reaches the model without passing through those hooks. Organizations that rely on hooks for compliance get no signal that some prompts were never evaluated.Current workaround: set
"chat.requestQueuing.defaultAction": "queue"in VS Code. Queued messages do trigger the hooks. The setting has no policy key, though, so organizations can't enforce it.Expected: every user message that is added to a model request, steering included, should go through
userPromptSubmitted(with the ability to block) anduserPromptTransformed. Alternatively, there could be a documented hook for steering messages. Separately, it would help to have a policy-enforceable way to disable immediate steering.copilot-cli-bot commentedon Nov 25, 2026
This appears to be resolved as of GitHub Copilot CLI v1.0.115. Please update to that release or a newer stable version. We're closing this as completed. If it still happens, please comment with your version and reproduction steps.