Skip to content

yurukusa/cc-session-length

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cc-session-length

How long are your Claude Code sessions?

Reads your ~/.claude session files and shows the duration distribution — from 30-second context-compaction restarts to multi-hour marathon runs.

Usage

npx cc-session-length

Or use the browser version (no install):

yurukusa.github.io/cc-session-length

Drag in your ~/.claude folder. Everything runs locally — nothing is uploaded.

Sample output

cc-session-length — How long are your Claude Code sessions? (Asia/Tokyo)

457 sessions · All time

  < 1 min    ████████████████████████░░░░   88  ( 19%)
  1–5 min    ████████████████████████████  109  ( 24%)
  5–15 min   ██████████████░░░░░░░░░░░░░░   54  ( 12%)
  15–30 min  ██████████░░░░░░░░░░░░░░░░░░   38  (  8%)
  30–60 min  ███████████░░░░░░░░░░░░░░░░░   43  (  9%)
  1–2 hr     ███████░░░░░░░░░░░░░░░░░░░░░   27  (  6%)
  2–4 hr     ██████░░░░░░░░░░░░░░░░░░░░░░   25  (  5%)
  4–8 hr     ████░░░░░░░░░░░░░░░░░░░░░░░░   17  (  4%)
  8+ hr      ██████████████░░░░░░░░░░░░░░   56  ( 12%)

───────────────────────────────────────────────────────
  Session type:     ⚖️ Balanced Worker
  Mix of short and medium sessions. Steady rhythm.

  Average:  4h 13m
  Median:   11m
  P90:      10h 42m
  Longest:  101h 30m
  < 1 min (compaction):  19.3% of all sessions

Session types

Type Description
⚡ Rapid Cycler 60%+ of sessions < 1 min — lots of context compactions
🏃 Quick Iterator Median < 5 min — short, fast feedback cycles
⚖️ Balanced Worker Median 5–30 min — mix of short and medium
🔬 Deep Worker Median 30–120 min — long, focused sessions
🦁 Marathon Coder Median > 2 hr — multi-hour deep work

Options

npx cc-session-length              # All-time breakdown
npx cc-session-length --days=30   # Last 30 days
npx cc-session-length --json      # JSON output for dashboards

How it works

For each session file in ~/.claude/projects/, the tool reads the first and last timestamp entry and computes the duration. Sessions in subagents/ directories are excluded (those are subagent runs, not your main sessions).

Part of cc-toolkit

cc-session-length is tool #46 in cc-toolkit — 48 free tools for Claude Code users.


GitHub: yurukusa/cc-session-length Try it: npx cc-session-length

About

How long are your Claude Code sessions? Duration distribution and analysis.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors