Skip to content

Increase stdin timeout for Windows compatibility#174

Merged
max-sixty merged 3 commits intomainfrom
fix-statusline-stdin-timeout
Dec 12, 2025
Merged

Increase stdin timeout for Windows compatibility#174
max-sixty merged 3 commits intomainfrom
fix-statusline-stdin-timeout

Conversation

@max-sixty
Copy link
Owner

Summary

  • Increased stdin read timeout from 10ms to 50ms in statusline command
  • Fixes Windows race condition where process spawning delay caused stdin data to arrive late
  • Enables 2 additional Windows tests that were previously skipped

Test plan

  • Local statusline tests pass (all 7)
  • CI passes on Windows

🤖 Generated with Claude Code

max-sixty and others added 3 commits December 11, 2025 19:46
Two switch tests have fundamental platform differences:
- test_switch_execute_failure: On Unix, --execute uses exec() which
  replaces the process, so no error message is shown. On Windows,
  spawn-and-wait reports the exit status.
- test_switch_missing_argument_shows_hints: Hints display differently.

The directives test (test_remove_internal_powershell_directive) passes
on all platforms and remains enabled.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Two fixes to align cross-platform behavior:

1. Fix hints display on Windows: The check for "wt switch" in error
   messages now also checks for "wt.exe switch" (Windows executable).

2. Fix --execute error handling on Windows: When --execute command fails,
   Windows now exits with the command's exit code without showing an
   error message, matching Unix behavior where exec() replaces the
   process.

Enables two previously Windows-skipped tests:
- test_switch_execute_failure
- test_switch_missing_argument_shows_hints

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Increased the stdin read timeout from 10ms to 50ms in statusline command.
Windows process spawning is slower, causing a race condition where stdin
data wouldn't arrive in time. 50ms is still imperceptible to users but
gives Windows enough headroom.

Enables 2 additional Windows tests:
- test_statusline_claude_code_full_context
- test_statusline_claude_code_with_model

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@max-sixty max-sixty merged commit d06a9ff into main Dec 12, 2025
18 checks passed
@max-sixty max-sixty deleted the fix-statusline-stdin-timeout branch December 12, 2025 04:07
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.

1 participant