You started a Claude Code session and walked away. The agent read fourteen files, ran some commands, edited four. Five minutes later you come back to "All done!" — and you have no idea what actually changed, why, or whether any of it was checked. TraceBack answers that. It hooks into Claude Code's hook system and turns a session into something you can review: your prompts become chapters, the agent's work groups under the tasks it declared, and when the run ends you get a net-change diff per file — the true before-and-after, annotated with the agent's own reasoning and a badge for whether anything verified it. Claude Code's transcript shows you the agent working. TraceBack shows you what changed, why, and whether it was checked — so you stay the engineer instead of a spectator.
Demo
Why TraceBack?Most "agent observability" tools (Langfuse, Arize, LangSmith) ship cloud dashboards that answer "how much" — tokens, latency, spend — for production traffic. TraceBack answers a different question, "what changed and can I trust it", for the single developer in the loop: local-first, in-editor, zero-setup, evidence-based.
Quickstart
Click the TraceBack icon ( How it worksTraceBack injects lightweight
The server binds FeaturesPrompt chaptersA session is a book: each prompt you send opens a chapter, and everything the agent did until your next prompt belongs to it. Inside a chapter, actions group under the tasks the agent declared (via its todo tools) — so you read "Fix stream close → ran the test, edited the file" instead of a flat scroll. When the agent doesn't plan, actions still group into tidy Reading / Editing / Running phase blocks; the view is never a raw list. Net-change reviewWhen a run ends, hit Review changes. Instead of replaying every edit, TraceBack shows the net diff per file — the true baseline-to-now, captured by snapshotting each file the instant before the agent's first edit. Each file carries the agent's own reasoning for the change, the failing command that triggered it (if any), and a verification badge. Verification badgesFor every changed file: verified (a test/build/lint command ran after the last edit and passed), failing (it ran and errored), or unverified (nothing exercised it). "2 of 5 changed files never checked" is the sentence that decides whether you commit — the agent says "done"; TraceBack says what was actually run. Decision & assumption ledgerThe judgment calls the agent makes in prose — "I'll assume the config stays JSON," "went with a regex instead of a dependency" — mined from the transcript and surfaced as a list. Catch a wrong assumption live and redirect before three files calcify around it; for a learner, it makes visible that coding is choices, not typing. ReplayStep through any finished session like a debugger. The cursor slices the event list and every view — chapters, files, decisions — recomputes from the slice, so the whole session time-travels together. Read the intent, predict the next action, advance to check: the study loop that keeps the tool from atrophying yours. Anomaly engine — tuned for low noiseA pure, tail-only detector that re-evaluates on every event in O(1). It is deliberately quiet, because a tool that cries wolf gets muted:
A stall (a call pending with no result) is treated as "waiting on you" — a quiet notice, not a red alarm — because it usually means Claude is at a permission prompt. Real anomalies fire a native VS Code notification and stay as a permanent evidence trail; live alerts self-clear when the condition stops holding. Breakpoints for running agentsHit ⏸ pause and the agent freezes at its next tool call — TraceBack holds the hook's HTTP response open, exactly like a breakpoint in a debugger. Inspect the timeline, then ▶ resume… or type into the redirect box:
Your message is delivered into the agent's context as the reason its call was denied. The agent reads it and changes course, mid-run. Human-in-the-loop steering for black-box agents. GuardsPolicy rules that protect every session at once, no human watching. Four built-in guards toggle on/off from the Guards tab in the panel:
Custom guards are plain regexes matched against the full tool call (tool name + arguments):
A matching call is denied before it executes via Claude Code's hook decision protocol; the guard's name is fed back into the agent's context so it knows why and can change course. The CLI asks per session, interactively; guards are fleet-wide policy. Files touched, not just files changedThe Files tab toggles between Changes (what was created/modified, with +/− lines and verification badges) and Touched — a tree of everything the agent read as well. "It read fourteen files to make this two-line change" is a coupling insight no chronological view surfaces. Multi-agent fleet viewRun multiple Claude Code sessions in parallel? Each gets a distinct identity (color + short tag, so two runs in the same folder never blur together) and a live status. See a failure in agent #3 while watching agent #1. Real token & cost metricsPulls actual token usage from the Claude Code transcript ( Narrative Engine (optional)Connect a Groq or local Ollama instance and TraceBack generates a 1–2 sentence plain-English summary of the session after each tool call. "It's been reading config files and is about to make its first edit." Chat assistant (optional)Ask questions about the current session directly in the webview. "Why did the agent fail?", "What files were touched?", "Is this loop intentional?" — answered with the timeline already loaded as context. Curated payloads & copy-everythingExpanded cards show purpose-built views instead of raw dumps: Bash commands with exit pills, file ops with line/byte metrics, plus a deterministic one-line outcome that explains known failures in plain English ("path is a directory — Read only works on files"). Raw input/output stays one click away, and everything is copyable. ExportOne Export session menu, four formats: JSON (the raw session), Markdown (a conversation-shaped post-mortem for a GitHub issue or a handoff to a fresh agent), a self-contained shareable HTML page, or a PNG snapshot. Auto hook managementTraceBack surgically adds and removes only its own entries in Requirements
InstallationFrom source (recommended while pre-release)
Open the repo in VS Code and press F5 to launch the Extension Development Host. To install it permanently:
Pro tip — richer traces with one CLAUDE.md lineTraceBack mines the sentence Claude writes right before each tool call and shows it on the action card as the call's intent — the "why" behind every step. TraceBack already nudges the agent toward this on substantial prompts, but you can make narration a standing habit by adding this to your
The first rule feeds the intent subtitles on every card; the second feeds TraceBack's decision & assumption ledger. Both cost the agent a few tokens per step and turn the trace from a list of tool names into a narrated decision log you can actually review. Commands
ConfigurationAll settings live under
Enabling the Narrative EngineThe AI helper (plain-English summary + sidebar chat) is opt-in and supports two backends. You can configure it via VS Code settings or a local Option A — Groq (cloud, free tier, recommended)
If you'd rather use VS Code settings (e.g. for a team-shared workspace), the equivalent is:
VS Code settings always override Option B — Ollama (fully local, no API key)Install Ollama from ollama.com, pull a model, then:
or in
Architecture
The derivation modules ( Development
Press F5 in VS Code to launch the Extension Development Host with the extension loaded. TestingThe pure derivation modules carry the suite — anomaly detector, trace store, chapters, review, file changes, token/decision mining, prompt heuristics — 130+ tests running on every push via GitHub Actions on Node 20 and 22.
Roadmap
LicenseMIT — built by Madiyar Zhunussov. |