These pages document master, which is unreleased and in development. The Quick Start installs the latest stable release; anything newer than that tag is marked in the text.
Agent Interaction Traces
All agent transcripts are automatically saved to temporary files during execution.
Location
Section titled “Location”Traces are stored at:
# macOS/private/tmp/claude-{session-id}/{project-path}/tasks/{agentId}.output
# Linux/tmp/claude-{session-id}/{project-path}/tasks/{agentId}.outputEach agent spawned by the Agent tool gets its own output file named by agent ID (e.g., a0b6bdb.output).
Accessing Traces
Section titled “Accessing Traces”List all agent sessions for a project
Section titled “List all agent sessions for a project”ls -lh /private/tmp/claude-{session-id}/{project-path}/tasks/Example (replace placeholders with your values):
ls -lh /private/tmp/claude-{uid}/-Users-yourname-dev-my-project/tasks/View a specific agent’s full transcript
Section titled “View a specific agent’s full transcript”cat /private/tmp/claude-{session-id}/{project-path}/tasks/{agentId}.outputSearch across all agents for a keyword
Section titled “Search across all agents for a keyword”grep -r "keyword" /private/tmp/claude-{session-id}/{project-path}/tasks/Tail a running agent’s output in real-time
Section titled “Tail a running agent’s output in real-time”tail -f /private/tmp/claude-{session-id}/{project-path}/tasks/{agentId}.outputFinding Your Session ID
Section titled “Finding Your Session ID”The session ID is typically your Unix UID. Find it with:
ls /private/tmp/ | grep claude-The project path is your working directory with / replaced by - and a leading -.
Archiving Traces Permanently
Section titled “Archiving Traces Permanently”Important: Traces in /private/tmp/ are temporary and may be cleared on system restart.
To archive permanently:
# Create archive directory in your projectmkdir -p doc_internal/agent-traces
# Copy all tracescp /private/tmp/claude-{session-id}/{project-path}/tasks/*.output \ doc_internal/agent-traces/
# Optionally rename with timestampsfor f in doc_internal/agent-traces/*.output; do mv "$f" "${f%.output}-$(date +%Y%m%d-%H%M%S).output"doneWhat’s in a Trace File
Section titled “What’s in a Trace File”Each agent transcript includes:
- Full conversation history (all prompts and responses)
- Tool calls made (Read, Write, Edit, Bash, etc.)
- Tool results
- Errors and warnings
- Final summary returned to the parent agent
- Token usage and duration stats
Use Cases
Section titled “Use Cases”- Debugging agent behavior — see what files it read, what assumptions it made, where it diverged from instructions.
- Extracting generated code — review code an agent wrote without checking git diffs.
- Understanding agent reasoning — traces show the agent’s thought process and decision-making.
- Documenting architectural decisions — capture the rationale behind design choices.
- Training and retrospectives — review traces to understand what worked well and what didn’t.
Best Practices
Section titled “Best Practices”- Archive after major phases — don’t rely on temporary files.
- Include session metadata — date, phase number, objective.
- Add to .gitignore if sensitive — traces may contain credentials or PII.
- Review before sharing — sanitize any secrets or sensitive data.