What happened?
Hook support in the ACP / VS Code IDE Companion path is not aligned with the main core execution path. From the current source analysis, only the PermissionRequest hook is partially wired into ACP session permission handling. UserPromptSubmit, Stop, PreToolUse, PostToolUse, and PostToolUseFailure do not appear to run through the same hook flow as the core path.
In the ACP path, the session uses geminiClient.getChat() plus chat.sendMessageStream() to drive turns and tool execution directly, instead of going through GeminiClient.sendMessageStream() and CoreToolScheduler. As a result, even if hooks are configured in the VS Code IDE Companion flow, behavior appears inconsistent with the CLI / core path: permission-related hooks may have an effect, but the other hooks do not appear to trigger or are only partially supported.
What did you expect to happen?
Hook behavior in the ACP path should be consistent with the main core execution path. At minimum:
UserPromptSubmit and Stop should also run in ACP sessions.
PreToolUse, PostToolUse, and PostToolUseFailure should be triggered during ACP tool execution.
- VS Code IDE Companion should correctly support the interactions or state updates required by those hooks.
If partial hook support in the ACP / VS Code path is intentional, the implementation boundary should be documented clearly so it does not look like a silent behavior mismatch.
Client information
Client Information
- qwen-code version:
0.14.2
- vscode-ide-companion version:
0.14.2
- Node.js:
v22.22.0
- OS:
macOS 15.1.1 (Darwin 24.1.0 arm64)
- analyzed source commit:
c0793316c
Anything else we need to know?
Based on the current source analysis, the relevant implementation paths include:
packages/core/src/core/client.ts, where UserPromptSubmit and Stop hooks are attached to GeminiClient.sendMessageStream().
packages/cli/src/acp-integration/acpAgent.ts and packages/cli/src/acp-integration/session/Session.ts, where ACP sessions use geminiClient.getChat().sendMessageStream() directly and do not go through that hook entry point.
packages/core/src/core/coreToolScheduler.ts, which implements PreToolUse, PostToolUse, and PostToolUseFailure.
- ACP
Session.runTool(), which currently wires in PermissionRequest hook handling but not the full tool lifecycle hooks.
- The ACP schema / VS Code companion flow, which currently handles standard
sessionUpdate events and requestPermission, but does not expose a hook-specific update channel.
What happened?
Hook support in the ACP / VS Code IDE Companion path is not aligned with the main core execution path. From the current source analysis, only the
PermissionRequesthook is partially wired into ACP session permission handling.UserPromptSubmit,Stop,PreToolUse,PostToolUse, andPostToolUseFailuredo not appear to run through the same hook flow as the core path.In the ACP path, the session uses
geminiClient.getChat()pluschat.sendMessageStream()to drive turns and tool execution directly, instead of going throughGeminiClient.sendMessageStream()andCoreToolScheduler. As a result, even if hooks are configured in the VS Code IDE Companion flow, behavior appears inconsistent with the CLI / core path: permission-related hooks may have an effect, but the other hooks do not appear to trigger or are only partially supported.What did you expect to happen?
Hook behavior in the ACP path should be consistent with the main core execution path. At minimum:
UserPromptSubmitandStopshould also run in ACP sessions.PreToolUse,PostToolUse, andPostToolUseFailureshould be triggered during ACP tool execution.If partial hook support in the ACP / VS Code path is intentional, the implementation boundary should be documented clearly so it does not look like a silent behavior mismatch.
Client information
Client Information
0.14.20.14.2v22.22.0macOS 15.1.1 (Darwin 24.1.0 arm64)c0793316cAnything else we need to know?
Based on the current source analysis, the relevant implementation paths include:
packages/core/src/core/client.ts, whereUserPromptSubmitandStophooks are attached toGeminiClient.sendMessageStream().packages/cli/src/acp-integration/acpAgent.tsandpackages/cli/src/acp-integration/session/Session.ts, where ACP sessions usegeminiClient.getChat().sendMessageStream()directly and do not go through that hook entry point.packages/core/src/core/coreToolScheduler.ts, which implementsPreToolUse,PostToolUse, andPostToolUseFailure.Session.runTool(), which currently wires inPermissionRequesthook handling but not the full tool lifecycle hooks.sessionUpdateevents andrequestPermission, but does not expose a hook-specific update channel.