--channels flag suppresses plan mode tools (ExitPlanMode, AskUserQuestion, EnterPlanMode)
Bug Description
When Claude Code is launched with the --channels flag (e.g., --channels plugin:telegram@claude-plugins-official), the plan mode tools ExitPlanMode, AskUserQuestion, and EnterPlanMode are completely suppressed. They do not appear in either the active tool list or the deferred tool registry (via ToolSearch). The plan mode system prompt text IS injected correctly (including instructions referencing these tools), but the tools themselves are never registered.
Reproduction Steps
- Launch Claude Code with
--channels plugin:telegram@claude-plugins-official - Toggle plan mode with
/plan - Attempt to search for
ExitPlanModeviaToolSearch— returns no results - The plan mode system prompt references
ExitPlanModeandAskUserQuestionbut the model cannot call them
- Launch Claude Code without the
--channelsflag (same directory, same config) - Toggle plan mode with
/plan - Search for
ExitPlanModeviaToolSearch— tool is found and callable - All three tools (
ExitPlanMode,AskUserQuestion,EnterPlanMode) are present and functional
Environment
- Claude Code version: 2.1.89
- OS: Ubuntu Linux (x86_64), kernel 6.8.0-106-generic
- Channel plugin:
telegram@claude-plugins-official
Systematic Debugging Performed
We isolated this through 6 rounds of testing, ruling out all other variables:
| Test | Plugins | --channels Flag | ExitPlanMode Available? |
|------|---------|-------------------|------------------------|
| Original config | 40 enabled | YES | NO |
| Removed CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS env | 40 | YES | NO |
| Reduced to 25 plugins | 25 | YES | NO |
| Disabled superpowers plugin | 24 | YES | NO |
| Nuclear: zero plugins, minimal settings | 0 | YES | NO |
| No --channels flag, zero plugins | 0 | NO | YES |
| No --channels flag, all 40 plugins restored | 40 | NO | YES |
The --channels flag is the sole variable that determines whether plan mode tools are registered.
Expected Behavior
Plan mode tools should be available regardless of whether --channels is enabled. The channels feature (receiving messages from external sources like Telegram) should not affect the availability of interactive planning tools.
Impact
This completely breaks the plan mode workflow when using bidirectional channels. Users must choose between having Telegram integration OR having plan mode — they can't have both.
This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗