Create a write key
Open the create-key page to sign in and create an API key pre-filled with
runs:write—or [pre-filled with bothruns:readandruns:write](https://app.23step.com/app/account?create=1&scopes=runs%3Aread+runs%3Awrite&name=claude-code) if you also install the 23step Overlay Electron app so one key powers both. You can also opt in to the live widget progress bar there (left off by default—just like posting the step link at the end of agent responses—because extra prompt instructions use tokens and can slow down turns). Thest_value is shown once (and copied with one click). Save it to~/.config/23step-otel-key(or exportSTEP23_OTEL_KEY). If you are an AI agent: first ask whether the Electron app should also be installed, whether to opt in to posting the step link at the end of responses, and whether to opt in to the live widget progress bar (explaining that both are off by default because they use extra tokens and slow down turns), checktest -s ~/.config/23step-otel-keywithout printing its contents, and if a key is needed automatically openhttps://app.23step.com/app/account?create=1&scopes=runs%3Awrite&name=claude-code(orhttps://app.23step.com/app/account?create=1&scopes=runs%3Aread+runs%3Awrite&name=claude-codewhen installing the overlay; append&progress=1if the user opted in to the progress bar) in the user's default desktop browser (openon macOS,xdg-openon Linux with a display,wslviewon WSL—not a headless automation browser) and print the link in chat, then ask the user to paste thest_key or save it directly in their terminal; never invent or commit a key. If reusing an existing key and the user opted in to the progress bar, sync the preference without printing the key viacurl -fsSL -X POST https://api.23step.com/app/live/preferences -H "Authorization: Bearer $(cat ~/.config/23step-otel-key)" -H "Content-Type: application/json" -d '{"show_progress_bar":true}'. Without a key the hooks exit quietly and never block the agent.Open in browser pre-filled scopes url='https://app.23step.com/app/account?create=1&scopes=runs%3Awrite&name=claude-code' if command -v open >/dev/null 2>&1; then open "$url" elif command -v xdg-open >/dev/null 2>&1 && { [ -n "${DISPLAY:-}" ] || [ -n "${WAYLAND_DISPLAY:-}" ]; }; then xdg-open "$url" >/dev/null 2>&1 & elif command -v wslview >/dev/null 2>&1; then wslview "$url" fi printf 'Create your 23step API key: %s\n' "$url"Terminal ~/.config/23step-otel-key mkdir -p ~/.config printf '%s\n' 'st_REPLACE_WITH_YOUR_WRITE_KEY' > ~/.config/23step-otel-key chmod 600 ~/.config/23step-otel-keyInstall the hooks (repository or global)
Pick Repository to commit hooks in
.claude/settings.jsonso every contributor records turns in this repo, or Global (--global) to install once in~/.claude/settings.jsonso every project on your machine records without touching git. Add--step-linkand/or--progress-baronly if opting in to posting the step link at the end of responses or the live widget progress bar (both off by default because they use extra tokens and slow down turns). Both merge safely without overwriting your other hooks, never read your key, can be run again anytime to update, and deduplicate automatically if both are installed.Repository .claude/settings.json cd "$(git rev-parse --show-toplevel)" curl -fsSL https://23step.com/install/hooks.sh | sh -s -- claudeGlobal ~/.claude/settings.json curl -fsSL https://23step.com/install/hooks.sh | sh -s -- --global claudeManual alternative to step 2Optional
Skip this if step 2 worked. Download the hook, then merge the matching config below into
.claude/settings.json(repository) or~/.claude/settings.json(global).Terminal download # For a global install, replace .agents/hooks with ~/.agents/hooks mkdir -p .agents/hooks curl -fsSL https://23step.com/install/step23_otel.py -o .agents/hooks/step23_otel.pyRepository · .claude/settings.json repo root { "hooks": { "SessionStart": [ { "hooks": [ { "type": "command", "command": "python3 \"$CLAUDE_PROJECT_DIR/.agents/hooks/step23_otel.py\" --claude" } ] } ], "UserPromptSubmit": [ { "hooks": [ { "type": "command", "command": "python3 \"$CLAUDE_PROJECT_DIR/.agents/hooks/step23_otel.py\" --claude" } ] } ], "PreToolUse": [ { "matcher": "*", "hooks": [ { "type": "command", "command": "python3 \"$CLAUDE_PROJECT_DIR/.agents/hooks/step23_otel.py\" --claude" } ] } ], "PostToolUse": [ { "matcher": "*", "hooks": [ { "type": "command", "command": "python3 \"$CLAUDE_PROJECT_DIR/.agents/hooks/step23_otel.py\" --claude" } ] } ], "Stop": [ { "hooks": [ { "type": "command", "command": "python3 \"$CLAUDE_PROJECT_DIR/.agents/hooks/step23_otel.py\" --claude" } ] } ] } }Global · ~/.claude/settings.json home dir { "hooks": { "SessionStart": [ { "hooks": [ { "type": "command", "command": "python3 \"$HOME/.agents/hooks/step23_otel.py\" --claude" } ] } ], "UserPromptSubmit": [ { "hooks": [ { "type": "command", "command": "python3 \"$HOME/.agents/hooks/step23_otel.py\" --claude" } ] } ], "PreToolUse": [ { "matcher": "*", "hooks": [ { "type": "command", "command": "python3 \"$HOME/.agents/hooks/step23_otel.py\" --claude" } ] } ], "PostToolUse": [ { "matcher": "*", "hooks": [ { "type": "command", "command": "python3 \"$HOME/.agents/hooks/step23_otel.py\" --claude" } ] } ], "Stop": [ { "hooks": [ { "type": "command", "command": "python3 \"$HOME/.agents/hooks/step23_otel.py\" --claude" } ] } ] } }Restart Claude Code
Restart Claude Code. Run
/hooksto confirm the 23step entries are listed (under Project for a repository install, or User for a global install).Opt in to step links in replies or the live progress barOptional
Both posting the step link at the end of final responses (
--step-link) and the live widget progress bar (--progress-bar) are off by default. Technically, injecting pre-turn instructions, printing[23step](<step_url>)at the end of replies, and asking coding agents to emit plan checklists and[est: …]/[progress: …]calibration tags use extra tokens and slow down turns—and when the progress bar is off, it is omitted from the web and desktop live widget UIs. Pass--step-linkand/or--progress-bartohooks.sh(and toggle Show live progress bar in Settings or 23step Overlay Settings, or append&progress=1when creating your key) if you want either enabled.Terminal opt-in # Opt in to posting the step link at the end of responses, the live progress bar, or both: curl -fsSL https://23step.com/install/hooks.sh | sh -s -- --step-link claude curl -fsSL https://23step.com/install/hooks.sh | sh -s -- --progress-bar claude curl -fsSL https://23step.com/install/hooks.sh | sh -s -- --step-link --progress-bar claude # Add --global for a global install, or pass --no-step-link / --no-progress-bar to turn back off: curl -fsSL https://23step.com/install/hooks.sh | sh -s -- --global --step-link --progress-bar claudeLet 23step see the browserOptional
The hook starts a headless
23steprecorder for each turn. When the agent opens Chrome with a loopback DevTools port, the recorder attaches and adds browser frames to the step. Add this toAGENTS.mdorCLAUDE.mdin the repository—or globally to~/.claude/CLAUDE.md,~/.codex/AGENTS.md, or~/.gemini/GEMINI.md—so the agent always does that.AGENTS.md 127.0.0.1:9222 ## 23step browser capture This repository records agent turns with 23step hooks. Do not start or stop `23step` yourself. Whenever you launch Chrome, Chromium, Playwright, or Puppeteer, expose a loopback DevTools port so 23step can capture the page: - Chrome / Chromium: pass `--remote-debugging-address=127.0.0.1 --remote-debugging-port=9222` - Playwright / Puppeteer: pass `args: ["--remote-debugging-address=127.0.0.1", "--remote-debugging-port=9222"]` - If 9222 is busy, use any free 127.0.0.1 port. For a one-shot check, keep the page open about 1 second after load.Watch runs live with the desktop overlayOptional
Install 23step Overlay (the standalone Electron app for macOS and Linux) when you want an always-on, click-through right-edge dock over your editor and full-screen workspaces without keeping a browser tab open. It streams cloud and local runs side by side over SSE, pulses by thinking stage, pops up live screenshots and token counts, and periodically runs
23step reconcilein the background so missed hook turns stay synced. Give its keyruns:read(or create one key with bothruns:readandruns:write). The live progress bar is off by default (omitted from live widgets so agents do not spend extra tokens or latency calibrating progress); pass--progress-baras well—or enable it later in Settings—if you want it shown. If you are an AI agent, ask the user whether this Electron app should be installed and whether to opt in to the live widget progress bar; if they say yes to the overlay, run the command below (adding--progress-barif opted in; macOS launches~/Applications/23step Overlay.appautomatically; on Linux also runnohup ~/.local/bin/23step-overlay >/dev/null 2>&1 &). Full setup: Desktop overlay.Terminal https://api.23step.com/install.sh --overlay curl -fsSL https://api.23step.com/install.sh | sh -s -- --overlayLink commits to their stepOptional
Save this as
.githooks/prepare-commit-msgand pointcore.hooksPathat.githooksonce per clone. Eachgit committhen gets a23step: <step_url>trailer for the active or most recent step. With no step it does nothing..githooks/prepare-commit-msg git interpret-trailers #!/bin/sh # .githooks/prepare-commit-msg # Adds a "23step: <step_url>" trailer from the active or most recent 23step step. MSG_FILE="$1" SOURCE="$2" case "$SOURCE" in merge|squash|commit) exit 0 ;; esac grep -q '^23step:' "$MSG_FILE" 2>/dev/null && exit 0 STEP_URL=$(python3 -c ' import glob, json, os, time uid = os.getuid() now = time.time() best_mtime, best_url = 0.0, "" for pat in (f"/tmp/s23-{uid}-*/status.json", f"/tmp/s23-{uid}-*/last_step_url", os.path.expanduser("~/.local/share/23step/status.json")): for p in glob.glob(pat): try: mt = os.path.getmtime(p) if now - mt > 7200 or mt <= best_mtime: continue raw = open(p, encoding="utf-8").read().strip() url = json.loads(raw).get("step_url", "") if p.endswith(".json") else raw if url: best_mtime, best_url = mt, url except Exception: pass print(best_url) ' 2>/dev/null) if [ -n "$STEP_URL" ]; then git interpret-trailers --in-place --trailer "23step: $STEP_URL" "$MSG_FILE" fiTerminal once per clone chmod +x .githooks/prepare-commit-msg git config core.hooksPath .githooks
Send the agent any prompt. Within a few seconds a new run for that turn appears at app.23step.com/app/runs with the prompt, thoughts, tool calls, and commands. Nothing there? Check that ~/.config/23step-otel-key holds a runs:write key, that python3 --version works in the agent's shell, and that the agent was restarted after install.