November 28, 2025

Claude Code Restart Trajectory Analysis

How restarting Claude Code reduces token usage by clearing accumulated context.

Key Findings

Restarting Claude Code clears accumulated context - embedded file contents, background process notifications, and system reminders - while preserving essential conversation state. Payload size reduction ranges from 36% to 73% depending on session activity.

Example 1: Dramatic Reduction (73%)

fcvm FUSE Implementation Session -73%
Before Restart 10:49:20 UTC
File Size 272 KB
System Blocks 2 (15.1 KB)
CLAUDE.md ~53 KB
After Restart 10:49:20 UTC
File Size 73 KB
System Blocks 2 (15.0 KB)
Messages Fresh start
272 KB
Before
73 KB
After
199 KB
Saved

What caused the bloat?

Extended coding session with massive CLAUDE.md files and accumulated tool results:

  • CLAUDE.md files: ~53KB of project instructions embedded in context
  • Multiple message conversation history with embedded Read tool results
  • System reminders about TodoWrite, malware analysis, and file opens
  • Continuation summary from previous out-of-context session

Example 2: Moderate Reduction (36%)

Web UI Development Session -36%
Before Restart 05:24:43 UTC
Input Tokens 151,897
Output Tokens 10
File Size 4.08 MB
After Restart 05:25:53 UTC
Input Tokens 96,859
Output Tokens 14
File Size 3.90 MB
151,897
Before
96,859
After
55,038
Tokens Saved

What caused the bloat?

Typical development session with file reads and background processes:

  • Full _index.tsx file embedded (~131KB)
  • 4 background Bash process notifications
  • TodoWrite tool reminders
  • Multiple system reminders accumulated over session

All Download Files

Example 1: Before (73% case)

272 KB payload

Example 1: After (73% case)

73 KB payload

Example 2: Before (36% case)

151,897 tokens

Example 2: After (36% case)

96,859 tokens

Analysis

Payload Size Variance

Same conversation state, dramatically different payload sizes. Claude Code context accumulates with tool usage and conversation history.

  • 73% case: Long session with massive CLAUDE.md (53KB) and continuation summary
  • 36% case: Moderate session with large file reads and background processes

System Reminder Accumulation

<system-reminder> tags accumulate during sessions:

  • Background Bash process notifications (output available)
  • TodoWrite tool reminders
  • Malware analysis guidance
  • File open notifications from IDE

Embedded File Content

Major contributor to bloat: Read tool results stay in context.

  • Large source files (args.rs, _index.tsx)
  • Log files from test runs
  • CLAUDE.md project instructions

Continuation Summaries

When context overflows, Claude Code creates continuation summaries:

  • Previous session context compressed into ~6KB summary
  • Summaries themselves contribute to next session's context
  • Multiple continuations compound the overhead

Conclusions

  1. Dynamic Context: Payloads vary significantly (36-73%) within similar sessions.
  2. System Overhead: Background processes and reminders compound over time.
  3. File Embedding: Large file reads can increase payload size by 50%+.
  4. CLAUDE.md Impact: Large project instruction files are re-sent every request.
  5. Continuation Tax: Session continuations add overhead from summaries.
Tip: For long sessions, periodic restarts reduce cost. Be mindful of reading large files and keep CLAUDE.md files concise.

Technical Details

Property Value
Model claude-opus-4-5-20251101
Capture Method Claude Code Proxy
Examples Captured 2 before/after pairs