Skip to content

[codex] Fix Windows dashboard chat PTY - #37141

Closed
Cosmic-Construct wants to merge 1 commit into
NousResearch:mainfrom
Cosmic-Construct:codex/windows-dashboard-chat-pty
Closed

[codex] Fix Windows dashboard chat PTY#37141
Cosmic-Construct wants to merge 1 commit into
NousResearch:mainfrom
Cosmic-Construct:codex/windows-dashboard-chat-pty

Conversation

@Cosmic-Construct

Copy link
Copy Markdown

Summary

  • Add a native Windows PtyBridge backend using pywinpty/ConPTY while keeping the existing byte-oriented bridge API stable.
  • Keep POSIX on ptyprocess and move POSIX-only imports behind POSIX code paths.
  • Update dashboard /api/pty unavailable copy, AGENTS guidance, and targeted PTY/WebSocket tests for Windows.

Root Cause

The dashboard chat PTY bridge was hardcoded as POSIX-only, so native Windows dashboard /chat refused with WSL guidance even though pywinpty is already declared for Windows installs.

Validation

  • venv\Scripts\python.exe -m pytest tests\hermes_cli\test_pty_bridge.py --timeout-method=thread -> 9 passed, 11 skipped
  • venv\Scripts\python.exe -m pytest tests\hermes_cli\test_web_server.py::TestPtyWebSocket --timeout-method=thread -> 12 passed, 1 skipped
  • venv\Scripts\python.exe -m ruff check hermes_cli\pty_bridge.py hermes_cli\web_server.py tests\hermes_cli\test_pty_bridge.py tests\hermes_cli\test_web_server.py -> passed
  • Restarted native Windows dashboard on 127.0.0.1:9119; /chat HTML did not contain the old WSL refusal, and /api/pty returned real Hermes TUI ANSI frames over ConPTY with no Chat unavailable banner.

Note

On this Windows checkout, the exact bare pytest command from repo config fails before tests run because pyproject.toml sets --timeout-method=signal, and Windows lacks SIGALRM. The same targets pass with --timeout-method=thread.

@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have labels Jun 2, 2026
@teknium1

teknium1 commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Hi @Cosmic-Construct — thanks for taking a swing at this. We're going with #42251 instead because it keeps hermes_cli/pty_bridge.py POSIX-only and puts the ConPTY logic in a sibling win_pty_bridge.py module — that way the public surface /api/pty consumes (spawn / read / write / resize / close / is_available / PtyUnavailableError) is mirrored on both platforms and the POSIX path doesn't grow if sys.platform == "win32" branches. Live-tested on Windows 11 with pywinpty 2.0.15. Closing this in favor of #42251; appreciate the push to get Windows working.

@alt-glitch alt-glitch added comp/dashboard Web dashboard / control panel UI (dashboard/, landing) platform/windows Native Windows-specific behavior or breakage sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows labels Jun 26, 2026
@teknium1

Copy link
Copy Markdown
Contributor

Thanks for the Windows PTY work. This is now implemented on current main via the dedicated ConPTY design in #42251.

  • abcf996b1f749a647a1b213653a80d1eee58f6d1 merged feat(windows): enable dashboard /chat tab via ConPTY (win_pty_bridge) + tests #42251 and is an ancestor of current main.
  • hermes_cli/web_server.py:14175-14193 selects WinPtyBridge on native Windows while retaining the POSIX bridge separately.
  • hermes_cli/win_pty_bridge.py:57-173 provides the pywinpty/ConPTY spawn, I/O, resize, and teardown implementation.
  • tests/hermes_cli/test_web_server_pty_import.py:38-60 and tests/hermes_cli/test_win_pty_bridge.py:83-315 cover platform selection and the Windows bridge behavior.

This is an automated hermes-sweeper review. The maintainer discussion already identified #42251 as the preferred sibling-module implementation.

@teknium1 teknium1 closed this Jul 13, 2026
@teknium1 teknium1 added the sweeper:implemented-on-main Sweeper: behavior already present on current main label Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/dashboard Web dashboard / control panel UI (dashboard/, landing) P3 Low — cosmetic, nice to have platform/windows Native Windows-specific behavior or breakage sweeper:implemented-on-main Sweeper: behavior already present on current main sweeper:risk-platform-windows Sweeper risk: may break or behave differently on native Windows type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants