[FEATURE] Channels: no way to enable a channel in VS Code extension sessions; notifications/claude/channel is dropped
Summary
Channels (notifications/claude/channel) can wake an idle Claude Code session from an external source, but only in an interactive terminal. In the VS Code extension the channel notification is silently dropped, and there is no non-interactive way to opt a channel in. Since the extension is a primary way to use Claude Code, a feature built for reacting to events outside the terminal is unavailable to everyone working in the IDE.
Environment
- macOS (arm64), VS Code extension, Claude subscription (Max at the first check, Ultra now)
- First confirmed on Claude Code 2.1.251. The installed extension is now 2.1.325; I have not re-run the full repro on it (see "What I checked on 2.1.325" below).
Steps to reproduce
- Write a small stdio MCP server that declares
capabilities.experimental['claude/channel']and emitsnotifications/claude/channelwhen a message arrives from an external source (a local bridge to a messenger, in my case). - In a terminal:
claude --dangerously-load-development-channels server:<name>. The idle session wakes the instant a message arrives. This works as documented. - Open a session in the VS Code extension panel with the same MCP server configured and the external source bound to that session.
- Send the external message.
Expected
The panel session receives the channel turn, as the terminal does. Or, failing that, there is a documented, non-interactive way to approve a channel for extension sessions.
Actual
The server emits the notification, the panel session never sees it, and nothing is logged. The extension starts the CLI with --output-format stream-json --input-format stream-json; in that mode --dangerously-load-development-channels has no TTY on which to show its confirmation dialog, and the channel is never registered. This looks like the same gate described in #99658 for -p, including stream-json input.
What I checked on 2.1.325
In the installed extension bundle, the code that builds the CLI arguments appends --channels <value> when an internal channels option is set. I found no user-facing setting for it: package.json declares nothing related to channels, and the settings schema only has channelsEnabled and allowedChannelPlugins (managed settings). I did not test whether anything sets that option for a panel session.
What would help, in order of preference
- A non-interactive approval for a channel in headless/extension sessions: a settings key (for example
allowedDevelopmentChannels: ["server:<name>"]) or an approval prompt rendered by the extension UI instead of the TTY-only dialog. - Native delivery of
notifications/claude/channelinto extension sessions, rendered as the<channel>turn the terminal shows. - At minimum, document how Channels interact with the extension and headless/stream-json mode. The channels page does not mention the extension, so it is easy to lose time assuming it works.
Related
- #99658 (docs: channels never deliver in
-p) - #92815 (persistent, settings-level channel opt-in)
Workaround
A background CLI process that blocks on the external source and exits when a message arrives, so the harness's background-task re-invocation wakes the panel. It works with zero idle cost, but it is a fresh process per message, the model has to re-arm it, and there is no structured <channel> metadata, reply tool or permission relay.