Preflight Checklist
What's Wrong?
When using claude agents on native Windows, Claude Code spawns visible reg.exe console windows.
This happens when starting claude agents itself and again when submitting a task from the agent dashboard. It does not reproduce in regular interactive Claude Code sessions.
The visible popup title captured by a Win32 top-level-window watcher is:
C:\WINDOWS\System32\reg.exe
WMI process creation tracing shows the reg.exe processes are spawned directly by claude.exe, not by repo hooks, user scripts, VS Code, WSL, or the active shell.
The issue is shell-independent: it reproduces from PowerShell, Git Bash, and cmd. The machine is configured for Windows Console Host, and the issue also reproduces when using Windows Terminal.
What Should Happen?
Claude Code’s internal registry probes during claude agents / background-session startup should not create visible console windows.
They should use CREATE_NO_WINDOW / windowsHide: true where applicable, or preferably native Windows registry APIs such as RegGetValue instead of spawning reg.exe.
Error Messages/Logs
[11:37:44] reg.exe PID=53464 CMD=C:\WINDOWS\System32\reg.exe query HKLM\SOFTWARE\Policies\ClaudeCode /v Settings
parent: claude.exe --bg-pty-host \\.\pipe\cc-daemon-... -- claude.exe --session-id ... --agent claude --permission-mode bypassPermissions -- "<prompt>"
grandparent: claude.exe daemon run --json-path C:\Users\<user>\.claude\daemon.json ... --spawned-by "{\"label\":\"claude agents\", ...}"
[11:39:25] reg.exe PID=36576 CMD=<already exited>
parent: claude.exe --bg-pty-host ... (same shape as above)
grandparent: claude.exe daemon run ... "claude agents"
[11:40:16] reg.exe PID=52704 CMD=C:\Windows\System32\reg.exe query HKEY_CURRENT_USER\Software\Classes\claude-cli\shell\open\command /ve
parent: claude.exe --session-id ... --agent claude --permission-mode bypassPermissions
grandparent: claude.exe --bg-pty-host ... (same session)
Steps to Reproduce
- On native Windows, open PowerShell, Git Bash, or cmd.
- Run
claude agents.
- Observe brief
reg.exe console windows flashing.
- Submit a task from the agent dashboard.
- Observe additional
reg.exe console windows, often in rapid groups.
To attribute the popups:
- Use a Win32
EnumWindows watcher to capture the visible window title.
- Use WMI
Win32_Process creation events to capture process parentage.
Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
Unknown
Claude Code Version
2.1.165 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
Native Windows install at:
C:\Users\<user>\.local\bin\claude.exe
Not WSL, not VS Code-embedded.
Trace attribution:
HKLM\SOFTWARE\Policies\ClaudeCode /v Settings is parented by the --bg-pty-host wrapper process.
HKEY_CURRENT_USER\Software\Classes\claude-cli\shell\open\command /ve is parented by the inner --session-id ... --agent claude process.
- Both originate from the
claude.exe daemon run process used by claude agents.
Confirmed with:
- Win32
EnumWindows watcher for visible windows
- WMI
Win32_Process creation events for process parentage
Preflight Checklist
What's Wrong?
When using
claude agentson native Windows, Claude Code spawns visiblereg.execonsole windows.This happens when starting
claude agentsitself and again when submitting a task from the agent dashboard. It does not reproduce in regular interactive Claude Code sessions.The visible popup title captured by a Win32 top-level-window watcher is:
C:\WINDOWS\System32\reg.exeWMI process creation tracing shows the
reg.exeprocesses are spawned directly byclaude.exe, not by repo hooks, user scripts, VS Code, WSL, or the active shell.The issue is shell-independent: it reproduces from PowerShell, Git Bash, and cmd. The machine is configured for Windows Console Host, and the issue also reproduces when using Windows Terminal.
What Should Happen?
Claude Code’s internal registry probes during
claude agents/ background-session startup should not create visible console windows.They should use
CREATE_NO_WINDOW/windowsHide: truewhere applicable, or preferably native Windows registry APIs such asRegGetValueinstead of spawningreg.exe.Error Messages/Logs
Steps to Reproduce
claude agents.reg.execonsole windows flashing.reg.execonsole windows, often in rapid groups.To attribute the popups:
EnumWindowswatcher to capture the visible window title.Win32_Processcreation events to capture process parentage.Claude Model
Opus
Is this a regression?
Yes, this worked in a previous version
Last Working Version
Unknown
Claude Code Version
2.1.165 (Claude Code)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell
Additional Information
Native Windows install at:
C:\Users\<user>\.local\bin\claude.exeNot WSL, not VS Code-embedded.
Trace attribution:
HKLM\SOFTWARE\Policies\ClaudeCode /v Settingsis parented by the--bg-pty-hostwrapper process.HKEY_CURRENT_USER\Software\Classes\claude-cli\shell\open\command /veis parented by the inner--session-id ... --agent claudeprocess.claude.exe daemon runprocess used byclaude agents.Confirmed with:
EnumWindowswatcher for visible windowsWin32_Processcreation events for process parentage