Skip to content

Claude Code

Pulse CLI installs Claude Code hooks that forward events to pulse emit, which converts each event to a normalized span and sends it to your Pulse trace service.

Requires:

  • running Pulse trace service
  • Claude Code installed
  • Pulse CLI installed
  1. Configure connection.
Terminal window
pulse init
  1. Install hooks.
Terminal window
pulse connect
  1. Verify status.
Terminal window
pulse status

Detection path: ~/.claude/settings.json
Modified key: hooks (Pulse-only entries; other hooks are preserved)

pulse connect installs 10 async hooks:

Claude Code eventPulse event
PreToolUsepre_tool_use
PostToolUsepost_tool_use
PostToolUseFailurepost_tool_use_failure
SessionStartsession_start
SessionEndsession_end
Stopstop
SubagentStartsubagent_start
SubagentStopsubagent_stop
UserPromptSubmituser_prompt_submit
Notificationnotification

All hooks run with async behavior so Claude Code is never blocked by Pulse.

Each span sent to Pulse includes:

FieldDescription
span_idUUID v4 identifier
session_idClaude Code session identifier
timestampISO 8601 timestamp
sourceAlways claude_code
kindtool_use, session, agent_run, user_prompt, notification
event_typeSpecific event (for example post_tool_use)
statussuccess or error
tool_nameTool name for tool events
tool_inputTool input payload
tool_responseTool response payload
errorError details for failures
cwdWorking directory
modelModel name if present
agent_nameSubagent type for subagent events
metadatacli_version, project_id, and event-specific data
CommandDescription
pulse initConfigure trace service connection
pulse connectInstall hooks into Claude Code
pulse disconnectRemove Pulse hooks from Claude Code
pulse statusShow config, connectivity, and hook status
pulse emit <type>Emit a span (used by hooks)
Terminal window
pulse init \
--api-url https://pulse.example.com \
--api-key sk-your-key \
--project-id my-project \
--no-validate
Terminal window
cat ~/.claude/settings.json | jq '.hooks'
Terminal window
export PULSE_DEBUG=1

Writes raw payloads to ~/.pulse/debug.log.

Override log path:

Terminal window
export PULSE_DEBUG_LOG=/path/to/file
  • Open Sessions -> Agents to view Claude Code sessions and agent runs.
  • Click a session to inspect the waterfall timeline.
  • Click an individual span for full input, output, error, and metadata payloads.

For CLI-wide troubleshooting, see CLI Reference.