Skip to main content
The Claude Code daemon captures Claude Code activity via hooks and exports structured events to HoneyHive. It runs as a local background process that automatically instruments your Claude Code sessions with no code changes required. How it works:
  • Installs Claude Code hooks automatically at the user level
  • Merges pre-hook and post-hook data into single tool events with accurate duration
  • Uses real tool names for event names (e.g. tool.Bash, tool.Edit, tool.Grep)
  • Emits turn events (turn.user, turn.agent) as model type with chat_history
  • Enriches tool events with thinking/reasoning context from the session transcript
  • Uploads session artifacts via background loop (every 5s) to avoid hook timeouts
  • Optionally emits lightweight chain.commit_link events on post-commit
  • Retries failed exports every 5s via resilient event spooling

Quick Start

pip install honeyhive-daemon 
honeyhive-daemon run --key $HH_API_KEY --url $HH_API_URL
The daemon stores local state in ~/.honeyhive/daemon/ and installs Claude hooks in ~/.claude/settings.json.

Running in the background

honeyhive-daemon run --key $HH_API_KEY --url $HH_API_URL &
To stop the daemon:
honeyhive-daemon stop
stop sends SIGTERM to the running daemon via its PID file (~/.honeyhive/daemon/daemon.pid). Only one instance can run at a time - attempting to start a second prints an error and exits.
Screenshot of a Claude Code session trace in HoneyHive. The event tree displays alternating tool call events (such as tool.Bash, tool.Edit) and turn events (turn.user and turn.agent), illustrating the sequence and hierarchy of operations during a coding session.

Events

Each Claude Code session produces a tree of events in HoneyHive:
Event nameTypeDescription
session.startsessionRoot event. All other events are children of this.
turn.usermodelUser prompt. inputs.chat_history accumulates the full conversation so far; outputs.content is the new message.
turn.agentmodelAssistant response. inputs.chat_history accumulates the full conversation so far; outputs.content is the new message.
tool.{ToolName}toolTool use (e.g. tool.Bash, tool.Edit, tool.Read, tool.Grep). Pre and post hooks are merged into a single event with start_time/end_time duration.
session.endchainMarks session completion.
chain.commit_linkchainGit commit metadata (requires --repo).
Tool events include inputs.thinking when a reasoning block precedes the tool call in the transcript. Pre-hook events that never receive a matching post-hook are exported as orphans after 60s.

Session Artifacts

When a session ends (or goes idle), the daemon pushes two views of the conversation:
session.start receives outputs.chat_history containing the user-facing conversation: the back-and-forth of user messages and assistant responses. This is what you’d see in the chat UI. Useful for reviewing what was said and evaluating response quality.
session.end receives outputs.artifact containing the full session transcript: tool calls, reasoning/thinking blocks, and internal processing steps. This is the “behind the scenes” view of how the agent worked through the task.
This split lets you look at the same session from two angles: the conversation-level view for understanding the user experience, and the trajectory-level view for debugging agent behavior.

State Directory

All daemon state lives under ~/.honeyhive/daemon/ (override with HH_DAEMON_HOME):
FilePurpose
state/config.jsonPersisted daemon configuration
state/sessions.jsonSession index (transcript paths, timestamps, artifact status)
state/pending_tools.jsonBuffered pre-hook tool events awaiting their post-hook
state/chat_histories.jsonAccumulated chat history per session for turn events
spool/events.jsonlRetry queue for failed exports
daemon.logTimestamped daemon log
daemon.pidProcess ID file

CLI Reference

CommandDescription
honeyhive-daemon runStart the daemon, install hooks, and flush queued events.
honeyhive-daemon stopStop the running daemon.
honeyhive-daemon statusShow config and pending spool event count.
honeyhive-daemon doctorCheck that hooks and config are correctly installed.

run options

FlagEnv varDescription
--keyHH_API_KEYHoneyHive API key (required).
--urlHH_API_URLHoneyHive base URL (default: https://api.honeyhive.ai).
--projectHH_PROJECTHoneyHive project name (default: repo/directory name).
--repo PATHGit repo to attach commit events to.
--ciEnable CI mode.

Troubleshooting

If events aren’t showing up in HoneyHive, work through these checks in order:
1

Is the daemon running?

Check ~/.honeyhive/daemon/daemon.pid and verify the process is alive:
ps -p $(cat ~/.honeyhive/daemon/daemon.pid)
2

Check the log

Look for spooled (export failures) or missing received claude hook entries:
tail -100 ~/.honeyhive/daemon/daemon.log
3

Verify config

Confirm API key, project, and base URL are correct:
cat ~/.honeyhive/daemon/state/config.json
4

Hooks installed?

Run the built-in diagnostic or inspect the hooks file directly:
honeyhive-daemon doctor
# or
cat ~/.claude/settings.json
5

Spool buildup?

If events are piling up, check the spool_reason field for error details:
wc -l ~/.honeyhive/daemon/spool/events.jsonl
6

PATH issues

Ensure honeyhive-daemon is on PATH in the shell context Claude Code uses. Virtualenv installations may not be visible to hooks:
which honeyhive-daemon