phoenix-observability
Skill0 starsChanged 3 months agoMITView on GitHub
Set up, repair, or debug Claude Code tracing into a local Arize Phoenix instance — every session on the machine traced, each working directory as its own Phoenix project, Turn spans named after the prompt. Use when the user wants Claude Code observability/tracing/monitoring, mentions Arize or Phoenix, or reports missing/partial traces, empty Phoenix projects, spans all named "Turn 1", or hook errors like "command not found" or "charmap codec can't decode".
- Installs packages
2 other projects use a version of this.
Adopted by
Most recently taken up by
- mhiskall282/Securing-the-Digital-Mine-UNESCO-Projecttheir own version, first seen Sep 20, 2026
- Clay-HHK/claude-skillstheir own version, first seen Mar 5, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- Clay-HHK/claude-skills★ 1same name
- mhiskall282/Securing-the-Digital-Mine-UNESCO-Project★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Files
Claude Code → Arize Phoenix observability
Traces every Claude Code session on a machine into a local Phoenix instance: prompts, turns, tool calls, subagents and token counts.
The stock Arize harness installs but does not work end-to-end on Windows, and groups every repository into a single project. This skill installs it and applies the fixes that make it actually deliver spans.
What you get
- Global: hooks live in
~/.claude/settings.json, so every project is traced, not just the one you set it up in. - Per-directory projects: each working directory becomes its own Phoenix project, named after the directory.
- Readable turns:
Turn 3: fix the login redirectinstead ofTurn 1.
Fresh setup
Requires Docker and git. Python 3.9+ to run the scripts.
python scripts/setup.pyIdempotent — it is also the repair command. Then open a new Claude Code
session and check http://localhost:6006/projects.
Against an existing or remote Phoenix:
python scripts/setup.py --skip-phoenix --endpoint http://phoenix.internal:6006Diagnosing "I see no traces"
python scripts/doctor.py --smokeChecks each layer in the order it fails and, with --smoke, drives the real hook
binaries end-to-end and confirms a span lands (then deletes the probe project).
Work top-down — the four causes below are ranked by how often they are the answer, and each one produces zero or partial traces with no obvious error.
1. Hook paths with backslashes (Windows) — silent total failure
Symptom: UserPromptSubmit hook error / Failed with non-blocking status code:
C:Usersyou.arizeharness...exe: command not found.
Claude Code runs hooks through bash, which eats \ as an escape character, so
C:\Users\you\...\arize-hook-stop.exe becomes C:Usersyou...exe. Every hook
no-ops; tracing looks installed and records nothing.
python scripts/fix_settings.pyThe installer rewrites native paths every time it runs — re-run this after any
install.sh / install.bat.
2. Phoenix too old — every span 405s
Symptom: no project ever appears; log shows
Phoenix send failed: HTTP 405: Method Not Allowed.
The harness POSTs to /v1/projects/{id}/spans, which was GET-only in older
Phoenix builds. A cached :latest image can be a year old.
python scripts/phoenix_up.py # pulls, recreates, verifies the ingest routeData lives in the phoenix_data volume, so recreating the container keeps it.
Note Phoenix rejects JSON OTLP on /v1/traces with 415 — that is not a fallback.
3. Non-ASCII crash — partial traces
Symptom: a project exists but with holes; log shows
'charmap' codec can't decode byte 0x9d.
Python defaults to cp1252 on Windows, so any turn containing an emoji, arrow or
curly quote crashes the hook. Plain-ASCII turns trace fine — which is exactly why
the gaps look random. Fixed at two independent layers (PYTHONUTF8=1 in settings,
plus UTF-8 pinned in the source):
python scripts/fix_settings.py && python scripts/patch_harness.py4. Nothing wrong — you are waiting for a delay that does not exist
Sends are synchronous; each hook POSTs its span immediately. A span not in
Phoenix within a second or two is not late, it is gone, and the reason is in
~/.arize/harness/logs/claude-code.log. That log is written only on error, so
empty means healthy.
cat ~/.arize/harness/logs/claude-code.logIs a session being traced at all? A live session writes a state file:
ls ~/.arize/harness/state/claude-code/After upgrading the harness
The two behaviour patches edit a third-party repo, so git pull in
~/.arize/harness drops them:
python scripts/patch_harness.py # re-apply + reinstall
python scripts/fix_settings.py # re-fix hook pathspatch_harness.py --check reports status without changing anything. If upstream
has moved, it reports anchor-drift and refuses rather than corrupting the file —
re-derive the edit from references/patches.md.
Configuration
| Want | Do |
| Custom project name for one repo | PHOENIX_PROJECT in that repo's .claude/settings.json env block — it outranks the directory name |
| All repos in one project | set harnesses.claude-code.project_name in ~/.arize/harness/config.json |
| Stop recording prompt text | logging.prompts: false in the same file; Turn spans fall back to bare Turn N |
| Disable tracing temporarily | ARIZE_TRACE_ENABLED=false |
Gotchas that cost real time
- The harness venv is not an editable install. Hooks import a copy under
venv/Lib/site-packages. Editing the repo source changes nothing untilpip install .is re-run —patch_harness.pydoes this for you. Testing withpython -cfrom the repo root imports the source and will appear to work while the real hooks still run old code. - Two Stop rendering paths exist. The event-graph path (CHAIN turn + LLM/TOOL
children) only runs when the transcript has new lines past
trace_start_line; otherwise it falls back to a single legacy LLM span. Both are patched. - Directories sharing a basename merge into one project (two different
backend/folders). UsePHOENIX_PROJECTto disambiguate. - Hooks are not snapshotted at session start — edits take effect on the next hook event, though a fresh session is the reliable way to confirm.
Reference
- references/patches.md — what each patch changes and why a config-only solution is impossible
- references/architecture.md — how a span travels from keystroke to Phoenix
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

