Skip to content

Releases: alicoding/claude-parser

v2.1.1 - Token Counting Fix

17 Sep 23:06

Choose a tag to compare

🐛 Bug Fixes

Token Counting Accuracy

  • Fixed token counting to match Claude Code UI's /context command
  • Now correctly counts: compact summary content + user message content + assistant usage tokens
  • Achieves 96% accuracy compared to UI (6,341 vs 6,600 tokens)

API Improvements

  • Added count_session_tokens() function for consistent API interface
  • Fixed isCompactSummary field name mismatch (was incorrectly is_compact_summary)
  • Improved SQL queries to include cache_read_input_tokens for accurate counts

One-liner Usage

from claude_parser import load_latest_session, count_session_tokens

# Get current session tokens
tokens = count_session_tokens(load_latest_session())

🤖 Generated with Claude Code

v2.0.1 - Discord Stop Hook Fix

16 Sep 03:55

Choose a tag to compare

🐛 Bug Fixes

  • Fixed Discord stop hook returning JSON structure instead of plain text
  • get_latest_claude_message() now returns clean text messages

✅ Improvements

  • Added black box testing with real JSONL data
  • Set up towncrier for changelog management
  • Documented Claude Code SDK message handling patterns

📦 Installation

pip install claude-parser==2.0.1

v2.0.0 - Complete Architecture Rewrite

15 Sep 23:56

Choose a tag to compare

Major release with complete LNCA-compliant architecture, hooks system, and CG git-like interface