NemoClaw icon indicating copy to clipboard operation
NemoClaw copied to clipboard

[macOS][Agent&Skills] Hermes dashboard chat fails to start: "out of pty devices" + "agent init failed: No inference provider configured"

Open tedy-y opened this issue 5 months ago • 1 comments

Description

After onboarding a Hermes sandbox with the TUI dashboard enabled, opening the dashboard Chat tab fails immediately with Chat failed to start: out of pty devices, and the right pane shows agent init failed: No inference provider configured — even though inference was configured during onboarding and the agent OpenAI-compatible API (:8642) is healthy. The chat is completely unusable.

Root cause is NOT PTY exhaustion (host shows only 4/4096 PTYs in use); it is the sandbox Landlock filesystem policy denying PTY device access (/dev/ptmx, /dev/pts) to the dashboard process, so Python's os.openpty() fails and emits the out of pty devices fallback text.

Environment

Device:        MacBook (Apple Silicon, arm64)
OS:            macOS 26.5.1 (Darwin 25.5.0, arm64)
Architecture:  arm64
Node.js:       v22.22.3
npm:           10.9.8
Docker:        28.3.3 (backend: Colima 0.8.4)
OpenShell CLI: 0.0.44
NemoClaw:      v0.0.68
Hermes Agent:  v0.14.0

Steps to Reproduce

  1. Enable the managed Hermes dashboard in TUI mode and onboard a Hermes sandbox:

    export NEMOCLAW_AGENT=hermes
    export NEMOCLAW_HERMES_DASHBOARD=1
    export NEMOCLAW_HERMES_DASHBOARD_TUI=1
    nemoclaw onboard --fresh --name hermes-02
    # wizard: provider = 3 (Other OpenAI-compatible endpoint),
    #   base URL = https://inference-api.nvidia.com/, enter API key,
    #   model = openai/openai/gpt-5.5, skip messaging, default profile, Balanced policy
    
  2. Wait for Hermes is ready. Confirm the agent API works:

    curl -s -o /dev/null -w '%{http_code}\n' http://127.0.0.1:8642/v1/models   # -> 200
    
  3. Open the Hermes dashboard in a browser and click the CHAT tab: http://127.0.0.1:18790/chat (dashboard host port may be 18789/18790 depending on forward allocation; on this host it was 18790)

Expected Result

The dashboard Chat tab starts a chat session against the configured inference route (compatible-endpoint / openai/openai/gpt-5.5) and is usable.

Actual Result

Chat tab shows (red):

Chat failed to start: out of pty devices

Right "MODEL" pane shows (red):

agent init failed: No inference provider configured. Run 'hermes model' to choose a
provider and model, or set an API key (OPENROUTER_API_KEY, OPENAI_API_KEY, etc.) in
~/.hermes/.env

(Screenshot of http://127.0.0.1:18790/chat attached on the source NVBug.)

Logs

Analysis (root cause — NOT PTY exhaustion):

- Host PTY usage is only ~4/4096, so this is not actual PTY exhaustion.
- The "out of pty devices" string is Python's fallback message when os.openpty()
  fails and it cannot find old-style /dev/pty* devices.
- The dashboard chat backend runs inside the OpenShell Landlock-restricted process
  tree. The live sandbox filesystem policy allows /dev/null but does NOT allow
  /dev/ptmx or /dev/pts, so os.openpty() inside that process is denied -> "out of
  pty devices". The "agent init failed: No inference provider configured" message is
  a secondary symptom of the chat backend failing to initialize.

Confirmation that PTY hardware is present (the denial is policy, not exhaustion):
  # docker exec (OUTSIDE Landlock) into the sandbox container:
  $ ls -l /dev/ptmx          -> lrwxrwxrwx ... /dev/ptmx -> pts/ptmx
  $ ls -l /dev/pts/ptmx      -> crw-rw-rw- 1 root root 5, 2 ... /dev/pts/ptmx
  $ python3 -c "import os; m,s=os.openpty(); print('openpty OK', m, s)"
    -> openpty OK 3 4      # works outside Landlock; fails inside the restricted tree

Suggested fix direction (from investigation): allow PTY device nodes (/dev/ptmx and the /dev/pts mount) in the sandbox filesystem policy used for the Hermes dashboard process, so os.openpty() succeeds.

Related Bugs / not a duplicate

Related bug #6268252 [All Platforms][Agent&Skills] Hermes Dashboard chat shows "Chat unavailable" — does not recognize NemoClaw OpenShell proxy inference route (Open) overlaps on the secondary "No inference provider" symptom; this bug's primary, distinct root cause is the PTY-device / Landlock filesystem-policy denial.

Not exactly the same error as #6268252, so this issue likely exists mainly on the Colima/macOS combination. Due to time limits, the same behavior was not verified on other platforms.


NVB#6381088

tedy-y avatar Jun 26 '26 11:06 tedy-y

http://127.0.0.1:18789/chat works fine without pty error and 'Chat unavailable' on mac installed with NemoClaw 0.0.69 today. So the PTY/Landlock issue I reported was resolved by the v0.0.69 (Hermes Agent v0.17.0) upgrade. Feel free to close this issue.

tedy-y avatar Jun 29 '26 05:06 tedy-y