Files
humanlayer/hld/CLAUDE.md
2025-08-18 17:33:46 -05:00

1.6 KiB

This is the humanlayer Daemon (HLD) that powers the WUI (humanlayer-wui)

You cannot run this process, you cannot restart it. If you make changes, you must ask the user to rebuild it.

The daemon logs are in ~/.humanlayer/logs/daemon-*.log (timestamped files created by the Makefile when running with make daemon-dev or make daemon-nightly)

WUI logs (which include daemon stderr output) are in:

  • Development: ~/.humanlayer/logs/wui-{branch}/codelayer.log
  • Production: Platform-specific log directories

It uses a database at ~/.humanlayer/*.db - you can access it with sqlite3 to inspect progress and debug things.

For production/nightly daemon:

sqlite3 ~/.humanlayer/daemon.db "SELECT * FROM sessions ORDER BY created_at DESC LIMIT 5;"

For development daemon (persistent database):

sqlite3 ~/.humanlayer/daemon-dev.db "SELECT * FROM sessions ORDER BY created_at DESC LIMIT 5;"

To clone nightly database to dev for testing:

make clone-nightly-db-to-dev-db  # Backs up existing dev db and copies nightly to dev

You can check the schema with:

sqlite3 ~/.humanlayer/daemon.db ".schema"
sqlite3 ~/.humanlayer/daemon-dev.db ".schema"

depending on what are looking at, you want either

  • ~/.humanlayer/daemon.sock
  • ~/.humanlayer/daemon-dev.sock

If you are debugging code changes, they are most likely to be in the dev socket.

You can test RPC calls with nc:

echo '{"jsonrpc":"2.0","method":"getSessionLeaves","params":{},"id":1}' | nc -U SOCKET_PATH | jq '.'

For testing guidelines and database isolation requirements, see TESTING.md