jddavenportOpen

Ccstitch — Development skill for Claude Code

Development community

Local trace store for Claude Code's OpenTelemetry spans: repairs orphaned headless turns (claude-code#99607), nests claude -p children under the tool call that launched them, built-in viewer, forwards.

How to install Ccstitch

This entry records only its repository, not the path inside it, so there is no exact command to give. Open jddavenportOpen/ccstitch and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Ccstitch does

Local trace store for Claude Code's OpenTelemetry spans: repairs orphaned headless turns (claude-code#99607), nests claude -p children under the tool call that launched them, built-in viewer, forwards to Phoenix/Jaeger/Langfuse. Stdlib only.

Alternatives in Development

  • Claude Code Viewer — A full-featured web-based Claude Code client that provides complete interactive functionality for managing Cla 984 ★
  • Call Graph — Trace callers, callees, or paths using the call graph 193 ★
  • Collect Insights — Use when you want to flush pending insights to Obsidian vault and epistemic tracking 60 ★

README

ccstitch

See what every Claude Code session did, on your own machine: each turn's model calls and tool calls with timing, tokens and a list-price cost estimate, and the `claude -p` sessions those turns launched, nested under the tool call that launched them.

ccstitch is a small local collector for Claude Code's native OpenTelemetry spans. It stores them in one SQLite file, repairs the traces the CLI currently breaks, serves a built-in viewer, and can forward the repaired traces to Phoenix, Jaeger, Tempo or Langfuse.

  • Python standard library only (3.10+). No dependencies, no build step, no CDN.
  • One process bound to 127.0.0.1, one SQLite file, 7-day retention by default.
  • Maps every span onto the OpenTelemetry GenAI semantic conventions.

The problem

Claude Code can export a span tree per turn (`claude_code.interaction` → `llm_request` / `tool` → `tool.execution` ...). Point it at Jaeger or Phoenix and two things go wrong:

  1. Orphaned headless turns: anthropics/claude-code#99607. Headless (claude -p) turns intermittently lose the claude_code.interaction root span. Every llm_request and tool span of that turn then arrives as a parentless root in its own trace, and the inbound TRACEPARENT is ignored. One turn becomes a dozen one-span traces. Measured on CLI 2.1.283: 2 of 5 headless runs.
  2. Agents that launch agents are separate processes. A claude -p started from another session's Bash tool is its own process. Its only link to the tool call that started it is the TRACEPARENT environment variable, and when (1) hits the child, that link is gone too.

The raw export is therefore unusable for anything that runs agents from agents: scripts, CI jobs, orchestrators, cron.

60-second quickstart

pipx install git+https://github.com/jddavenportOpen/ccstitch   # or: pip install git+https://...
ccstitch install --dry-run      # shows the exact settings.json diff; writes not