Skip to content
CodeAutopsy
record · resolve · fix() · built for SigNoz

Observability stops at the deploy.
CodeAutopsy doesn't.

git blame tells you which commit broke prod. CodeAutopsy tells you which reasoning step of which AI agent broke it — crossing the dev-time → runtime boundary with a single OpenTelemetry span link, then handing the agent its own autopsy so it fixes itself.

codeautopsy · the jump, in one trace
runtime · checkout-api
POST /checkout 500
  └─ parse_discount()
    └─ codeautopsy.autopsy
dev-time · claude-code
agent.turn
  └─ agent.tool.Edit
    "assuming input is valid"
one OTel span link — click it in SigNoz to jump from the crash straight to the decision that caused it

The one trick

Four hops, each one ordinary. Chained together, they cross a boundary no other observability tool instruments.

01
file:line

A runtime stack frame from the crash — the only thing a normal APM gives you.

02
git blame

At the deployed commit, blame resolves that line to the commit that introduced it — even if it's shifted since.

03
provenance index

(commit, file, line-range) → the AI decision span that wrote it, including its own recorded reasoning.

04
span link

Stitches the runtime error trace to that dev-time decision trace — one click in SigNoz, crash to cause.

The pipeline

Five small components. None of them are clever alone — the join is the whole product.

Recorder

A Claude Code PostToolUse hook that mints a dev-time decision span for every edit, carrying the agent's own reasoning and risk flags.

Provenance

SQLite store plus the git-blame join engine — the resolve() API that answers "which decision wrote this line."

Enricher

Runs inside the instrumented sample app. On exception, mints the linked codeautopsy.autopsy span and logs the incident.

Coroner CLI

codeautopsy autopsy <commit> <file> <line> — the chain of custody, printed for a human.

Fix Bot

Feeds the agent its own genealogy — the reasoning that wrote the bug and the incident that proves it broke — as a forced tool call. Applies the patch, proves it with a real regression test derived from the exact failing input, and only commits + opens a PR if that test actually passes.

status

Day-0 validated on real infrastructure.

The span-link click navigates across traces and services in SigNoz Cloud. 100+ tests, ruff and mypy clean, containerized with Docker, gated by CI.

99% coverage ruff · mypy clean docker compose up CI on every push