claude-code - 💡(How to fix) Fix /terminal-setup rejects Windows Terminal despite suggesting it [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#46344Fetched 2026-04-11 06:22:45
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×3commented ×2closed ×1

Error Message

The error message tells the user to run the command in Windows Terminal — which is exactly where they already are. "windows-terminal" is not in this list, so hCH() returns false and the error branch runs. The error branch then detects platform === "windows" and helpfully suggests "Windows: Windows Terminal" — creating a contradictory message. 2. Remove the misleading suggestion — don't suggest "Windows: Windows Terminal" in the error message if it's not actually supported

Root Cause

Found by searching the compiled binary (claude.exe v2.1.100). The gate function hCH() controls which terminals are allowed to proceed with setup:

function hCH() {
    return bt.platform() === "darwin" && M$.terminal === "Apple_Terminal"
        || M$.terminal === "vscode"
        || M$.terminal === "cursor"
        || M$.terminal === "windsurf"
        || M$.terminal === "alacritty"
        || M$.terminal === "zed"
}

"windows-terminal" is not in this list, so hCH() returns false and the error branch runs. The error branch then detects platform === "windows" and helpfully suggests "Windows: Windows Terminal" — creating a contradictory message.

Additionally, the setup dispatcher Ci8() has no case "windows-terminal" handler, so even if the gate were fixed, there's no setup logic to execute.

Fix Action

Fix / Workaround

Additionally, the setup dispatcher Ci8() has no case "windows-terminal" handler, so even if the gate were fixed, there's no setup logic to execute.

Code Example

Terminal setup cannot be run from windows-terminal.
...
To set up the shortcut (optional):
1. Exit tmux/screen temporarily
2. Run /terminal-setup directly in one of these terminals:
Windows: Windows Terminal

---

function hCH() {
    return bt.platform() === "darwin" && M$.terminal === "Apple_Terminal"
        || M$.terminal === "vscode"
        || M$.terminal === "cursor"
        || M$.terminal === "windsurf"
        || M$.terminal === "alacritty"
        || M$.terminal === "zed"
}
RAW_BUFFERClick to expand / collapse

Bug

/terminal-setup in Windows Terminal fails with:

Terminal setup cannot be run from windows-terminal.
...
To set up the shortcut (optional):
1. Exit tmux/screen temporarily
2. Run /terminal-setup directly in one of these terminals:
   • Windows: Windows Terminal

The error message tells the user to run the command in Windows Terminal — which is exactly where they already are.

Root Cause

Found by searching the compiled binary (claude.exe v2.1.100). The gate function hCH() controls which terminals are allowed to proceed with setup:

function hCH() {
    return bt.platform() === "darwin" && M$.terminal === "Apple_Terminal"
        || M$.terminal === "vscode"
        || M$.terminal === "cursor"
        || M$.terminal === "windsurf"
        || M$.terminal === "alacritty"
        || M$.terminal === "zed"
}

"windows-terminal" is not in this list, so hCH() returns false and the error branch runs. The error branch then detects platform === "windows" and helpfully suggests "Windows: Windows Terminal" — creating a contradictory message.

Additionally, the setup dispatcher Ci8() has no case "windows-terminal" handler, so even if the gate were fixed, there's no setup logic to execute.

Expected Behavior

Either:

  1. Implement Windows Terminal support — add "windows-terminal" to hCH() and a corresponding handler in Ci8() that configures the Shift+Enter keybinding (Windows Terminal supports custom keybindings via settings.json), OR
  2. Remove the misleading suggestion — don't suggest "Windows: Windows Terminal" in the error message if it's not actually supported

Environment

  • Claude Code 2.1.100
  • Windows 11 Pro (Build 26200)
  • Windows Terminal with PowerShell 7.6
  • Terminal correctly detected as windows-terminal

extent analysis

TL;DR

To fix the issue, modify the hCH() function to include "windows-terminal" in the allowed terminals list and add a corresponding handler in Ci8() for Windows Terminal setup.

Guidance

  • Identify the hCH() function in the claude.exe binary and modify it to include "windows-terminal" in the conditional statement to allow setup to proceed.
  • Add a new case handler in the Ci8() function to configure the Shift+Enter keybinding for Windows Terminal, utilizing its custom keybinding feature via settings.json.
  • Verify that the terminal is correctly detected as windows-terminal and that the modified hCH() function returns true for this terminal.
  • Test the setup process in Windows Terminal after applying the modifications to ensure it works as expected.

Example

function hCH() {
    return bt.platform() === "darwin" && M$.terminal === "Apple_Terminal"
        || M$.terminal === "vscode"
        || M$.terminal === "cursor"
        || M$.terminal === "windsurf"
        || M$.terminal === "alacritty"
        || M$.terminal === "zed"
        || M$.terminal === "windows-terminal" // Add this line
}

Notes

The provided solution assumes that the claude.exe binary can be modified. If this is not possible, an alternative approach would be to request an update to the binary that includes the necessary modifications.

Recommendation

Apply the workaround by modifying the hCH() function and adding a new case handler in Ci8() to support Windows Terminal, as this will allow the setup process to work correctly in the current environment.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING