Skip to content

Repository files navigation

Wake

Wake is an open-source visual flight recorder for coding agents. It imports execution traces, normalizes tool calls into standardized events, and provides a local web UI to explore what the agent read, modified, and verified.

See what your coding agent did.

Features

  • Import Codex JSONL sessions (~/.codex/sessions/.../*.jsonl).
  • Import generic JSONL traces.
  • Normalize tool calls into discover, search, read, write, command, test, build, check, git, web events.
  • Aggregate file traces, phases, overview metrics, and relationships.
  • Rule-based labels: deep-read, reread, modified, verified, modified-without-reading, rechecked-after-failure.
  • Local web UI: Run List, Overview, Wake Map (treemap), Timeline, File Detail, Raw Events.
  • CLI: wake open, wake serve, wake import, wake inspect, wake rebuild.
  • Real-time updates via Server-Sent Events (SSE).

Tech Stack

  • Node.js 22+
  • pnpm workspace
  • TypeScript strict mode
  • @wake/core: schemas, adapters, rules, aggregation, storage
  • wake CLI: Commander + Hono + static web assets
  • @wake/web: React + Vite + Tailwind + ECharts + TanStack Query

Quick Start

# Install dependencies
pnpm install

# Build everything
pnpm build

# Import a Codex session and open the browser
node packages/cli/dist/cli.js open ~/.codex/sessions/2026/07/12/rollout-2026-07-12T17-13-39-019f559a-8d07-7cf3-a8e1-6feecde903b5.jsonl

# Or import a generic fixture
node packages/cli/dist/cli.js open fixtures/generic-fixture.jsonl

CLI Commands

wake open [trace.jsonl]      # Import trace and open browser
wake watch [trace.jsonl]     # Watch a file (or ~/.codex/sessions) and live-update the UI
wake serve                   # Start server
wake import trace.jsonl      # Import trace only
wake inspect <runId>         # Print overview JSON
wake rebuild <runId>         # Rebuild aggregate snapshots

Live watching

Wake has two live-collection modes.

1. Codex hooks (recommended, true real-time)

Codex supports Claude-Code-style hooks (~/.codex/hooks.json). Wake can install itself as a hook target so every PreToolUse / PostToolUse / SessionStart / UserPromptSubmit / Stop event is pushed into Wake the moment it happens:

# Install Wake into ~/.codex/hooks.json (merges with existing hooks)
wake hooks install

# Start the live server and open the browser
wake watch

# Use Codex as usual — the UI refreshes as each tool call fires
# Remove the hook entries again:
wake hooks uninstall

How it works: Codex runs wake hook for each event, which appends the raw hook JSON to ~/.wake/live/<session>.jsonl. wake watch picks the spool file up within a second, re-aggregates the run, and pushes an SSE update to the browser.

2. Rollout file tailing (no config needed)

wake watch polls a Codex rollout file (or every *.jsonl under ~/.codex/sessions) and re-imports it whenever it changes. The web UI subscribes to Server-Sent Events and refreshes automatically — you will see a green Live indicator in the header while watching.

# Live-follow a single Codex session
wake watch ~/.codex/sessions/2026/07/12/rollout-*.jsonl

# Watch all sessions under the default Codex sessions directory
wake watch

# Custom poll interval and no browser auto-open
wake watch --interval 1000 --no-open

Development

# Start API server and Vite dev server
pnpm dev

# Run tests
pnpm test

# Typecheck
pnpm typecheck

# Lint
pnpm lint

# Format
pnpm format

Supported Trace Formats

Codex JSONL

Wake can import Codex desktop session dumps. Each line is a JSON object with timestamp, type, and payload. Tool calls appear as response_item objects with type: "custom_tool_call" (usually the exec tool). Wake parses the embedded command, classifies it, and associates it with the matching tool output to determine success.

wake import ~/.codex/sessions/2026/07/12/rollout-*.jsonl

Generic JSONL

Wake also accepts a simple JSONL file where each line is a JSON object. A line can describe either run metadata or a single event:

{"run":{"id":"run-1","title":"Fix auth","agentType":"generic","startedAt":1700000000000,"status":"success"}}
{"toolName":"read_file","path":"src/auth.go","range":{"startLine":1,"endLine":50},"timestamp":1700000001000}
{"toolName":"edit_file","path":"src/auth.go","range":{"startLine":10,"endLine":20},"timestamp":1700000002000}
{"toolName":"go test","command":"go test ./...","type":"test","success":true,"timestamp":1700000003000}

If type and category are omitted, Wake classifies the tool automatically.

Project Structure

wake/
├── apps/web/           # React web application
├── packages/core/      # Shared core logic
├── packages/cli/       # Wake CLI and server
├── fixtures/           # Example trace files
├── biome.json          # Lint and format config
├── tsconfig.base.json  # Shared TypeScript config
└── pnpm-workspace.yaml

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages