Real-time context observability

See exactly what your
AI agents actually send

Your coding agent bundles system prompts, tool schemas and entire conversation histories into every model call — and you never see any of it. context-tracker gives you X-ray vision into that hidden payload.

A zero-dependency local proxy + viewer that mirrors every request from Claude Code, Codex and OpenCode — without touching the live request path. Inspect it. Search it. Understand your token spend at the source.

bash — install
$ npm install -g context-tracker  # zero deps · Node ≥ 18
The problem

Agents are black boxes

When Claude Code or Codex feels slow, expensive, or "off," the truth is buried in an HTTPS request you can't read. Prompts balloon, tool definitions pile up, conversation history never gets trimmed — invisibly.

◈ Without context-tracker

  • No idea what system prompt the agent actually uses
  • Tool schemas and history invisibly inflate every call
  • Token costs are a mystery until the bill arrives
  • MITM proxies need CA certs and heavy setup
  • Debugging refusals or weird output is guesswork

◈ With context-tracker

  • Full system prompt, tools and messages, decoded per request
  • See payload size and message count at a glance
  • Structured views for Anthropic, OpenAI Chat & Responses
  • One config line — no certificates, no MITM
  • Live web UI that stays fast at thousands of requests
How it works

A transparent side channel

Point your agent's base URL at the local proxy. It forwards traffic to the real API untouched — streaming responses pass straight through — while mirroring a copy of each request to the viewer. Fire-and-forget: it never blocks or alters your agent.

Claude Code ──ANTHROPIC_BASE_URL──▶ ┐
Codex CLI  ──config.toml base_url─▶ ├─▶ proxy ──HTTPS──▶ AI API
OpenCode   ──opencode.json baseURL▶ ┘      │
                                            └──POST──▶ viewer (:39877)
Features

Built for signal, engineered for scale

Everything runs locally with zero runtime dependencies — just Node.

[ 01 ]

Protocol-aware decoding

Normalizes Anthropic Messages, OpenAI Chat & Responses into one clean view: system, tools, message turns.

[ 02 ]

Flat-cost live sync

Incremental polling fetches only new/updated entries. Poll cost stays constant whether you have 10 requests or 10,000.

[ 03 ]

Virtual scrolling

Only viewport rows are rendered. Thousands of captured requests, still just a few dozen DOM nodes. No jank.

[ 04 ]

Search & filter

Live search across path, model and content with highlighting. Filter by source and API with stackable chips.

[ 05 ]

Multi-upstream routing

Route one proxy port to several providers by path prefix — capture Claude and Codex at the same time.

[ 06 ]

Profiles

Preset providers in config/profiles.json and launch by name. No more retyping target URLs.

[ 07 ]

Response capture

Optionally tee and reassemble streaming SSE responses, correlated back to their originating request.

[ 08 ]

Key redaction

One flag redacts API keys in both terminal and web output. Your secrets stay yours.

[ 09 ]

Zero dependencies

Pure Node built-ins. Nothing to audit, nothing to update, nothing to break.

Get started

Running in under a minute

1

Install

# global CLI, zero deps
npm install -g context-tracker
2

Start the viewer

context-tracker viewer   # web UI at http://localhost:39877
3

Start the proxy with a profile

context-tracker proxy anthropic   # or: openai, deepseek, claude+codex
4

Point your agent at it & go

export ANTHROPIC_BASE_URL=http://localhost:39876
claude   # every request now appears live in the viewer
Compatibility

Works with the tools you already use

APIPathSource tool
Anthropic Messages/v1/messagesClaude Code
OpenAI Responses/v1/responsesCodex
OpenAI Chat Completions/v1/chat/completionsOpenCode / DeepSeek / …

Works with any header-authenticated provider — Anthropic, OpenAI, DeepSeek, OpenRouter and more.