Pane icon indicating copy to clipboard operation
Pane copied to clipboard

Deleting /tmp/pane-daemon-* breaks the installed Pane's local CLI until restart

Open parsakhaz opened this issue 1 month ago • 2 comments

A QA agent's cleanup of a dev Pane on macOS ran rm -rf /tmp/pane-daemon-501-*/, which also deleted the installed Pane's local socket folder. Pane kept running and answered over the tailnet, but it doesn't recreate the socket, so the local runpane CLI and the pane MCP server failed with ENOENT until Pane was restarted.

Two possible fixes, which may both be worth doing:

  • Pane recreates its local socket and directory if they disappear while it runs (or doctor detects it and says to restart).
  • The skills and runbooks that guide QA cleanup (dev Pane isolation) point at the dev instance's own PANE_DIR/socket path, never a glob over /tmp/pane-daemon-<uid>-*.

Seen during QA of #1040 on 2026-10-17.

parsakhaz avatar Oct 19 '26 06:10 parsakhaz

Hey, I'll take this one and do both halves. Pane: PaneDaemonServer never checks its Unix socket after start(), so once the folder's gone the listener serves a deleted file until restart. Plan is a cheap unref'd check every 5 s: if the socket is missing, re-create the 0700 folder, close the old listener and listen again with 0600, leaving connected clients alone and never touching a file someone else put there. Windows named pipes can't be deleted this way, so no check there. CLIs: make the ENOENT case say the socket is missing and that a running Pane re-creates it within 5 s, same text from Node and Python, plus the doctor hint. Docs: point the runpane skill, the cross-OS QA reference and CONTRIBUTING's dev-build section at the test instance's own socket path and never a /tmp/pane-daemon-* glob.

ilijachrchev avatar Nov 17 '26 15:11 ilijachrchev

PR's up: #1502. Pane re-creates the socket within 5 s now, both CLIs explain a missing socket the same way, and the QA docs stop using the /tmp glob.

ilijachrchev avatar Nov 17 '26 15:11 ilijachrchev