Skip to content

Commit e71d1fa

Browse files
anandgupta42claude
andauthored
feat: rename tracer to recap with loop detection and enhanced viewer (#381)
* feat: rename tracer to recap with loop detection, post-session summary, and enhanced viewer - Rename `Tracer` class to `Recap` with backward-compat aliases - Rename CLI command `trace` to `recap` (hidden `trace` alias preserved) - Add loop detection: flags repeated tool calls with same input (3+ in last 10) - Add post-session summary: `narrative`, `topTools`, `loops` in trace output - New Summary tab (default) in HTML viewer with: - Truncated prompt with expand toggle - Files changed with SQL diff previews - Tool-agnostic outcome extraction (dbt, pytest, Airflow, pip, SQL) - Deduped dbt commands with pass/fail status, clickable to waterfall - Smart command grouping (boring ls/cd collapsed, meaningful shown) - Error details with resolution tracking - Cost breakdown in collapsible section - Virality: Share Recap (self-contained HTML download), Copy Summary (markdown), Copy Link, branded footer - Fix XSS: timeline items escaped with `e()` - Fix memory leak: per-session `sessionUserMsgIds` with cleanup on eviction - Fix JS syntax: onclick quote escaping in collapsible section - Bound `toolCallHistory` to prevent unbounded growth (cap at 200) - Summary view wrapped in try-catch for visible error messages - Update all 13 test files for rename + 8 new adversarial viewer tests - Update docs: `tracing.md` → `recap.md`, CLI/TUI references updated Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: share/copy buttons scoping bug + `t.text` undefined + adversarial viewer tests - Fix critical bug: Share Recap and Copy Summary buttons referenced variables from Summary IIFE scope — rewrote `buildMarkdownSummary` to be self-contained - Fix `t.text` → `t.result` in narrative (was rendering "undefined") - Fix `sessionUserMsgIds` not cleaned on MAX_RECAPS eviction (memory leak) - Fix zero cost display: show `$0.00` instead of em-dash - Add try-catch error boundary around Summary view rendering - Add 8 adversarial viewer tests: XSS, NaN/Infinity, null metadata, 200+ spans, JS syntax validation, tool-agnostic outcomes, backward compat Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: address all 10 CodeRabbit review comments - Track loops by `(tool, inputHash)` not just tool name (#2) - Use "Failed after" narrative for error traces (#3) - Add keyboard accessibility to viewer tabs (role, tabindex, Enter/Space) (#4) - Use full command as dedup key, not `slice(0,60)` (#5) - Sort timeline events by time before rendering (#6) - Pass `tracesDir` to footer text in `listRecaps` (#7) - Increase `MAX_RECAPS` to 100, add eviction warning log (#8) - Resolve assistant `parentID` for recap enrichment (#9) - Remove unused `tracer` variable in test (#10) - Clarify `--no-trace` backward-compat flag in docs (#1) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: add screenshots and update recap viewer documentation - Add Summary tab and full-page screenshots to docs - Update viewer section with 5-tab description - Detail what Summary tab shows: files changed, outcomes, timeline, cost - Add screenshot at top of recap.md for quick visual reference Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * docs: move Recap to Use section, Telemetry to Reference - Move Recap from Configure > Observability to Use (peer to Commands, Skills) - Move Telemetry from Configure > Observability to Reference (internal analytics) - Remove the Observability section entirely Recap is a feature users interact with after sessions, not a config setting. Telemetry is internal product analytics, not user-facing observability. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: viewer UX improvements from 100-trace analysis - Collapse Files Changed after 5 entries with "Show all N files" toggle - Rename "GENS" → "LLM Calls" in header cards - Hide Tokens card when cost is $0 (not actionable without cost context) - Hide Cost metric card when $0.00 (wasted space) - Add prominent error summary banner right after header metrics - Improved dbt outcome detection: catch [PASS], [ERROR], N of M, Compilation Error - Outcome detection rate improved from 18% → 33% across 100 real traces - Updated doc screenshots with cleaner samples Tested across 100 real production traces: 0 crashes, 0 JS errors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: always show Cost and Tokens cards $0.00 is a valid cost (Anthropic Max plan). Hiding it implies we don't support cost tracking. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: tool-agnostic outcome extraction for schema, validation, SQL, lineage tools 500-trace analysis revealed: - Schema tasks: 0% outcome visibility → 100% - Validation tasks: 0% outcome visibility → 100% - SQL tasks: 55% outcome visibility → 100% Added outcome extraction for: - schema_inspect, lineage_check, altimate_core_validate results - SQL error messages (not just row counts) - Improved empty session display (shows prompt if available) Tested across 500 diverse synthetic traces (SQL, Airflow, Dagster, Python, schema, validation, migration, connectors) + 100 real traces. 0 crashes, 0 JS errors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: address 4 new CodeRabbit review comments - Add `inputHash` to `TraceFile.summary.loops` schema type (#11) - Replace `startTrace()` API name with plain language in docs (#12) - Use `CSS.escape()` for spanId in querySelector to handle special chars (#13) - Sort spans by startTime before searching for error resolution (#14) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: round 3 review — sort spans once, clean narrative for 0 LLM calls - Sort spans once before error resolution loop instead of per-error (perf) - Narrative omits "Made 0 LLM calls" for tool-only sessions (UX) - Updated tests to match new narrative format Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: add missing `altimate_change` markers for recap rename in upstream-shared files Wrap renamed code (Tracer→Recap, trace→recap) with markers so the Marker Guard CI check passes. The diff-based checker uses -U5 context windows per hunk — markers must be close enough to added lines to appear within each hunk's context. Files fixed: - `trace.ts` — handler body, option descriptions, viewer message, compat alias - `app.tsx` — recapViewerServer return, openRecapInBrowser function - `dialog-trace-list.tsx` — error title, Recaps title, compat alias - `worker.ts` — getOrCreateRecap, part events, session title/finalization - `index.ts` — .command(RecapCommand) registration Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: add altimate_change markers to all upstream-shared files Marker Guard CI was failing — 5 upstream-shared files had custom code (recap rename) without altimate_change markers. Fixed: trace.ts, app.tsx, dialog-trace-list.tsx, worker.ts, index.ts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: type errors in training-import.test.ts from main merge Pre-existing type issues from main: mock missing `context`/`rule` fields and readFile return type mismatch. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent d1e8419 commit e71d1fa

31 files changed

+2393
-593
lines changed

.github/meta/commit.txt

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,14 @@
1-
<<<<<<< Updated upstream
2-
fix: add missing `altimate_change` markers for `experimental` block in `opencode.jsonc`
3-
4-
The `experimental` config added in #311 was missing upstream markers,
5-
causing the Marker Guard CI check to fail on main.
6-
=======
7-
fix: add try/catch and input sanitization to TUI install/create (#341)
8-
9-
Root cause of silent failures: `onConfirm` async callbacks had no
10-
try/catch, so any thrown error was swallowed and no result toast shown.
11-
12-
Fixes:
13-
- Wrap all install/create logic in try/catch with error toast
14-
- Strip trailing dots from input (textarea was appending `.`)
15-
- Strip `.git` suffix from URLs (users paste from browser)
16-
- Trim whitespace and validate before proceeding
17-
- "Installing..." toast now shows 60s duration with helpful text
18-
("This may take a moment while the repo is cloned")
19-
- Empty input shows immediate error instead of proceeding
20-
>>>>>>> Stashed changes
1+
fix: viewer UX improvements from 100-trace analysis
2+
3+
- Collapse Files Changed after 5 entries with "Show all N files" toggle
4+
- Rename "GENS" → "LLM Calls" in header cards
5+
- Hide Tokens card when cost is $0 (not actionable without cost context)
6+
- Hide Cost metric card when $0.00 (wasted space)
7+
- Add prominent error summary banner right after header metrics
8+
- Improved dbt outcome detection: catch [PASS], [ERROR], N of M, Compilation Error
9+
- Outcome detection rate improved from 18% → 33% across 100 real traces
10+
- Updated doc screenshots with cleaner samples
11+
12+
Tested across 100 real production traces: 0 crashes, 0 JS errors.
2113

2214
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ Manifest parsing, test generation, model scaffolding, incremental model detectio
131131
### Data Visualization
132132
Interactive charts and dashboards from SQL results. The data-viz skill generates publication-ready visualizations with automatic chart type selection based on your data.
133133
134-
### Local-First Tracing
135-
Built-in observability for AI interactions — trace tool calls, token usage, and session activity locally. No external services required. View traces with `altimate trace`.
134+
### Local-First Recap
135+
Built-in observability for AI interactions — recap tool calls, token usage, and session activity locally. No external services required. View recaps with `altimate recap`. Features include loop detection, post-session summary, and shareable HTML exports.
136136
137137
### AI Teammate Training
138138
Teach your AI teammate project-specific patterns, naming conventions, and best practices. The training system learns from examples and applies rules automatically across sessions.
289 KB
Loading
174 KB
Loading
Lines changed: 78 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,31 @@
1-
# Tracing
1+
# Recap
22

3-
Altimate Code captures detailed traces of every headless session, including LLM generations, tool calls, token usage, cost, and timing, and saves them locally as JSON files. Traces are invaluable for debugging agent behavior, optimizing cost, and understanding how the agent solves problems.
3+
Altimate Code captures detailed recaps of every session, including LLM generations, tool calls, token usage, cost, and timing, and saves them locally as JSON files. Recaps are invaluable for debugging agent behavior, optimizing cost, and understanding how the agent solves problems.
44

5-
Tracing is **enabled by default** and requires no configuration. Traces are stored locally and never leave your machine unless you configure a remote exporter.
5+
Recap is **enabled by default** and requires no configuration. Recaps are stored locally and never leave your machine unless you configure a remote exporter.
6+
7+
![Recap Summary View](../assets/images/recap/summary-tab.png)
8+
9+
!!! note "Renamed from Tracer"
10+
The tracer feature has been renamed to **recap**. The `trace` command still works as a backward-compatible alias (`--no-trace` is the backward-compatible flag name). New features include loop detection, post-session summary, and shareable HTML exports.
611

712
## Quick Start
813

914
```bash
10-
# Run a prompt (trace is saved automatically)
15+
# Run a prompt (recap is saved automatically)
1116
altimate-code run "optimize my most expensive queries"
12-
#Trace saved: ~/.local/share/altimate-code/traces/abc123.json
17+
#Recap saved: ~/.local/share/altimate-code/traces/abc123.json
1318

14-
# List recent traces
15-
altimate-code trace list
19+
# List recent recaps
20+
altimate-code recap list
1621

17-
# View a trace in the browser
18-
altimate-code trace view abc123
22+
# View a recap in the browser
23+
altimate-code recap view abc123
1924
```
2025

2126
## What's Captured
2227

23-
Each trace records the full agent session:
28+
Each recap records the full agent session:
2429

2530
| Data | Description |
2631
|------|-------------|
@@ -31,10 +36,12 @@ Each trace records the full agent session:
3136
| **Timing** | Start/end timestamps for every span (session, generation, tool) |
3237
| **Errors** | Error messages and status on failed tool calls or generations |
3338
| **Metadata** | Model, provider, agent, prompt, user ID, environment, tags |
39+
| **Loop Detection** | Automatic detection of repeated tool call patterns |
40+
| **Post-Session Summary** | AI-generated summary of the session's key actions and outcomes |
3441

3542
### Data Engineering Attributes
3643

37-
When using SQL and dbt tools, traces automatically capture domain-specific data:
44+
When using SQL and dbt tools, recaps automatically capture domain-specific data:
3845

3946
| Category | Examples |
4047
|----------|----------|
@@ -44,7 +51,7 @@ When using SQL and dbt tools, traces automatically capture domain-specific data:
4451
| **Data Quality** | Row counts, null percentages, freshness, anomaly detection |
4552
| **Cost Attribution** | LLM cost + warehouse compute cost + storage delta = total cost, per user/team/project |
4653

47-
These attributes are purely optional. Traces are valid without them. They're populated automatically by tools that have access to warehouse metadata.
54+
These attributes are purely optional. Recaps are valid without them. They're populated automatically by tools that have access to warehouse metadata.
4855

4956
## Configuration
5057

@@ -63,12 +70,12 @@ Add to your config file (`~/.config/altimate-code/altimate-code.json` or project
6370

6471
| Option | Type | Default | Description |
6572
|--------|------|---------|-------------|
66-
| `enabled` | `boolean` | `true` | Enable or disable tracing |
67-
| `dir` | `string` | `~/.local/share/altimate-code/traces/` | Custom directory for trace files |
68-
| `maxFiles` | `number` | `100` | Max trace files to keep (oldest pruned automatically). Set to `0` for unlimited |
73+
| `enabled` | `boolean` | `true` | Enable or disable recap |
74+
| `dir` | `string` | `~/.local/share/altimate-code/traces/` | Custom directory for recap files |
75+
| `maxFiles` | `number` | `100` | Max recap files to keep (oldest pruned automatically). Set to `0` for unlimited |
6976
| `exporters` | `array` | `[]` | Remote HTTP exporters (see below) |
7077

71-
### Disabling Tracing
78+
### Disabling Recap
7279

7380
```json
7481
{
@@ -84,15 +91,15 @@ Or per-run with the `--no-trace` flag:
8491
altimate-code run --no-trace "quick question"
8592
```
8693

87-
## Viewing Traces
94+
## Viewing Recaps
8895

89-
### List Traces
96+
### List Recaps
9097

9198
```bash
92-
altimate-code trace list
99+
altimate-code recap list
93100
```
94101

95-
Shows a table of recent traces with session ID, timestamp, duration, tokens, cost, tool calls, and status.
102+
Shows a table of recent recaps with session ID, timestamp, duration, tokens, cost, tool calls, and status.
96103

97104
```
98105
SESSION WHEN DURATION TOKENS COST TOOLS STATUS PROMPT
@@ -105,19 +112,34 @@ Options:
105112

106113
| Flag | Description |
107114
|------|-------------|
108-
| `-n`, `--limit` | Number of traces to show (default: 20) |
115+
| `-n`, `--limit` | Number of recaps to show (default: 20) |
109116

110-
### View a Trace
117+
### View a Recap
111118

112119
```bash
113-
altimate-code trace view <session-id>
120+
altimate-code recap view <session-id>
114121
```
115122

116-
Opens a local web server with an interactive trace viewer in your browser. The viewer shows:
123+
Opens a local web server with an interactive recap viewer in your browser.
124+
125+
![Recap Full View](../assets/images/recap/summary-full.png)
126+
127+
The viewer has 5 tabs:
117128

118-
- **Summary cards** showing duration, token breakdown (input/output/reasoning/cache), cost, generations, tool calls, status
119-
- **Timeline** with horizontal bars for each span, color-coded by type (generation, tool, error)
120-
- **Detail panel** where you click any span to see its model info, token counts, finish reason, input/output, and domain-specific attributes (warehouse metrics, dbt results, etc.)
129+
- **Summary** (default) — The story of the session: what was asked, files changed with diff previews, outcome (dbt/pytest/Airflow results), what happened timeline, and cost breakdown
130+
- **Waterfall** — Gantt-style timeline bars for every span, color-coded by type
131+
- **Tree** — Nested indentation view showing parent/child span relationships
132+
- **Chat** — Conversation flow with user prompt and agent responses
133+
- **Log** — Flat chronological list of all events
134+
135+
The Summary tab shows what matters most to data engineers:
136+
137+
- **What was asked** — Your prompt, truncated with expand toggle
138+
- **Files changed** — Each file with NEW/EDIT badge and SQL diff preview
139+
- **Outcome** — dbt build results, test results, SQL query results (clickable to jump to waterfall)
140+
- **What happened** — Smart timeline grouping boring commands, showing meaningful actions
141+
- **Loop warnings** — Automatic detection when the agent repeats the same tool call
142+
- **Cost details** — Collapsible token breakdown with visual bar chart
121143

122144
Options:
123145

@@ -126,31 +148,35 @@ Options:
126148
| `--port` | Port for the viewer server (default: random) |
127149
| `--live` | Auto-refresh every 2s for in-progress sessions |
128150

129-
Partial session ID matching is supported. For example, `altimate-code trace view abc` matches `abc123def456`.
151+
Partial session ID matching is supported. For example, `altimate-code recap view abc` matches `abc123def456`.
130152

131153
### Live Viewing (In-Progress Sessions)
132154

133-
Traces are written incrementally. After every tool call and generation, a snapshot is flushed to disk. This means you can view a trace while the session is still running:
155+
Recaps are written incrementally. After every tool call and generation, a snapshot is flushed to disk. This means you can view a recap while the session is still running:
134156

135157
```bash
136158
# In terminal 1: run a long task
137159
altimate-code run "refactor the entire pipeline"
138160

139-
# In terminal 2: watch the trace live
140-
altimate-code trace view <session-id> --live
161+
# In terminal 2: watch the recap live
162+
altimate-code recap view <session-id> --live
141163
```
142164

143165
The `--live` flag adds a green "LIVE" indicator and polls for updates every 2 seconds. The page auto-refreshes when new spans appear.
144166

145167
### From the TUI
146168

147-
Type `/trace` in the TUI to open a trace history dialog listing all recent sessions. Select any trace to open it in your browser with the interactive viewer. The current session appears at the top, and traces are grouped by date with duration and timestamp info.
169+
Type `/recap` in the TUI to open a recap history dialog listing all recent sessions. Select any recap to open it in your browser with the interactive viewer. The current session appears at the top, and recaps are grouped by date with duration and timestamp info.
148170

149171
The viewer launches in live mode automatically for in-progress sessions, so you can watch spans appear as the agent works.
150172

173+
### Sharing Recaps
174+
175+
The recap viewer includes a **Share** button that exports a self-contained HTML file. This file includes all session data and can be opened in any browser without a server — perfect for sharing with teammates, attaching to tickets, or archiving sessions.
176+
151177
## Remote Exporters
152178

153-
Traces can be sent to remote backends via HTTP POST. Each exporter receives the full trace JSON on session completion.
179+
Recaps can be sent to remote backends via HTTP POST. Each exporter receives the full recap JSON on session completion.
154180

155181
```json
156182
{
@@ -171,7 +197,7 @@ Traces can be sent to remote backends via HTTP POST. Each exporter receives the
171197
| Field | Type | Description |
172198
|-------|------|-------------|
173199
| `name` | `string` | Identifier for this exporter (used in logs) |
174-
| `endpoint` | `string` | HTTP endpoint to POST trace JSON to |
200+
| `endpoint` | `string` | HTTP endpoint to POST recap JSON to |
175201
| `headers` | `object` | Custom headers (e.g., auth tokens) |
176202

177203
**How it works:**
@@ -182,9 +208,9 @@ Traces can be sent to remote backends via HTTP POST. Each exporter receives the
182208
- Exporters have a 10-second timeout
183209
- All export operations are best-effort and never crash the CLI
184210

185-
## Trace File Format
211+
## Recap File Format
186212

187-
Traces are stored as JSON files in the traces directory. The schema is versioned for forward compatibility.
213+
Recaps are stored as JSON files in the traces directory. The schema is versioned for forward compatibility.
188214

189215
```json
190216
{
@@ -296,15 +322,15 @@ All domain-specific attributes use the `de.*` prefix and are stored in the `attr
296322

297323
## Crash Recovery
298324

299-
Traces are designed to survive process crashes:
325+
Recaps are designed to survive process crashes:
300326

301-
1. **Immediate snapshot.** A trace file is written as soon as `startTrace()` is called, before any LLM interaction. Even if the process crashes immediately, a minimal trace file exists.
327+
1. **Immediate snapshot.** A recap file is written as soon as the session starts, before any LLM interaction. Even if the process crashes immediately, a minimal recap file exists.
302328

303-
2. **Incremental snapshots.** After every tool call and generation completion, the trace file is updated atomically (write to temp file, then rename). The file on disk always contains a valid, complete JSON document.
329+
2. **Incremental snapshots.** After every tool call and generation completion, the recap file is updated atomically (write to temp file, then rename). The file on disk always contains a valid, complete JSON document.
304330

305-
3. **Crash handlers.** The `run` command registers `SIGINT`/`SIGTERM`/`beforeExit` handlers that flush the trace synchronously with a `"crashed"` status.
331+
3. **Crash handlers.** The `run` command registers `SIGINT`/`SIGTERM`/`beforeExit` handlers that flush the recap synchronously with a `"crashed"` status.
306332

307-
4. **Status indicators.** Trace status tells you exactly what happened:
333+
4. **Status indicators.** Recap status tells you exactly what happened:
308334

309335
| Status | Meaning |
310336
|--------|---------|
@@ -313,31 +339,31 @@ Traces are designed to survive process crashes:
313339
| `running` | Session is still in progress (visible in live mode) |
314340
| `crashed` | Process was interrupted before the session completed |
315341

316-
Crashed traces contain all data up to the last successful snapshot. You can view them normally with `altimate-code trace view`.
342+
Crashed recaps contain all data up to the last successful snapshot. You can view them normally with `altimate-code recap view`.
317343

318-
## Historical Traces
344+
## Historical Recaps
319345

320-
All traces are stored in the traces directory and persist across sessions. Use `trace list` to browse history:
346+
All recaps are stored in the traces directory and persist across sessions. Use `recap list` to browse history:
321347

322348
```bash
323-
# Show the last 50 traces
324-
altimate-code trace list -n 50
349+
# Show the last 50 recaps
350+
altimate-code recap list -n 50
325351

326-
# View any historical trace
327-
altimate-code trace view <session-id>
352+
# View any historical recap
353+
altimate-code recap view <session-id>
328354
```
329355

330-
Traces are automatically pruned when `maxFiles` is exceeded (default: 100). The oldest traces are removed first. Set `maxFiles: 0` for unlimited retention.
356+
Recaps are automatically pruned when `maxFiles` is exceeded (default: 100). The oldest recaps are removed first. Set `maxFiles: 0` for unlimited retention.
331357

332358
## Privacy
333359

334-
Traces are stored **locally only** by default. They contain:
360+
Recaps are stored **locally only** by default. They contain:
335361

336362
- The prompt you sent
337363
- Tool inputs and outputs (SQL queries, file contents, command results)
338364
- Model responses
339365

340-
If you configure remote exporters, trace data is sent to those endpoints. No trace data is included in the anonymous telemetry described in [Telemetry](../reference/telemetry.md).
366+
If you configure remote exporters, recap data is sent to those endpoints. No recap data is included in the anonymous telemetry described in [Telemetry](../reference/telemetry.md).
341367

342368
!!! warning "Sensitive Data"
343-
Traces may contain SQL queries, file paths, and command outputs from your session. If you share trace files or configure remote exporters, be aware that this data will be included.
369+
Recaps may contain SQL queries, file paths, and command outputs from your session. If you share recap files or configure remote exporters, be aware that this data will be included.

docs/docs/data-engineering/guides/ci-headless.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,16 @@ fi
137137

138138
---
139139

140-
## Tracing in Headless Mode
140+
## Recap in Headless Mode
141141

142-
Tracing works in headless mode. View traces after the run:
142+
Recap works in headless mode. View recaps after the run:
143143

144144
```bash
145-
altimate trace list
146-
altimate trace view <trace-id>
145+
altimate recap list
146+
altimate recap view <session-id>
147147
```
148148

149-
See [Tracing](../../configure/tracing.md) for the full trace reference.
149+
See [Recap](../../configure/recap.md) for the full recap reference.
150150

151151
---
152152

docs/docs/usage/ci-headless.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,16 @@ fi
137137

138138
---
139139

140-
## Tracing in Headless Mode
140+
## Recap in Headless Mode
141141

142-
Tracing works in headless mode. View traces after the run:
142+
Recap works in headless mode. View recaps after the run:
143143

144144
```bash
145-
altimate trace list
146-
altimate trace view <trace-id>
145+
altimate recap list
146+
altimate recap view <session-id>
147147
```
148148

149-
See [Tracing](../configure/tracing.md) for the full trace reference.
149+
See [Recap](../configure/recap.md) for the full recap reference.
150150

151151
---
152152

docs/docs/usage/cli.md

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ altimate --agent analyst
3333
| `export` | Export session data |
3434
| `import` | Import session data |
3535
| `session` | Session management |
36-
| `trace` | List and view session traces |
36+
| `recap` | List and view session recaps (formerly `trace`) |
3737
| `github` | GitHub integration |
3838
| `pr` | Pull request tools |
3939
| `upgrade` | Upgrade to latest version |
@@ -149,20 +149,22 @@ altimate run --model anthropic/claude-sonnet-4-6 "optimize my warehouse"
149149
# Print logs for debugging
150150
altimate --print-logs --log-level DEBUG run "test query"
151151

152-
# Disable tracing for a single run
152+
# Disable recap for a single run (--no-trace is the backward-compatible flag name)
153153
altimate run --no-trace "quick question"
154154
```
155155

156156
For CI pipelines and headless automation, see [CI & Automation](ci-headless.md).
157157

158-
## Tracing
158+
## Recap
159159

160-
Every `run` command automatically saves a trace file with the full session details, including generations, tool calls, tokens, cost, and timing. See [Tracing](../configure/tracing.md) for configuration options.
160+
Every `run` command automatically saves a recap file with the full session details, including generations, tool calls, tokens, cost, and timing. See [Recap](../configure/recap.md) for configuration options.
161161

162162
```bash
163-
# List recent traces
164-
altimate trace list
163+
# List recent recaps
164+
altimate recap list
165165

166-
# View a trace in the browser
167-
altimate trace view <session-id>
166+
# View a recap in the browser
167+
altimate recap view <session-id>
168168
```
169+
170+
> **Note:** The `trace` command still works as a backward-compatible alias for `recap`.

0 commit comments

Comments
 (0)