See what your coding agents do.
Read Inside a coding agent run for the story behind trce.
trce records Claude Code and Codex CLI sessions locally as structured events.
Inspect each trace on your machine, or explicitly share it for live viewing and
replay.
Recording is local. Nothing leaves your machine until you explicitly share. Redaction runs on-device before every upload.
npm install -g @trce/cli@next
trce helpThe package installs a self-contained native executable; Bun is not required at runtime. Install scripts and optional dependencies must be enabled so npm can select the binary for your platform.
Supported targets:
- macOS, Linux, and Windows
- arm64 and x64
Preview and install hooks for the current project:
# Claude Code
trce init --harness claude-code --scope project --dry-run
trce init --harness claude-code --scope project --yes
# Codex CLI
trce init --harness codex-cli --scope project --dry-run
trce init --harness codex-cli --scope project --yesUse --scope global to install for every project. Start a new Claude Code or
Codex session after installation; hooks then record lifecycle events locally in
~/.trce/spool/.
Share the latest session when you choose:
trce share --latest # one-shot share
trce share --latest --live # live updates until the session ends
trce share --latest --local # redacted JSON and HTML; no uploadClaude Code users can also run /trce-share or /trce-share live. In Codex,
ask the agent to run the same trce share command, or run it yourself.
Delete a hosted copy without deleting the local recording:
trce unshare https://trce.sh/t/<share-id>- Harness hooks append native events to a local JSONL spool.
trce spooldoes no network work, normalization, or redaction. - An explicit share action combines the spool with the native transcript, normalizes it, and redacts it on-device.
- The CLI writes a local
trace.json, redaction report, and HTML preview. It uploads only when--localis not set.
Long sessions are uploaded in ordered, retry-safe batches. Oversized event payloads are reduced to a visible first/last preview for sharing while the raw local recording remains untouched.
Applied trce init creates a random device token in ~/.trce/config.toml.
The token is never printed or included in trace data; it is used only as the
authorization header for explicit publish and unshare actions. Existing tokens
are preserved. On macOS and Linux, the directory is mode 0700 and the config
file is mode 0600.
Redaction masks secret-looking keys and values, common credential formats,
authorization headers, database URLs, PEM keys, values loaded from local
.env* files, and configured extra values. Redaction is best-effort, and every
share includes a visible report. Review sensitive traces before sharing.
- CLI interface
- Publish protocol
- Trace schema and JSON Schema
- Project scope and privacy invariants
@trce/protocol
The Zod definitions in packages/schema are the source of truth for the
trce: "0.1" format. Unknown native records degrade to other rather than
crashing when harness formats drift.
Requires Bun 1.3.12. Node.js 24 and npm 11 are also used by package smoke tests.
bun install --frozen-lockfile
bun run verifySee CONTRIBUTING.md for fixture, privacy, and pull-request requirements.
- Use GitHub Issues for sanitized bug reports and focused feature proposals.
- Use SECURITY.md for private vulnerability reports. Never post raw traces, credentials, or device tokens publicly.
- Participation is governed by the Code of Conduct.
Maintained by Tair Asim. Released under the MIT License.