tx trace
Execution tracing and run observability
Overview
Track agent runs with full observability. View timelines, metrics, stderr, and transcript content for debugging failed runs.
CLI Usage
# List recent runs
tx trace list
tx trace list --hours 48
# Show run details and metrics
tx trace show run-abc123
tx trace show run-abc123 --full # Combined timeline with tool calls
# View raw content
tx trace transcript run-abc123
tx trace stderr run-abc123
# Aggregate errors
tx trace errors
tx trace errors --hours 48MCP Tools
| Tool | Description |
|---|---|
tx_run_list | List runs |
tx_run_get | Get run details |
tx_run_create | Create a run record |
tx_run_update | Update run status |
API Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /api/runs | List runs |
| GET | /api/runs/:id | Get run details with messages |
| POST | /api/runs | Create a run |
| PATCH | /api/runs/:id | Update a run |
| GET | /api/runs/:id/stdout | Get run stdout |
| GET | /api/runs/:id/stderr | Get run stderr |
SDK
// List runs
const runs = await tx.runs.list({ agent: 'claude', limit: 10 })
// Create and update a run
const run = await tx.runs.create({ agent: 'claude', taskId: 'tx-abc123' })
await tx.runs.update(run.id, { status: 'completed', exitCode: 0 })