# [RECOVERED] Fix WipsrFlow hotkey in CLI

> **[RECOVERED -- UNVERIFIED]** Auto-reconstructed from transcript 2f73220a-cb62-4b54-bb0c-67b51415db00 (2026-05-30T21:18:18.689Z .. 2026-05-30T21:29:26.573Z) on 2026-06-01. Prose sections are Ollama-drafted from the transcript and may be imprecise; the Commands/Config/Reference sections are extracted verbatim. Review and correct, then remove this banner.

## User
- **User:** Mike Swanson (mike)
- **Machine:** GURU-5070
- **Role:** admin

## Session Summary

The session began with resolving an issue where Wispr Flow's hotkey did not function in an elevated PowerShell terminal, despite working in other applications. The root cause was identified as a Windows integrity-level mismatch, where Wispr Flow ran at medium integrity while the terminal was elevated. This triggered User Interface Privilege Isolation (UIPI), blocking Wispr Flow from interacting with the elevated terminal. 

To address this, the assistant opted to run Wispr Flow as an administrator, ensuring it matched the integrity level of the terminal. A scheduled task was created to launch Wispr Flow elevated at login, targeting a stable Squirrel stub to avoid issues with version updates. The existing non-elevated auto-start shortcut was disabled to prevent double-launching. All current Wispr Flow instances were terminated, and the task was executed to relaunch Wispr Flow elevated.

After verification that Wispr Flow was running at high integrity, the focus shifted to the text-injection issue. The terminal was identified as a legacy conhost console, which is incompatible with Wispr Flow's clipboard-based text insertion. The assistant ensured the default terminal was set to Windows Terminal and modified the desktop shortcut to launch Claude Code within Windows Terminal explicitly, preserving all original arguments and working directory.

## Key Decisions

- Run Wispr Flow as administrator to match the integrity level of the elevated terminal.
- Create a scheduled task with "Highest privileges" to ensure reliable elevated auto-start.
- Disable the existing non-elevated auto-start shortcut to avoid double-launching.
- Modify the desktop shortcut to launch Claude Code in Windows Terminal, preserving original parameters and working directory.
- Set Windows Terminal as the default terminal to ensure compatibility with Wispr Flow's text-injection method.

## Problems Encountered

- The terminal was running elevated, causing UIPI to block Wispr Flow's interaction.
- The legacy conhost console was incompatible with clipboard-based text insertion.
- The existing auto-start shortcut could cause a double-launch if not disabled.
- The scheduled task needed to target a stable Squirrel stub to avoid version update issues.

## Configuration Changes

_Machine-extracted verbatim from the transcript (file targets of Write/Edit/NotebookEdit)._

- none detected

## Credentials & Secrets

_Machine-extracted; review carefully -- secrets are not auto-harvested from transcripts._

- none detected (verify against the Commands & Outputs section)

## Infrastructure & Servers

_Machine-extracted verbatim (IP / hostname regex hits across the whole transcript)._

- **IPs:** `172.16.3.20`
- **Hosts:** `system.security.principal.windowsidentity`, `system.security.principal.windowsprincipal`, `p.isinrole`, `system.security.principal`, `flow.exe`, `update.exe`, `flow.lnk`, `flow.lnk.disabled`, `proc.id`, `p.name`, `powershell.exe`, `claude.exe`, `explorer.exe`, `conhost.exe`, `system.text`, `system.runtime.interopservices`, `user32.dll`, `kernel32.dll`, `user32.dl`, `microsoft.windowsterminal`, `wt.version`, `wt.exe`, `claude.lnk`, `lnk.bak`, `io.file`, `claude.lnk.bak`, `wscript.shell`, `ws.cr`, `whoami-block.sh`, `2026-05-30-session.md`, `spec-017-mobile-device-support.md`, `sync.sh`, `claudetools.git`, `azcomputerguru.com`

## Commands & Outputs

_Machine-extracted verbatim: mutating Bash/PowerShell commands with truncated output._

```
$ErrorActionPreference = "Stop"
$stub = "C:\Users\guru\AppData\Local\WisprFlow\Wispr Flow.exe"
$startup = "$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\Wispr Flow.lnk"

# 1. Record what the old shortcut points to
$ws = New-Object -ComObject WScript.Shell
$lnk = $ws.CreateShortcut($startup)
"Old Startup shortcut target: $($lnk.TargetPath)"

# 2. Disable the non-elevated startup shortcut (reversible rename)
$disabled = "$startup.disabled"
if (Test-Path $disabled) { Remove-Item $disabled -Force }
Rename-Item $startup -NewName "Wispr Flow.lnk.disabled"
"Disabled Startup shortcut -> Wispr Flow.lnk.disabled"

# 3. Create elevated scheduled task: at logon, highest privileges
$action  = New-ScheduledTaskAction -Execute $stub
$trigger = New-ScheduledTaskTrigger -AtLogOn -User "$env:USERDOMAIN\$env:USERNAME"
$principal = New-ScheduledTaskPrincipal -UserId "$env:USERDOMAIN\$env:USERNAME" -LogonType Interactive -RunLevel Highest
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -ExecutionTimeLimit ([TimeSpan]::Zero) -StartWhenAvailable
Register-ScheduledTask -TaskName "Wispr Flow (Elevated)" -Action $action -Trigger $trigger -Principal $principal -Settings $settings -Description "Launches Wispr Flow at logon with highest privileges so its global hotkey and text injection work in elevated windows (e.g. Claude Code CLI)." -Force | Out-Null
"Scheduled task 'Wispr Flow (Elevated)' created."
Get-ScheduledTask -TaskName "Wispr Flow (Elevated)" | Select-Object TaskName, State
```
Output: Old Startup shortcut target: C:\Users\guru\AppData\Local\WisprFlow\Wispr Flow.exe

Disabled Startup shortcut -> Wispr Flow.lnk.disabled

Scheduled task 'Wispr Flow (Elevated)' created.



TaskName              State

--------              -----

Wispr Flow (Elevated) Ready

```
$k = "HKCU:\Console\%%Startup"
if (-not (Test-Path $k)) { New-Item -Path $k -Force | Out-Null }
# Canonical Windows Terminal delegation GUIDs (same values the Settings UI writes)
Set-ItemProperty -Path $k -Name "DelegationConsole"  -Value "{2EACA947-7F5F-4CFA-BA87-8F7FBEEFBE69}"
Set-ItemProperty -Path $k -Name "DelegationTerminal" -Value "{E12CFF52-A866-4C77-9A90-F570A7AA2C6B}"
"Default terminal application set to Windows Terminal."
Get-ItemProperty $k | Select-Object DelegationConsole, DelegationTerminal | Format-List
```
Output: Default terminal application set to Windows Terminal.





DelegationConsole  : {2EACA947-7F5F-4CFA-BA87-8F7FBEEFBE69}

DelegationTerminal : {E12CFF52-A866-4C77-9A90-F570A7AA2C6B}

## Pending / Incomplete Tasks

- Verify the hotkey functions correctly in the new Windows Terminal session.
- Ensure the text injection works reliably after the changes.
- Confirm the scheduled task and shortcut modifications are stable and functional.
- Monitor for any potential conflicts or issues arising from the terminal and Wispr Flow configuration changes.

## Reference Information

_Machine-extracted verbatim from the whole transcript via regex. Treat as leads, not gospel; deduped._

- **Commit SHAs:** `b2f3b08`
- **URLs:** http://172.16.3.20:3000/azcomputerguru/claudetools.git
- **IPs:** `172.16.3.20`
