Skip to content

Conversation

@dicksontsai
Copy link
Collaborator

Summary

On Windows, spawning a subprocess creates a visible console window by default. This change adds the CREATE_NO_WINDOW flag when spawning the Claude CLI subprocess on Windows, which hides the terminal window and improves the user experience, especially for GUI applications.

Changes

  • Added subprocess.CREATE_NO_WINDOW flag for Windows subprocess spawning
  • Applied to both connect() and _check_claude_version() subprocess calls
  • Maintains backward compatibility on non-Windows platforms (flag defaults to 0)

Testing

  • All 129 unit tests pass
  • The fix is platform-specific and only takes effect on Windows

Fixes #480

On Windows, spawning a subprocess creates a visible console window by
default. This change adds the CREATE_NO_WINDOW flag when spawning the
Claude CLI subprocess on Windows, which hides the terminal window and
improves the user experience, especially for GUI applications.

The fix applies to both the main subprocess spawn in connect() and the
version check subprocess in _check_claude_version().

Fixes #480
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hide subprocess terminal for Windows system

2 participants