Feature Request: Log cost of session to disk (ideally in a structured way)

Resolved 💬 6 comments Opened Jun 26, 2025 by janeklb Closed Jan 11, 2026

I would like to generate a cost report showing me how much I spend per project/directory per day.

Would be great to have something logged in JSON, ideally structured (eg. some field called total_cost_usd), in the context of a timestamp (eg. end of session if logging the total cost accrued throughout a session) as well as the project.

One simple way to do this would be to add a jsonl line to the .jsonl files in ~/.claude/projects/ after exiting claude, with the some session cost metadata?

View original on GitHub ↗

This issue has 6 comments on GitHub. Read the full discussion on GitHub ↗