Skip to content

fix(ipc): ensure socket parent dir exists before bind — daemon crash-loop on fresh install (lr-88fe)#201

Merged
akuehner merged 1 commit into
mainfrom
fix/lr-88fe-daemon-sock-dir
Jun 9, 2026
Merged

fix(ipc): ensure socket parent dir exists before bind — daemon crash-loop on fresh install (lr-88fe)#201
akuehner merged 1 commit into
mainfrom
fix/lr-88fe-daemon-sock-dir

Conversation

@akuehner

@akuehner akuehner commented Jun 9, 2026

Copy link
Copy Markdown
Member

No description provided.

…loop on fresh install (lr-88fe)

The daemon binds ~/.clagentic/console/daemon.sock but nothing in its own
startup path guaranteed console/ existed. On fresh installs or systemd-driven
starts (no prior CLI run), the bind fails with ENOENT, the IPC error handler
hard-exits, and the supervisor crash-loops until it gives up.

Three-layer fix:
- ipc.js createIPCServer(): mkdirSync(dirname(sockPath)) before unlink/listen
- ipc.js error handler: retry once on ENOENT (create dir + relisten) alongside
  the existing EADDRINUSE retry
- daemon.js: call ensureConfigDir() before the IPC server bind so the daemon
  is self-sufficient regardless of which path forked it

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@akuehner akuehner merged commit faf8f79 into main Jun 9, 2026
@akuehner akuehner deleted the fix/lr-88fe-daemon-sock-dir branch June 9, 2026 21:51
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