Command overview
Beacon can install hook-based endpoint telemetry for supported agent harnesses. The hook adapter emits local Beacon endpoint events for sessions, prompt submission, tool use, command execution, MCP-like tool activity, approval decisions, permissions, diffs, and file edits where each runtime exposes those hook payloads.Command syntax
Commands
beacon endpoint hooks install
Install endpoint hooks for supported hook runtimes.
beacon endpoint hooks status
Show endpoint hook integration status.
beacon endpoint hooks uninstall
Remove Beacon hook entries while preserving non-Beacon hooks.
Paths
In system mode, the hook binary is written under
/Library/Application Support/Beacon/Endpoint/hooks/ and the default runtime log is /var/log/beacon-agent/runtime.jsonl.
Flags
Restart Antigravity CLI, Claude Code, Cline, Codex CLI, Cursor, Devin CLI, Devin Desktop, Factory Droid, Grok Build, Hermes Agent, or OpenCode after installing or removing hooks so the updated hook configuration is picked up by new sessions.
beacon-hooks binary before writing hook configuration. If install fails with an architecture validation error, upgrade Beacon or reinstall the platform-specific release archive for the host, then run the hook install command again.
beacon endpoint hooks install
beacon endpoint hooks install installs hook-based Beacon telemetry for supported harnesses.
Install runtime hooks
PreInvocation, UserPromptSubmit, PreToolUse, PostToolUse, PostInvocation, and Stop. Claude Code hooks cover SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PostToolUseFailure, Stop, SubagentStart, SubagentStop, PermissionRequest, and SessionEnd. Codex CLI uses SessionStart for metadata-only OS-user context; Codex prompt, tool, and token telemetry still comes from its local OpenTelemetry export path, and inventory comes from the scheduled inventory job rather than a hook. Devin CLI hooks cover SessionStart, UserPromptSubmit, PreToolUse, PermissionRequest, PostToolUse, Stop, and SessionEnd. Devin Desktop hooks use Cascade/Windsurf payloads for prompt submission, file writes, command execution, MCP tool use, and file reads. Factory hooks cover SessionStart, UserPromptSubmit, PostToolUse for write/edit/create operations, Stop, and SessionEnd. Grok Build hooks cover SessionStart, UserPromptSubmit, PreToolUse, PostToolUse, PostToolUseFailure, Stop, and SessionEnd. Hermes Agent hooks cover session lifecycle, pre_llm_call, pre_tool_call, post_tool_call, approval request and response, and subagent stop events. OpenCode hooks use Beacon’s managed local plugin to forward chat.message, session, command, permission, diff, and error events. Cline hooks use Beacon’s managed local plugin to forward beforeRun, beforeTool, afterTool, and afterRun, and also accept Cline’s file-based hook names (TaskStart, UserPromptSubmit, PreToolUse, PostToolUse) so one adapter serves both of Cline’s hook surfaces.
Examples
Install Cursor hooks at the user level:Install Cursor hooks at the user level
Install Antigravity hooks at the user level
Install Claude Code hooks at the user level
Install Codex CLI session-context hooks at the user level
Codex CLI hooks installed: /Users/you/.codex/hooks.json.
Install Antigravity hooks at the project level:
Install Antigravity hooks at the project level
Install Cursor hooks at the project level
Install Devin CLI hooks at the user level
Install Devin CLI hooks at the project level
Install Devin Desktop hooks at the user level
Install Devin Desktop hooks at the project level
Install Factory hooks at the user level
Install OpenCode hooks at the user level
Install Grok Build hooks at the user level
Install Hermes Agent hooks at the user level
Install Qwen Code hooks at the user level
Install Grok Build hooks at the project level
/hooks-trust in Grok before they execute.
Install Qwen Code hooks at the project level:
Install Qwen Code hooks at the project level
beacon endpoint hooks install --harness hermes --level project returns an error instead of writing project files.
Install all supported hook integrations:
Install all supported hook integrations
--all is used with --level project, Beacon skips Hermes Agent because Hermes shell hooks are user-level only.
Install Antigravity, Claude Code, Codex CLI, Cursor, Devin CLI, Devin Desktop, Factory, Grok Build, Hermes Agent, OpenCode, and Qwen Code hooks with the same runtime log:
Install Antigravity, Claude Code, Codex CLI, Cursor, Devin CLI, Devin Desktop, Factory, Grok Build, Hermes Agent, OpenCode, and Qwen Code hooks with the same runtime log
Use a custom runtime log
beacon endpoint hooks status
beacon endpoint hooks status checks whether Beacon hook integrations are installed for the selected harnesses.
Check hook status
Examples
Check Cursor hook status:Check Cursor hook status
Check Antigravity hook status
Check Claude Code hook status
Check Codex CLI inventory hook status
Check Factory hook status
Check Devin CLI hook status
Check Devin Desktop hook status
Check OpenCode plugin status
Check Grok Build hook status
Check Hermes Agent hook status
Check Qwen Code hook status
Print hook status as JSON
Show every supported hook integration
Check project-level hooks
beacon endpoint hooks uninstall
beacon endpoint hooks uninstall removes Beacon hook entries for supported harnesses. Existing non-Beacon hooks are preserved.
Remove runtime hooks
Examples
Remove user-level Cursor hooks:Remove user-level Cursor hooks
Remove user-level Antigravity hooks
Remove user-level Claude Code hooks
Remove user-level Codex CLI inventory hooks
Remove project-level Antigravity hooks
Remove project-level Cursor hooks
Remove user-level Devin CLI hooks
Remove project-level Devin CLI hooks
Remove user-level Devin Desktop hooks
Remove project-level Devin Desktop hooks
Remove user-level Factory hooks
Remove user-level OpenCode hooks
Remove user-level Grok Build hooks
Remove user-level Hermes Agent hooks
Remove user-level Qwen Code hooks
Remove project-level Grok Build hooks
Antigravity troubleshooting
Beacon writes Antigravity user-level hooks to~/.gemini/config/hooks.json. Project-level installs write ./.agents/hooks.json. Beacon owns only the beacon-endpoint hook block and leaves other Antigravity hook blocks in place.
If Antigravity telemetry is missing, check the selected level, confirm the hook file contains commands with --platform antigravity, and restart Antigravity so new sessions pick up the updated hook configuration.
Grok Build troubleshooting
Beacon writes Grok Build user-level hooks to~/.grok/hooks/beacon-endpoint.json. Project-level installs write ./.grok/hooks/beacon-endpoint.json and require /hooks-trust in Grok before those hooks execute. Beacon owns only the beacon-endpoint.json hook file and leaves other Grok hook files in place.
If Grok telemetry is missing, check the selected level, confirm the hook file contains commands with --platform grok, run /hooks-trust for project-level hooks, and restart Grok so new sessions pick up the updated hook configuration.
Hermes Agent troubleshooting
Beacon merges Hermes Agent hooks into~/.hermes/config.yaml. Hermes hooks are user-level only; project-level install, status, or uninstall requests return a clear error. Beacon preserves existing Hermes settings and non-Beacon hooks, and replaces only Beacon-managed commands, identified by the endpoint settings flags (--log, --config, --cli) or a legacy BEACON_ENDPOINT_MODE=1 prefix, together with --platform hermes.
If Hermes telemetry is missing, confirm ~/.hermes/config.yaml contains commands with --platform hermes, restart Hermes, and verify hook consent. Hermes prompts for first-use consent for each (event, command) pair; for non-interactive gateway, cron, or CI runs, set HERMES_ACCEPT_HOOKS=1, start Hermes with --accept-hooks, or configure hooks_auto_accept: true.
Qwen Code troubleshooting
Beacon merges its hooks into Qwen Code’s ownsettings.json: ~/.qwen/settings.json for user-level installs, ./.qwen/settings.json for project-level installs. Unrelated top-level keys and non-Beacon hooks in the same event group are preserved, and a re-install replaces Beacon’s own entries instead of adding a second copy. Beacon identifies its entries by the --platform qwen argument in the hook command, since it has no file of its own in ~/.qwen to stamp.
Qwen Code is a Gemini CLI fork without Gemini’s OpenTelemetry export, so hooks are the only collection path for this runtime. beacon endpoint install --harness qwen installs these same hooks and writes ~/.qwen/settings.json.
Two Qwen-specific details are worth knowing before hand-editing the file:
- Timeouts are milliseconds, not seconds. Claude Code reads
timeoutas seconds, so a Claude-style10means 10 ms to Qwen and every tool event is killed mid-write while the install still reports success. Beacon writes millisecond values (30000 for prompt submission, 10000 for tool events, 45000 for stop); events with no entry inherit Qwen’s own 60000 ms default. - Hooks declare
shell: bash. Qwen only uses bash when the hook configuration asks for it. Left unset on Windows it falls back tocmd.exe, which cannot parse Beacon’s POSIX-quoted command, so every hook fails to start. This requiresbashonPATHon Windows, the same requirement Claude Code already carries there.
settings.json contains commands with --platform qwen, confirm disableAllHooks is not set in Qwen’s settings, confirm hook timeouts are millisecond values, trust the folder for a project-level install, and restart Qwen so new sessions pick up the updated settings.
Beacon’s PreToolUse hook answers with an empty object on purpose. Qwen reads hookSpecificOutput.permissionDecision from that hook, where allow means run the tool without the usual approval prompt, so an observing hook that answered allow would silently disarm your own permission prompts. Approval telemetry comes from Qwen’s PermissionRequest event instead.
Codex CLI troubleshooting
Beacon writes Codex CLI endpoint hooks to~/.codex/hooks.json for user-level installs or ./.codex/hooks.json for project-level installs. SessionStart writes local OS-user/session context. This metadata-only hook does not replace the Codex OTLP runtime path for prompt, tool, or token events, and it no longer triggers inventory: that is the scheduled inventory job’s work, in every mode, whether or not Codex runs.
If Codex session context is missing, check the selected level, confirm the hook file contains a command with --platform codex, and restart Codex CLI so new sessions pick up the updated hook configuration.
OpenCode troubleshooting
Beacon installs an owned OpenCode plugin at~/.config/opencode/plugins/beacon.ts for user-level hooks or ./.opencode/plugins/beacon.ts for project-level hooks. The plugin is a thin local adapter: it forwards supported OpenCode hook payloads to Beacon’s Go hook binary, and Beacon handles normalization, redaction, retention, and JSONL output.
For local troubleshooting, set BEACON_OPENCODE_DEBUG=1 in the environment that launches OpenCode to emit best-effort plugin debug logs. Beacon telemetry should not interrupt OpenCode execution if the hook command fails.
Devin troubleshooting
Beacon writes Devin CLI user-level hooks under thehooks key in ~/.config/devin/config.json. Devin CLI project-level installs write the standalone hook map to ./.devin/hooks.v1.json. The legacy devin harness name maps to devin-cli.
Beacon writes Devin Desktop user-level hooks to ~/.codeium/windsurf/hooks.json. Project-level installs write .windsurf/hooks.json, which may also affect Windsurf/Cascade in that workspace. Install and uninstall preserve unrelated settings and non-Beacon hook commands.
If Devin CLI hook telemetry is missing, check the selected level, confirm the hook file contains commands with --platform devin-cli, and restart Devin CLI so new sessions pick up the updated hook configuration. If Devin Desktop telemetry is missing, confirm the hook file contains commands with --platform devin-desktop, generate a Desktop event, and then check the Beacon runtime log.
Related
Core Concepts
Review hook, harness, endpoint event, and runtime log terminology.
Agent harness integrations
Compare hook and OTLP support across Beacon runtimes.