Analyze which tools Claude Code uses last — and what closing patterns dominate your sessions.
The companion to cc-first.
npx cc-last
Zero dependencies. Reads ~/.claude/projects/ directly.
cc-last — Session Closing Pattern
==================================
Sessions analyzed: 2,120
Last Tool Called
----------------
Read ████████████████████ 768 36.2%
Bash ██████████████████░░ 728 34.3%
Grep ████░░░░░░░░░░░░░░░░ 146 6.9%
WebSearch ███░░░░░░░░░░░░░░░░░ 103 4.9%
Write ██░░░░░░░░░░░░░░░░░░ 80 3.8%
...
Top Closing Triples (last 3 tools → final)
-------------------------------------------
Bash→Bash→Bash ████████████████ 366 17.3%
Read→Read→Read █████████░░░░░░░ 249 11.7%
Bash→Read→Read ██░░░░░░░░░░░░░░ 77 3.6%
Bash→Bash→Read ██░░░░░░░░░░░░░░ 73 3.4%
...
Compare with cc-first (opening):
First tool: Read 38%, Bash 28%, Glob 17%
Last tool: Read 36%, Bash 34%, Grep 7%
- Read + Bash = 70% of session endings — verification and inspection dominate
- Bash→Bash→Bash (18.6%) is the #1 closing triple — sessions end with a burst of shell commands (tests, builds, checks)
- Glob drops from 17% (opener) to 0.8% (closer) — file discovery is an opening activity, not a closing one
- Grep rises from ~1% (opener) to 7% (closer) — targeted code search happens at the end, not the beginning
- Sessions that open and close with the same tool type suggest focused, single-purpose work
| First tool | Closing tool | |
|---|---|---|
| Read | 38% | 36% |
| Bash | 28% | 34% |
| Glob | 17% | 0.8% |
| Grep | ~1% | 7% |
Bash increases (+6%) from start to end — Claude Code shifts toward action and verification as sessions progress.
npx cc-last --json # Raw JSON output
yurukusa.github.io/cc-last — drag and drop your projects folder.
Part of cc-toolkit — tools for understanding your Claude Code sessions.
Claude Code Ops Kit ($19) — 16 production hooks + 5 templates + 3 tools. Built from 160+ hours of autonomous operation.
Source: yurukusa/cc-last